// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/ctl.c
// Function: ctl_grow
static bool
ctl_grow(tsdn_t *tsdn)
{
	ctl_arena_stats_t *astats;

	/* Initialize new arena. */
	if (arena_init(tsdn, ctl_stats.narenas) == NULL)
		return (true);

	/* Allocate extended arena stats. */
	astats = (ctl_arena_stats_t *)a0malloc((ctl_stats.narenas + 2) *
	    sizeof(ctl_arena_stats_t));
	if (astats == NULL)
		return (true);

	/* Initialize the new astats element. */
	memcpy(astats, ctl_stats.arenas, (ctl_stats.narenas + 1) *
	    sizeof(ctl_arena_stats_t));
	memset(&astats[ctl_stats.narenas + 1], 0, sizeof(ctl_arena_stats_t));
	if (ctl_arena_init(&astats[ctl_stats.narenas + 1])) {
		a0dalloc(astats);
		return (true);
	}
	/* Swap merged stats to their new location. */
	{
		ctl_arena_stats_t tstats;
		memcpy(&tstats, &astats[ctl_stats.narenas],
		    sizeof(ctl_arena_stats_t));
		memcpy(&astats[ctl_stats.narenas],
		    &astats[ctl_stats.narenas + 1], sizeof(ctl_arena_stats_t));
		memcpy(&astats[ctl_stats.narenas + 1], &tstats,
		    sizeof(ctl_arena_stats_t));
	}
	a0dalloc(ctl_stats.arenas);
	ctl_stats.arenas = astats;
	ctl_stats.narenas++;

	return (false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xbf0, %rsp            # imm = 0xBF0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl 0x4a767(%rip), %esi     # 0xa4160
callq 0x19e90
cmpq $0x0, %rax
jne 0x59a0d
movb $0x1, -0x1(%rbp)
jmp 0x59b65
movl 0x4a74d(%rip), %eax     # 0xa4160
addl $0x2, %eax
movl %eax, %eax
imulq $0xbd8, %rax, %rdi      # imm = 0xBD8
callq 0x18520
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x59a38
movb $0x1, -0x1(%rbp)
jmp 0x59b65
movq -0x18(%rbp), %rdi
movq 0x4a725(%rip), %rsi     # 0xa4168
movl 0x4a717(%rip), %eax     # 0xa4160
addl $0x1, %eax
movl %eax, %eax
imulq $0xbd8, %rax, %rdx      # imm = 0xBD8
callq 0xb310
movq -0x18(%rbp), %rdi
movl 0x4a6fc(%rip), %eax     # 0xa4160
addl $0x1, %eax
movl %eax, %eax
imulq $0xbd8, %rax, %rax      # imm = 0xBD8
addq %rax, %rdi
xorl %esi, %esi
movl $0xbd8, %edx            # imm = 0xBD8
callq 0xb210
movq -0x18(%rbp), %rdi
movl 0x4a6d7(%rip), %eax     # 0xa4160
addl $0x1, %eax
movl %eax, %eax
imulq $0xbd8, %rax, %rax      # imm = 0xBD8
addq %rax, %rdi
callq 0x54670
testb $0x1, %al
jne 0x59aa3
jmp 0x59ab5
movq -0x18(%rbp), %rdi
callq 0x19280
movb $0x1, -0x1(%rbp)
jmp 0x59b65
movq -0x18(%rbp), %rsi
movl 0x4a6a1(%rip), %eax     # 0xa4160
imulq $0xbd8, %rax, %rax      # imm = 0xBD8
addq %rax, %rsi
leaq -0xbf0(%rbp), %rdi
movl $0xbd8, %edx            # imm = 0xBD8
callq 0xb310
movq -0x18(%rbp), %rdi
movl 0x4a67c(%rip), %eax     # 0xa4160
imulq $0xbd8, %rax, %rax      # imm = 0xBD8
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movl 0x4a668(%rip), %eax     # 0xa4160
addl $0x1, %eax
movl %eax, %eax
imulq $0xbd8, %rax, %rax      # imm = 0xBD8
addq %rax, %rsi
movl $0xbd8, %edx            # imm = 0xBD8
callq 0xb310
movq -0x18(%rbp), %rdi
movl 0x4a645(%rip), %eax     # 0xa4160
addl $0x1, %eax
movl %eax, %eax
imulq $0xbd8, %rax, %rax      # imm = 0xBD8
addq %rax, %rdi
leaq -0xbf0(%rbp), %rsi
movl $0xbd8, %edx            # imm = 0xBD8
callq 0xb310
movq 0x4a626(%rip), %rdi     # 0xa4168
callq 0x19280
movq -0x18(%rbp), %rax
movq %rax, 0x4a616(%rip)     # 0xa4168
movl 0x4a608(%rip), %eax     # 0xa4160
addl $0x1, %eax
movl %eax, 0x4a5ff(%rip)     # 0xa4160
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xbf0, %rsp            # imm = 0xBF0
popq %rbp
retq
nopw %cs:(%rax,%rax)