// File: /workspace/github_c_makefile_star2_O2/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 0xaf2a(%rip), %rax      # 0x1cfb9
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x12294(%rip), %r14     # 0x24330
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x104, 0xc(%rdi)       # imm = 0x104
leaq 0xa293(%rip), %rcx      # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x120e6(%rip), %rcx     # 0x241a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b079
movq 0x20(%rbx), %r15
leaq 0x12856(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
je 0x12120
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0xa25d(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x12120
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x106, 0xc(%rax)       # imm = 0x106
movq %r15, %rdi
callq 0x19600
leaq 0xaeb3(%rip), %rdi      # 0x1cfca
movl %eax, %esi
xorl %eax, %eax
callq 0x1b0f0
movq %rbx, %rdi
callq 0x191fb
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x1216c(%rip), %r14     # 0x242a0
cmpq %r14, %r12
je 0x1217f
movq %r12, %rdi
callq 0x191fb
movq %rax, %r13
movq %rax, %rdi
callq 0x19306
movq %rax, %rdi
movq %r15, %rsi
callq 0x19164
movq %rax, %r15
movq %r13, %rdi
callq 0x191fb
movq %rax, %rdi
movq %r15, %rsi
callq 0x19164
movq %rax, %r15
movq %r12, %rdi
callq 0x19306
movq %rax, %r12
incl %ebp
jmp 0x12134
leaq 0x127aa(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
leaq 0x121a0(%rip), %r12     # 0x24330
je 0x121d0
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0xa1a9(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x121d0
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x111, 0xc(%rax)       # imm = 0x111
movl 0x28(%rbx), %edx
leaq 0xae16(%rip), %rdi      # 0x1cfdd
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b0f0
cmpl %ebp, 0x28(%rbx)
jne 0x122a7
movq 0x60(%rbx), %r12
xorl %ebp, %ebp
cmpq %r14, %r12
je 0x12232
movq %r12, %rdi
callq 0x191fb
movq %rax, %rdi
callq 0x19306
movq %rax, %r13
movq %rax, %rdi
callq 0x19306
movq %rax, %rdi
movq %r15, %rsi
callq 0x19164
movq %rax, %r15
movq %r13, %rdi
callq 0x191fb
movq %rax, %rdi
movq %r15, %rsi
callq 0x19164
movq %rax, %r15
movq %r12, %rdi
callq 0x19306
movq %rax, %r12
incl %ebp
jmp 0x121df
leaq 0x126f7(%rip), %rax     # 0x24930
cmpl $0x0, (%rax)
leaq 0x120ed(%rip), %r14     # 0x24330
je 0x12281
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0xa0f7(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x12281
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x11d, 0xc(%rax)       # imm = 0x11D
movl 0x68(%rbx), %edx
leaq 0xada8(%rip), %rdi      # 0x1d020
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b0f0
cmpl %ebp, 0x68(%rbx)
jne 0x122c6
movq %rsp, %rdi
movl $0x11f, 0xc(%rdi)       # imm = 0x11F
callq 0x1b1f2
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xad3f(%rip), %rdi      # 0x1cfed
leaq 0xa923(%rip), %rsi      # 0x1cbd8
leaq 0xad43(%rip), %rcx      # 0x1cfff
movl $0x112, %edx            # imm = 0x112
callq 0x2100
leaq 0xad63(%rip), %rdi      # 0x1d030
leaq 0xa904(%rip), %rsi      # 0x1cbd8
leaq 0xad24(%rip), %rcx      # 0x1cfff
movl $0x11e, %edx            # imm = 0x11E
callq 0x2100