// File: /workspace/github_c_makefile_star2_O3/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 0xaa3a(%rip), %rax      # 0x1cfb9
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x10da4(%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 0x9da3(%rip), %rcx      # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x10bf6(%rip), %rcx     # 0x231a8
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1ba26
movq 0x20(%rbx), %r15
leaq 0x11366(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
je 0x12610
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x9d6d(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x12610
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x106, 0xc(%rax)       # imm = 0x106
movq %r15, %rdi
callq 0x19fab
leaq 0xa9c3(%rip), %rdi      # 0x1cfca
movl %eax, %esi
xorl %eax, %eax
callq 0x1ba97
movq %rbx, %rdi
callq 0x19c72
cmpq 0x109a1(%rip), %rax     # 0x22fc0
je 0x12678
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x10c73(%rip), %r14     # 0x232a0
movq %r12, %rdi
callq 0x19c72
movq %rax, %r13
movq %rax, %rdi
callq 0x19d11
movq %rax, %rdi
movq %r15, %rsi
callq 0x19c50
movq %rax, %r15
movq %r13, %rdi
callq 0x19c72
movq %rax, %rdi
movq %r15, %rsi
callq 0x19c50
movq %rax, %r15
movq %r12, %rdi
callq 0x19d11
movq %rax, %r12
incl %ebp
cmpq %r14, %rax
jne 0x1262d
jmp 0x1267a
xorl %ebp, %ebp
leaq 0x112af(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
leaq 0x10ca5(%rip), %r14     # 0x23330
je 0x126c9
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x9caf(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x126c9
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x111, 0xc(%rax)       # imm = 0x111
movl 0x28(%rbx), %edx
leaq 0xa91d(%rip), %rdi      # 0x1cfdd
movl %ebp, %esi
xorl %eax, %eax
callq 0x1ba97
cmpl 0x28(%rbx), %ebp
jne 0x127ae
movq 0x60(%rbx), %r12
xorl %ebp, %ebp
cmpq 0x108e1(%rip), %r12     # 0x22fc0
je 0x12739
leaq 0x10bb8(%rip), %r14     # 0x232a0
movq %r12, %rdi
callq 0x19c72
movq %rax, %rdi
callq 0x19d11
movq %rax, %r13
movq %rax, %rdi
callq 0x19d11
movq %rax, %rdi
movq %r15, %rsi
callq 0x19c50
movq %rax, %r15
movq %r13, %rdi
callq 0x19c72
movq %rax, %rdi
movq %r15, %rsi
callq 0x19c50
movq %rax, %r15
movq %r12, %rdi
callq 0x19d11
movq %rax, %r12
incl %ebp
cmpq %r14, %rax
jne 0x126e8
leaq 0x111f0(%rip), %rax     # 0x23930
cmpl $0x0, (%rax)
leaq 0x10be6(%rip), %r14     # 0x23330
je 0x12788
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x9bf0(%rip), %rdi      # 0x1c34a
movq %rdi, 0x10(%rax)
callq 0x1b188
testl %eax, %eax
je 0x12788
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x11d, 0xc(%rax)       # imm = 0x11D
movl 0x68(%rbx), %edx
leaq 0xa8a1(%rip), %rdi      # 0x1d020
movl %ebp, %esi
xorl %eax, %eax
callq 0x1ba97
cmpl 0x68(%rbx), %ebp
jne 0x127cd
movq %rsp, %rdi
movl $0x11f, 0xc(%rdi)       # imm = 0x11F
callq 0x1bbab
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa838(%rip), %rdi      # 0x1cfed
leaq 0xa41c(%rip), %rsi      # 0x1cbd8
leaq 0xa83c(%rip), %rcx      # 0x1cfff
movl $0x112, %edx            # imm = 0x112
callq 0x2100
leaq 0xa85c(%rip), %rdi      # 0x1d030
leaq 0xa3fd(%rip), %rsi      # 0x1cbd8
leaq 0xa81d(%rip), %rcx      # 0x1cfff
movl $0x11e, %edx            # imm = 0x11E
callq 0x2100