// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/actor.c
// Function: cfg_gather_roots
static CONS*
cfg_gather_roots(CONFIG* cfg)
{
	CONS* root;
	CONS* node;
	CONS* entry;
	int n;

	DBUG_ENTER("cfg_gather_roots");
	root = cfg->gc_root;
	DBUG_PRINT("", ("length(gc_root)=%d", length(root)));
	/* protect pending messages */
	n = 0;
	node = CQ_PEEK(CONFIG_QUEUE(cfg));
	while (!nilp(node)) {
		entry = car(node);					/* entry is a permanent cell */
		root = cons(cdr(entry), root);		/* add message to root list */
		root = cons(car(entry), root);		/* add actor to root list */
		node = cdr(node);
		++n;
	}
	DBUG_PRINT("", ("n=%d q_count=%d", n, cfg->q_count));
	assert(n == cfg->q_count);
	/* protect delayed messages */
	n = 0;
	node = cfg->t_queue;
	while (!nilp(node)) {
		entry = cdr(car(node));				/* entry is a permanent cell */
		root = cons(cdr(entry), root);		/* add message to root list */
		root = cons(car(entry), root);		/* add actor to root list */
		node = cdr(node);
		++n;
	}
	DBUG_PRINT("", ("n=%d t_count=%d", n, cfg->t_count));
	assert(n == cfg->t_count);
	DBUG_RETURN root;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0xaabe(%rip), %rax      # 0x1cfb9
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x10e28(%rip), %r14     # 0x23330
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x104, 0xc(%rdi)       # imm = 0x104
leaq 0x9e27(%rip), %rcx      # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x10c7a(%rip), %rcx     # 0x231a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b912
movq 0x20(%rbx), %r15
leaq 0x113ea(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x1258c
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x9df1(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x1258c
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x106, 0xc(%rax)       # imm = 0x106
movq %r15, %rdi
callq 0x19edf
leaq 0xaa47(%rip), %rdi      # 0x1cfca
movl %eax, %esi
xorl %eax, %eax
callq 0x1b983
movq %rbx, %rdi
callq 0x19ba6
cmpq 0x10a25(%rip), %rax     # 0x22fc0
je 0x125f4
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x10cf7(%rip), %r14     # 0x232a0
movq %r12, %rdi
callq 0x19ba6
movq %rax, %r13
movq %rax, %rdi
callq 0x19c45
movq %rax, %rdi
movq %r15, %rsi
callq 0x19b84
movq %rax, %r15
movq %r13, %rdi
callq 0x19ba6
movq %rax, %rdi
movq %r15, %rsi
callq 0x19b84
movq %rax, %r15
movq %r12, %rdi
callq 0x19c45
movq %rax, %r12
incl %ebp
cmpq %r14, %rax
jne 0x125a9
jmp 0x125f6
xorl %ebp, %ebp
leaq 0x11333(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
leaq 0x10d29(%rip), %r14     # 0x23330
je 0x12645
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x9d33(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x12645
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x111, 0xc(%rax)       # imm = 0x111
movl 0x28(%rbx), %edx
leaq 0xa9a1(%rip), %rdi      # 0x1cfdd
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b983
cmpl 0x28(%rbx), %ebp
jne 0x1272a
movq 0x60(%rbx), %r12
xorl %ebp, %ebp
cmpq 0x10965(%rip), %r12     # 0x22fc0
je 0x126b5
leaq 0x10c3c(%rip), %r14     # 0x232a0
movq %r12, %rdi
callq 0x19ba6
movq %rax, %rdi
callq 0x19c45
movq %rax, %r13
movq %rax, %rdi
callq 0x19c45
movq %rax, %rdi
movq %r15, %rsi
callq 0x19b84
movq %rax, %r15
movq %r13, %rdi
callq 0x19ba6
movq %rax, %rdi
movq %r15, %rsi
callq 0x19b84
movq %rax, %r15
movq %r12, %rdi
callq 0x19c45
movq %rax, %r12
incl %ebp
cmpq %r14, %rax
jne 0x12664
leaq 0x11274(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
leaq 0x10c6a(%rip), %r14     # 0x23330
je 0x12704
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x9c74(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x12704
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x11d, 0xc(%rax)       # imm = 0x11D
movl 0x68(%rbx), %edx
leaq 0xa925(%rip), %rdi      # 0x1d020
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b983
cmpl 0x68(%rbx), %ebp
jne 0x12749
movq %rsp, %rdi
movl $0x11f, 0xc(%rdi)       # imm = 0x11F
callq 0x1ba97
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa8bc(%rip), %rdi      # 0x1cfed
leaq 0xa4a0(%rip), %rsi      # 0x1cbd8
leaq 0xa8c0(%rip), %rcx      # 0x1cfff
movl $0x112, %edx            # imm = 0x112
callq 0x2100
leaq 0xa8e0(%rip), %rdi      # 0x1d030
leaq 0xa481(%rip), %rsi      # 0x1cbd8
leaq 0xa8a1(%rip), %rcx      # 0x1cfff
movl $0x11e, %edx            # imm = 0x11E
callq 0x2100