// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/kernel.c
// Function: join_rest_beh
static
BEH_DECL(join_rest_beh)
{
	CONS* state = MINE;
	CONS* cust;
	CONS* k_rest;
	CONS* first;
	CONS* msg = WHAT;

	DBUG_ENTER("join_rest_beh");
	assert(is_pr(state));
	cust = hd(state);
	assert(actorp(cust));
	assert(is_pr(tl(state)));
	k_rest = hd(tl(state));
	first = tl(tl(state));

	if (is_pr(msg)
	&& (hd(msg) == k_rest)) {
		CONS* rest = tl(msg);

		DBUG_PRINT("first", ("%s", cons_to_str(first)));
		DBUG_PRINT("rest", ("%s", cons_to_str(rest)));
		SEND(cust, pr(first, rest));
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x191fb
movq %rax, %rdi
callq 0x1175b
movq %rax, %r12
movq 0x30(%rbx), %rdi
callq 0x19306
movq %rax, %r15
leaq 0x14f28(%rip), %rax     # 0x1c6d2
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x1cb79(%rip), %rbp     # 0x24330
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x140, 0xc(%rdi)       # imm = 0x140
leaq 0x14b77(%rip), %rcx     # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x1c972(%rip), %rcx     # 0x24150
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b079
cmpq 0x1c7ce(%rip), %r12     # 0x23fc0
je 0x79c9
testq %r12, %r12
je 0x79c9
movl %r12d, %eax
andl $0x3, %eax
jne 0x79c9
movq %r12, %rdi
callq 0x191fb
movq %rax, %r14
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x79e8
movq %r12, %rdi
callq 0x19306
testq %rax, %rax
je 0x79aa
movq %r12, %rdi
callq 0x19306
testb $0x3, %al
jne 0x79aa
movq %r12, %rdi
callq 0x19306
cmpq 0x1c76c(%rip), %rax     # 0x23fc0
je 0x79aa
movq %r12, %rdi
callq 0x19306
andl $0x3, %eax
cmpl $0x1, %eax
je 0x79aa
movq %r12, %rdi
callq 0x19306
movq %rax, %rdi
callq 0x191fb
movq %rax, %r13
movq %r12, %rdi
callq 0x19306
movq %rax, %rdi
callq 0x19306
cmpq 0x1c728(%rip), %r15     # 0x23fc0
je 0x798c
testq %r15, %r15
je 0x798c
movq %rax, %r12
movl %r15d, %eax
andl $0x3, %eax
jne 0x798c
movq %r15, %rdi
callq 0x191fb
cmpq %r13, %rax
jne 0x798c
movq %r15, %rdi
callq 0x19306
movq %rax, %r15
leaq 0x1d057(%rip), %r13     # 0x24930
cmpl $0x0, (%r13)
je 0x7973
movq (%rbp), %rax
movq 0x50(%rax), %rax
leaq 0x14e0a(%rip), %rdi     # 0x1c6fd
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x7928
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x14c, 0xc(%rax)       # imm = 0x14C
movq %r12, %rdi
callq 0x13708
leaq 0x15c16(%rip), %rdi     # 0x1d534
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
cmpl $0x0, (%r13)
je 0x7973
movq (%rbp), %rax
movq 0x50(%rax), %rax
leaq 0x14dc5(%rip), %rdi     # 0x1c703
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x7973
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x14d, 0xc(%rax)       # imm = 0x14D
movq %r15, %rdi
callq 0x13708
leaq 0x15bcb(%rip), %rdi     # 0x1d534
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
movq %r12, %rdi
movq %r15, %rsi
callq 0x19164
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12494
movq %rsp, %rdi
movl $0x150, 0xc(%rdi)       # imm = 0x150
callq 0x1b1f2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14cab(%rip), %rdi     # 0x1c65c
leaq 0x14664(%rip), %rsi     # 0x1c01c
leaq 0x14d21(%rip), %rcx     # 0x1c6e0
movl $0x144, %edx            # imm = 0x144
callq 0x2100
leaq 0x14c5a(%rip), %rdi     # 0x1c62a
leaq 0x14645(%rip), %rsi     # 0x1c01c
leaq 0x14d02(%rip), %rcx     # 0x1c6e0
movl $0x141, %edx            # imm = 0x141
callq 0x2100
leaq 0x14c60(%rip), %rdi     # 0x1c64f
leaq 0x14626(%rip), %rsi     # 0x1c01c
leaq 0x14ce3(%rip), %rcx     # 0x1c6e0
movl $0x143, %edx            # imm = 0x143
callq 0x2100