// File: /workspace/github_c_makefile_star2_O1/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, %rbp
movq %rdi, %r14
cmpq $0x3800, %rdx           # imm = 0x3800
ja 0xd61a
cmpq $0x1000, %r15           # imm = 0x1000
jb 0xd53e
movq %r15, %rax
xorq $0x1000, %rax           # imm = 0x1000
movl %r13d, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
orq %rax, %rcx
jne 0xd61a
movq %rbp, 0x18(%rsp)
cmpq $0x1000, %r13           # imm = 0x1000
ja 0xdad6
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x2e861(%rip), %rcx     # 0x3bdc0
movzbl (%rcx,%rax), %ebp
testq %r12, %r12
je 0xdaeb
movl %ebp, %r13d
movq %r13, %rax
shlq $0x5, %rax
leaq (%r12,%rax), %rbx
addq $0x28, %rbx
movl 0x10(%rbx), %eax
testq %rax, %rax
je 0xdb0f
movq 0x18(%rbx), %rcx
leaq (,%rax,8), %rdx
negq %rdx
movq (%rcx,%rdx), %r15
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
cmpl 0x8(%rbx), %ecx
jl 0xdb90
testq %rax, %rax
je 0xdb1b
leaq 0x2e084(%rip), %rax     # 0x3b640
movq (%rax,%r13,8), %rbp
leaq 0x3ef5a(%rip), %rax     # 0x4c521
movb (%rax), %al
testb %r8b, %r8b
jne 0xdb74
testb %al, %al
jne 0xdb98
leaq 0x3ef52(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xdb7c
incq (%rbx)
movl 0x18(%r12), %eax
testl %eax, %eax
jle 0xdb86
leal -0x1(%rax), %ecx
movl %ecx, 0x18(%r12)
testl %eax, %eax
jg 0xd96e
movq %r14, %rdi
movq %r12, %rsi
callq 0x350b5
jmp 0xd96e
movq 0x3f97f(%rip), %rax     # 0x4cfa0
cmpq %r13, %rax
setb %cl
cmpq $0x1001, %r15           # imm = 0x1001
setae %dl
orb %cl, %dl
jne 0xd71f
cmpq $0x1000, %r13           # imm = 0x1000
ja 0xdbcc
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x2e76b(%rip), %rcx     # 0x3bdc0
movzbl (%rcx,%rax), %ebx
testq %r12, %r12
je 0xdccb
cmpq $0x3800, %r13           # imm = 0x3800
ja 0xdc11
movq %rbp, %rsi
movl %ebx, %ebp
movq %rbp, %rax
shlq $0x5, %rax
leaq (%r12,%rax), %r13
addq $0x28, %r13
movl 0x10(%r13), %eax
testq %rax, %rax
je 0xdce7
movq 0x18(%r13), %rcx
leaq (,%rax,8), %rdx
negq %rdx
movq (%rcx,%rdx), %r15
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r13)
cmpl 0x8(%r13), %ecx
jl 0xdd76
testq %rax, %rax
je 0xdcf4
leaq 0x2df7c(%rip), %rax     # 0x3b640
movq (%rax,%rbp,8), %rbx
leaq 0x3ee52(%rip), %rax     # 0x4c521
movb (%rax), %al
testb %r8b, %r8b
jne 0xdd4a
testb %al, %al
jne 0xdd7f
leaq 0x3ee4a(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xdd52
incq (%r13)
movl 0x18(%r12), %eax
testl %eax, %eax
jle 0xdd5c
leal -0x1(%rax), %ecx
movl %ecx, 0x18(%r12)
testl %eax, %eax
jle 0xdd66
andq $-0x1000, %r15          # imm = 0xF000
jmp 0xd96e
cmpq %r13, %rax
jb 0xdbe1
testq %r14, %r14
sete %al
testq %rbp, %rbp
setne %cl
orb %al, %cl
jne 0xd745
movq 0x30(%r14), %rbp
testq %rbp, %rbp
je 0xddbb
testq %rbp, %rbp
je 0xd96b
movl %r8d, 0x14(%rsp)
addq $0xfff, %r15            # imm = 0xFFF
andq $-0x1000, %r15          # imm = 0xF000
leaq (%r15,%r13), %rbx
movq %r14, %r12
leaq 0x10(%rbp), %r14
movq %r14, %rdi
callq 0xb5a0
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x235ca
testq %rax, %rax
je 0xd963
movq %rax, %r10
movq %r14, 0x30(%rsp)
movq %rbp, 0x18(%rsp)
movq %r12, 0x28(%rsp)
leaq 0x3f92a(%rip), %rax     # 0x4d0d0
movq (%rax), %rbp
notq %rbp
leaq -0x18(%r10), %r8
movq %r8, %r12
andq %rbp, %r8
andq %r10, %rbp
movq 0x3f808(%rip), %rdi     # 0x4cfc8
leaq (%r8,%rdi), %rax
negq %rax
addq %r10, %rax
addq $-0x18, %rax
pushq $0x60
popq %rcx
xorl %edx, %edx
divq %rcx
movq 0x3f7e3(%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, %rbx
movq %rbx, %r14
subq %r13, %r14
subq %rdx, %r15
movq %rbx, %r11
jne 0xd980
movq %r11, %rbx
leaq 0x1000(%r13), %r15
cmpq $0x1000, %r14           # imm = 0x1000
movq 0x28(%rsp), %r14
movl 0x14(%rsp), %eax
jne 0xda56
movzbl %al, %r8d
movq 0x18(%rsp), %rdi
movq %r10, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %r10, %rbx
callq 0x25003
movq 0x3f775(%rip), %rcx     # 0x4cfc8
testb %al, %al
jne 0xda82
leaq 0x3f86e(%rip), %rax     # 0x4d0d0
movq (%rax), %rbx
notq %rbx
andq %r12, %rbx
addq %rbx, %rcx
subq %rcx, %r12
movq %r12, %rax
xorl %edx, %edx
pushq $0x60
popq %rcx
divq %rcx
movq %rax, %r15
addq 0x3f73a(%rip), %r15     # 0x4cfc0
shlq $0xc, %r15
cmpq $0x1000, %r13           # imm = 0x1000
ja 0xdda6
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x2e51a(%rip), %rcx     # 0x3bdc0
movzbl (%rcx,%rax), %eax
movq 0x18(%rsp), %r12
movq 0x30(%rsp), %rdi
incq 0xa0(%r12)
addl $-0x27, %eax
incq 0xb0(%r12)
addq %r13, 0x98(%r12)
movq 0xd0(%r12), %rcx
shlq $0x5, %rax
incq (%rcx,%rax)
incq 0x10(%rcx,%rax)
addq %rbx, %r15
incq 0x18(%rcx,%rax)
callq 0xb380
cmpb $0x0, 0x14(%rsp)
jne 0xd918
leaq 0x3ec22(%rip), %rax     # 0x4c521
cmpb $0x1, (%rax)
je 0xddd3
leaq 0x3ec24(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xdddd
testq %r14, %r14
je 0xd96e
movl (%r12), %esi
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xdbbf
cmpl %esi, 0x40(%r14)
jbe 0xdbbf
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xd96e
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xddb3
leal -0x1(%rcx), %edx
movl %edx, (%rax)
testl %ecx, %ecx
jg 0xd96e
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x226c8
jmp 0xd96e
movq %r14, %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 %rbp, %rdi
imulq $0x60, %rdx, %r8
addq %rdi, %r8
movq %rsi, %rdi
negq %rdi
imulq $0x60, %rdi, %rdi
leaq (%r8,%rdi), %r12
addq %r8, %rdi
addq $0x18, %rdi
movq %rdi, 0x40(%rsp)
movq 0x78(%rbp,%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(%rbp,%rsi,8), %r8d
andl %edi, %r8d
orq %rax, %r8
movq %r10, 0x38(%rsp)
movl $0x1fe3, %r10d          # imm = 0x1FE3
orq %r10, %r8
movq %r8, 0x78(%rbp,%rsi,8)
subq 0x3f5c8(%rip), %rcx     # 0x4cfc0
movl 0x78(%rbp,%rcx,8), %esi
andl %edi, %esi
addq %r15, %r15
orq %rax, %r15
orq %r10, %r15
orq %rsi, %r15
movq %r15, 0x78(%rbp,%rcx,8)
subq 0x3f5aa(%rip), %rdx     # 0x4cfc0
andl 0x78(%rbp,%rdx,8), %edi
movq %r11, %rbx
leaq (%r11,%r11), %rcx
orq %rax, %rcx
orq %r10, %rcx
orq %rdi, %rcx
movq %rcx, 0x78(%rbp,%rdx,8)
shrl $0x2, %r9d
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x38(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xf459
movq 0x40(%rsp), %r10
jmp 0xd816
andl $0x0, (%rsp)
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq %rbp, %rdx
movq %r10, %rcx
movq %rbx, %r8
movq %r15, %r9
movq %r10, %rbx
callq 0xfe5b
movq %rbx, %r10
movl 0x14(%rsp), %eax
jmp 0xd833
leaq -0x18(%rbx), %rax
leaq 0x3f643(%rip), %rdx     # 0x4d0d0
andq (%rdx), %rax
subq %rcx, %rax
xorl %r15d, %r15d
xorl %edx, %edx
pushq $0x60
popq %rcx
divq %rcx
movl 0x78(%rbp,%rax,8), %r9d
movl %r9d, %ecx
andl $0x10, %ecx
shrl $0x4, %ecx
andl $0x4, %r9d
shrl $0x2, %r9d
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xf459
movq 0x30(%rsp), %rdi
callq 0xb380
jmp 0xd96e
movq %r13, %rdi
movl %r8d, %ebx
callq 0xfdc2
movl %ebx, %r8d
movl %eax, %ebp
jmp 0xd563
movzbl %r8b, %r8d
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
movl %ebp, %ecx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd1d4
orl $-0x1, 0x8(%rbx)
xorl %r15d, %r15d
jmp 0xd5ac
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
movl %r8d, 0x14(%rsp)
jne 0xdb37
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0xdf35
testq %rsi, %rsi
je 0xddf9
leaq 0x26(%rsp), %rax
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %rax, %rbp
movq %rax, %r9
callq 0x355ce
movq %rax, %r15
movb (%rbp), %al
testb %al, %al
movl 0x14(%rsp), %r8d
jne 0xd5b5
jmp 0xd96b
testb %al, %al
jne 0xde00
movq %r15, %rdi
xorl %esi, %esi
movq %rbp, %rdx
jmp 0xdbb5
movl 0x1c(%r12), %ecx
jmp 0xd5fd
movl %ecx, 0x8(%rbx)
jmp 0xd5ac
shlq $0x6, %r13
leaq 0x3ea3d(%rip), %rax     # 0x4c5e0
movq %r15, %rdi
subq 0x8(%r13,%rax), %rdi
movq 0x10(%r13,%rax), %rdx
movl $0xa5, %esi
callq 0xb230
jmp 0xd5ea
movq %r14, %rdi
callq 0x1afa2
jmp 0xd93c
movq %r13, %rdi
movl %r8d, %ebx
callq 0xfdc2
movl %ebx, %r8d
movl %eax, %ebx
jmp 0xd659
leaq 0x3f4e0(%rip), %rax     # 0x4d0c8
cmpq %r15, (%rax)
jb 0xde48
movzbl %r8b, %ecx
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e21c
leaq 0x3f888(%rip), %rax     # 0x4d4a0
cmpq %r13, (%rax)
jb 0xdccb
movq %r14, %r13
movl %ebx, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r12,%rcx), %r14
addq $0x28, %r14
movl 0x10(%r14), %ecx
testq %rcx, %rcx
je 0xde6b
movq 0x18(%r14), %rdx
leaq (,%rcx,8), %rsi
negq %rsi
movq (%rdx,%rsi), %r15
leal -0x1(%rcx), %edx
movl %edx, 0x10(%r14)
cmpl 0x8(%r14), %edx
jl 0xdf1a
testq %rcx, %rcx
je 0xde78
leaq 0x2d9ca(%rip), %rcx     # 0x3b640
movq (%rcx,%rax,8), %rdx
testb %r8b, %r8b
jne 0xddef
leaq 0x3e897(%rip), %rax     # 0x4c521
cmpb $0x1, (%rax)
je 0xdf23
leaq 0x3e899(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xddef
incq (%r14)
movl 0x18(%r12), %eax
testl %eax, %eax
jle 0xdec2
leal -0x1(%rax), %ecx
movl %ecx, 0x18(%r12)
testl %eax, %eax
jg 0xd713
movq %r13, %rdi
jmp 0xdd69
movzbl %r8b, %r8d
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl %ebx, %ecx
callq 0xd1d4
movq %rax, %r15
jmp 0xd713
orl $-0x1, 0x8(%r13)
xorl %r15d, %r15d
jmp 0xd6b4
testq %rsi, %rsi
movl %r8d, 0x14(%rsp)
jne 0xdd0b
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0xdf47
testq %rsi, %rsi
je 0xdebb
leaq 0x27(%rsp), %rax
movq %r14, %rdi
movq %r12, %rdx
movq %r13, %rcx
movl %ebx, %r8d
movq %rax, %rbx
movq %rax, %r9
callq 0x355ce
movq %rax, %r15
movb (%rbx), %al
testb %al, %al
movl 0x14(%rsp), %r8d
jne 0xd6bd
xorl %r15d, %r15d
jmp 0xd713
testb %al, %al
jne 0xdecc
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
jmp 0xdd9c
movl 0x1c(%r12), %ecx
jmp 0xd706
movq %r14, %rdi
movq %r12, %rsi
callq 0x350b5
jmp 0xd713
movl %ecx, 0x8(%r13)
jmp 0xd6b4
shlq $0x6, %rbp
leaq 0x3e856(%rip), %rax     # 0x4c5e0
movq %r15, %rdi
subq 0x8(%rbp,%rax), %rdi
movq 0x10(%rbp,%rax), %rdx
movl $0xa5, %esi
callq 0xb230
jmp 0xd6f2
movq %r13, %rdi
callq 0xfdc2
jmp 0xd8aa
movl 0x4(%rax), %edx
jmp 0xd94e
movq %r14, %rdi
xorl %esi, %esi
movl %r8d, %ebx
callq 0x1b0d1
movl %ebx, %r8d
movq %rax, %rbp
jmp 0xd745
movq %r15, %rdi
movl $0xa5, %esi
jmp 0xdde2
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0xb230
jmp 0xd918
movq %r15, %rdi
xorl %esi, %esi
jmp 0xdf2b
xorl %eax, %eax
jmp 0xdb62
shlq $0x6, %r13
leaq 0x3e7d5(%rip), %rax     # 0x4c5e0
movq 0x8(%r13,%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %r15, %rdi
subq %rdx, %rdi
movl $0xa5, %esi
callq 0xb230
leaq 0x3e7b4(%rip), %rax     # 0x4c5e0
movq (%r13,%rax), %rdi
addq %r15, %rdi
movl $0xa5, %esi
movq 0x18(%rsp), %rdx
callq 0xb230
jmp 0xdb7c
movzbl %r8b, %r8d
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r15, %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x102ae
orl $-0x1, 0x8(%r14)
xorl %r15d, %r15d
jmp 0xdc66
movl %r8d, %r14d
movq %rbp, %rsi
testq %rbp, %rbp
jne 0xde93
movq 0x30(%r13), %rax
movq %rax, %rsi
testq %rax, %rax
je 0xdf59
testq %rsi, %rsi
je 0xdd42
movzbl %r14b, %ecx
movq %r13, %rdi
movl %ebx, %edx
callq 0xd021
movq %rax, %r15
testq %rax, %rax
jne 0xdca6
jmp 0xdd42
xorl %eax, %eax
jmp 0xdd35
movl 0x1c(%r12), %ecx
jmp 0xdcb6
shlq $0x6, %rbp
leaq 0x3e709(%rip), %rax     # 0x4c5e0
movq %r14, 0x28(%rsp)
movq 0x8(%rbp,%rax), %r14
movq %r15, %rdi
subq %r14, %rdi
movl $0xa5, %esi
movq %r14, %rdx
callq 0xb230
leaq 0x3e6e5(%rip), %rax     # 0x4c5e0
movq (%rbp,%rax), %rdi
addq %r15, %rdi
movl $0xa5, %esi
movq %r14, %rdx
movq 0x28(%rsp), %r14
callq 0xb230
jmp 0xdd52
movl %edx, 0x8(%r14)
jmp 0xdc66
movq %r15, %rdi
movl $0xa5, %esi
callq 0xb230
jmp 0xdca3
movq %r14, %rdi
xorl %esi, %esi
callq 0x1b0d1
movq %rax, %rsi
jmp 0xdb37
movq %r14, %rdi
xorl %esi, %esi
callq 0x1b0d1
movq %rax, %rsi
jmp 0xdd0b
movq %r13, %rdi
xorl %esi, %esi
callq 0x1b0d1
movq %rax, %rsi
jmp 0xde93