// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/kernel.c
// Function: join_first_beh
static
BEH_DECL(join_first_beh)
{
	CONS* state = MINE;
	CONS* cust;
	CONS* k_first;
	CONS* rest;
	CONS* msg = WHAT;

	DBUG_ENTER("join_first_beh");
	assert(is_pr(state));
	cust = hd(state);
	assert(actorp(cust));
	assert(is_pr(tl(state)));
	k_first = hd(tl(state));
	rest = tl(tl(state));

	if (is_pr(msg)
	&& (hd(msg) == k_first)) {
		CONS* first = 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 0x19ba6
movq %rax, %rdi
callq 0x11d11
movq %rax, %r12
movq 0x30(%rbx), %rdi
callq 0x19c45
movq %rax, %r15
leaq 0x14691(%rip), %rax     # 0x1c708
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x1b2ac(%rip), %rbp     # 0x23330
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x160, 0xc(%rdi)       # imm = 0x160
leaq 0x142aa(%rip), %rcx     # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x1b0a5(%rip), %rcx     # 0x23150
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b912
cmpq 0x1af01(%rip), %r12     # 0x22fc0
je 0x8292
testq %r12, %r12
je 0x8292
movl %r12d, %eax
andl $0x3, %eax
jne 0x8292
movq %r12, %rdi
callq 0x19ba6
movq %rax, %r14
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x82b1
movq %r12, %rdi
callq 0x19c45
testq %rax, %rax
je 0x8273
movq %r12, %rdi
callq 0x19c45
testb $0x3, %al
jne 0x8273
movq %r12, %rdi
callq 0x19c45
cmpq 0x1ae9f(%rip), %rax     # 0x22fc0
je 0x8273
movq %r12, %rdi
callq 0x19c45
andl $0x3, %eax
cmpl $0x1, %eax
je 0x8273
movq %r12, %rdi
callq 0x19c45
movq %rax, %rdi
callq 0x19ba6
movq %rax, %r13
movq %r12, %rdi
callq 0x19c45
movq %rax, %rdi
callq 0x19c45
cmpq 0x1ae5b(%rip), %r15     # 0x22fc0
je 0x8255
testq %r15, %r15
je 0x8255
movq %rax, %r12
movl %r15d, %eax
andl $0x3, %eax
jne 0x8255
movq %r15, %rdi
callq 0x19ba6
cmpq %r13, %rax
jne 0x8255
movq %r15, %rdi
callq 0x19c45
movq %rax, %r15
leaq 0x1b78a(%rip), %r13     # 0x23930
cmpl $0x0, (%r13)
je 0x81f1
movq (%rbp), %rax
movq 0x50(%rax), %rax
leaq 0x14541(%rip), %rdi     # 0x1c6fd
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x81f1
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x16c, 0xc(%rax)       # imm = 0x16C
movq %r15, %rdi
callq 0x13b9c
leaq 0x1536d(%rip), %rdi     # 0x1d554
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
cmpl $0x0, (%r13)
je 0x823c
movq (%rbp), %rax
movq 0x50(%rax), %rax
leaq 0x144fc(%rip), %rdi     # 0x1c703
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x823c
movq (%rbp), %rax
movq 0x50(%rax), %rax
movl $0x16d, 0xc(%rax)       # imm = 0x16D
movq %r12, %rdi
callq 0x13b9c
leaq 0x15322(%rip), %rdi     # 0x1d554
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
movq %r15, %rdi
movq %r12, %rsi
callq 0x19b84
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12917
movq %rsp, %rdi
movl $0x170, 0xc(%rdi)       # imm = 0x170
callq 0x1ba97
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x143e2(%rip), %rdi     # 0x1c65c
leaq 0x13d9b(%rip), %rsi     # 0x1c01c
leaq 0x1448f(%rip), %rcx     # 0x1c717
movl $0x164, %edx            # imm = 0x164
callq 0x2100
leaq 0x14391(%rip), %rdi     # 0x1c62a
leaq 0x13d7c(%rip), %rsi     # 0x1c01c
leaq 0x14470(%rip), %rcx     # 0x1c717
movl $0x161, %edx            # imm = 0x161
callq 0x2100
leaq 0x14397(%rip), %rdi     # 0x1c64f
leaq 0x13d5d(%rip), %rsi     # 0x1c01c
leaq 0x14451(%rip), %rcx     # 0x1c717
movl $0x163, %edx            # imm = 0x163
callq 0x2100