// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/gc.c
// Function: gc_allocate_cells
static void
gc_allocate_cells(CELL* list_head)
/* allocate a new block of free cells */
{
	size_t n;
	CELL* p;
	char* tag;

	DBUG_ENTER("gc_alloc_cells");
	gc_initialize();
	tag = ((list_head == GC_FREE_LIST) ? "free" : "permanent");
#if 1
	n = ((1 << 12) / sizeof(CELL));		/* 4Kb allocation */
#else
	n = ((1 << 8) / sizeof(CELL));		/* 256b allocation */
#endif
	p = NEWxN(CELL, n + 1);
	p = as_cell((as_word(p) + (sizeof(CELL) >> 1)) & ~(sizeof(CELL) - 1));
	DBUG_PRINT("gc", ("%u %s cells allocated starting at %p", n, tag, p));
	while (n > 0) {
		--n;
		GC_SET_MARK(p, GC_PHASE_Z);
		gc_put(list_head, p);
		++p;
	}
	DBUG_PRINT("gc", ("%u cells available in %s list", GC_SIZE(list_head), tag));
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x7e07(%rip), %rax      # 0x2b11a
movq %rax, -0x48(%rbp)
leaq 0xc002(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movl $0x155, -0x3c(%rbp)     # imm = 0x155
leaq 0x6036(%rip), %rax      # 0x2936f
movq %rax, -0x38(%rbp)
leaq 0xbf2c(%rip), %rax      # 0x2f270
movq %rax, -0x30(%rbp)
leaq 0xbfd1(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x28490
callq 0x250c0
movq -0x8(%rbp), %rdx
leaq 0xbebd(%rip), %rsi      # 0x2f230
leaq 0x7daf(%rip), %rax      # 0x2b129
leaq 0x6d01(%rip), %rcx      # 0x2a082
cmpq %rsi, %rdx
cmoveq %rcx, %rax
movq %rax, -0x20(%rbp)
movq $0x80, -0x10(%rbp)
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl $0x20, %edi
callq 0x2150
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
andq $-0x20, %rax
movq %rax, -0x18(%rbp)
leaq 0xc55f(%rip), %rax      # 0x2f920
cmpl $0x0, (%rax)
je 0x2341f
leaq 0xbf53(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x692e(%rip), %rcx      # 0x29d09
movq %rcx, 0x10(%rax)
leaq 0x6923(%rip), %rdi      # 0x29d09
callq 0x278a0
cmpl $0x0, %eax
je 0x2341f
leaq 0xbf29(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x15f, 0xc(%rax)       # imm = 0x15F
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0x7d1b(%rip), %rdi      # 0x2b133
movb $0x0, %al
callq 0x28540
jmp 0x23421
jmp 0x23423
cmpq $0x0, -0x10(%rbp)
jbe 0x2346c
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
andq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
orq $0x0, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x227e0
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0x23423
jmp 0x2346e
leaq 0xc4ab(%rip), %rax      # 0x2f920
cmpl $0x0, (%rax)
je 0x234d2
leaq 0xbe9f(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x687a(%rip), %rcx      # 0x29d09
movq %rcx, 0x10(%rax)
leaq 0x686f(%rip), %rdi      # 0x29d09
callq 0x278a0
cmpl $0x0, %eax
je 0x234d2
leaq 0xbe75(%rip), %rax      # 0x2f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x166, 0xc(%rax)       # imm = 0x166
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
leaq 0x7c8d(%rip), %rdi      # 0x2b158
movb $0x0, %al
callq 0x28540
jmp 0x234d4
movl $0x167, -0x3c(%rbp)     # imm = 0x167
leaq -0x48(%rbp), %rdi
callq 0x28660
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)