// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/schemer.c
// Function: eval_beh
BEH_DECL(eval_beh)
{
	CONS* p;
	CONS* state;
	CONS* msg;
	CONS* a;

	DBUG_ENTER("eval_beh");
	if (is_pair(WHAT) && is_pair(p = pr_tail(WHAT))) {
		CONS* to = pr_head(WHAT);
		CONS* expr = pr_head(p);
		CONS* env = pr_tail(p);

		DBUG_PRINT("", ("expr = %s", cons_to_str(expr)));
		if (is_const(expr)) {
			DBUG_PRINT("", ("constant"));
			SEND(to, expr);
		} else if (is_actor(expr)) {
			DBUG_PRINT("", ("actor"));
			SEND(to, expr);
		} else if (is_symbol(expr)) {
			DBUG_PRINT("", ("symbol"));
			msg = mk_empty();
			msg = mk_list(expr, msg);
			msg = mk_list(ATOM("get"), msg);
			msg = mk_pair(msg, env);
			msg = mk_pair(to, msg);
			SEND(env, msg);
		} else if (is_pair(expr)) {
			DBUG_PRINT("", ("combination"));
			state = mk_pair(pr_tail(expr), env);
			state = mk_pair(to, state);
			a = ACTOR(apply_beh, state);
			msg = mk_pair(pr_head(expr), env);
			msg = mk_pair(a, msg);
			SEND(SELF, msg);
		} else {
			DBUG_PRINT("", ("unknown"));
			msg = mk_list(expr, mk_empty());
			msg = mk_list(ATOM("unknown-expr"), msg);
			FAIL(env, msg);
		}
	} else {
		DBUG_PRINT("", ("Ignored! %s", cons_to_str(WHAT)));
		abort();
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x12f3a(%rip), %rax     # 0x1739e
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x19ead(%rip), %r12     # 0x1e320
movq (%r12), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x2a0, 0xc(%rdi)       # imm = 0x2A0
leaq 0x1552d(%rip), %r13     # 0x199bc
movq %r13, 0x10(%rdi)
leaq 0x19ca6(%rip), %rcx     # 0x1e140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x16679
movq 0x30(%rbx), %rdi
callq 0x14906
testq %rax, %rax
je 0x48bd
movq 0x30(%rbx), %rdi
callq 0x14906
testb $0x3, %al
jne 0x48bd
movq 0x30(%rbx), %rdi
callq 0x14906
cmpq 0x19ae6(%rip), %rax     # 0x1dfc0
je 0x48bd
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x14906
testq %rax, %rax
je 0x48bd
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x14906
testb $0x3, %al
jne 0x48bd
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x14906
cmpq 0x19a95(%rip), %rax     # 0x1dfc0
je 0x48bd
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x147fb
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x147fb
movq %rax, %rbp
movq %r14, %rdi
callq 0x14906
movq %rax, 0x8(%rsp)
leaq 0x1a388(%rip), %r14     # 0x1e8f0
cmpl $0x0, (%r14)
je 0x45ae
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x15df4
testl %eax, %eax
je 0x45ae
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2a6, 0xc(%rax)       # imm = 0x2A6
movq %rbp, %rdi
callq 0xed08
leaq 0x12b48(%rip), %rdi     # 0x170ec
movq %rax, %rsi
xorl %eax, %eax
callq 0x166f0
cmpq 0x19a0b(%rip), %rbp     # 0x1dfc0
je 0x4631
movl %ebp, %r15d
andl $0x3, %r15d
cmpq $0x3, %r15
je 0x4631
pushq $0x1
popq %rdi
callq 0x38f6
cmpq %rax, %rbp
je 0x4631
xorl %edi, %edi
callq 0x38f6
cmpq %rax, %rbp
je 0x4631
callq 0xccde
cmpq %rax, %rbp
je 0x4631
cmpl $0x2, %r15d
je 0x469b
cmpl $0x1, %r15d
jne 0x4739
cmpl $0x0, (%r14)
je 0x466c
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x15df4
testl %eax, %eax
je 0x466c
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2ab, 0xc(%rax)       # imm = 0x2AB
leaq 0x1484b(%rip), %rdi     # 0x18e7a
jmp 0x4665
cmpl $0x0, (%r14)
je 0x466c
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x15df4
testl %eax, %eax
je 0x466c
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2a8, 0xc(%rax)       # imm = 0x2A8
leaq 0x12b97(%rip), %rdi     # 0x171fc
xorl %eax, %eax
callq 0x166f0
movq %rbx, %rdi
movq (%rsp), %rsi
movq %rbp, %rdx
callq 0xda94
leaq 0x10(%rsp), %rdi
movl $0x2c7, 0xc(%rdi)       # imm = 0x2C7
callq 0x167f2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x38f6
cmpq %rax, %rbp
je 0x47ee
xorl %edi, %edi
callq 0x38f6
cmpq %rax, %rbp
je 0x47ee
cmpl $0x0, (%r14)
je 0x46f7
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x15df4
testl %eax, %eax
je 0x46f7
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2ae, 0xc(%rax)       # imm = 0x2AE
leaq 0x12a16(%rip), %rdi     # 0x17106
xorl %eax, %eax
callq 0x166f0
leaq 0x19b92(%rip), %rsi     # 0x1e290
movq %rbp, %rdi
callq 0x14764
movq %rax, %r15
leaq 0x1297a(%rip), %rdi     # 0x1708a
callq 0x11f1f
movq %rax, %rdi
movq %r15, %rsi
callq 0x14764
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x14764
movq (%rsp), %rdi
jmp 0x48a7
testq %rbp, %rbp
je 0x47ee
cmpl $0x0, (%r14)
je 0x477d
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x15df4
testl %eax, %eax
je 0x477d
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2b6, 0xc(%rax)       # imm = 0x2B6
leaq 0x12a8f(%rip), %rdi     # 0x17205
xorl %eax, %eax
callq 0x166f0
movq %rbp, %rdi
callq 0x14906
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x14764
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x14764
leaq -0x1fcc(%rip), %rsi     # 0x27dc
movq %rbx, %rdi
movq %rax, %rdx
callq 0xd9b7
movq %rax, %r12
movq %rbp, %rdi
callq 0x147fb
movq %rax, %rdi
movq %r14, %rsi
callq 0x14764
movq %r12, %rdi
movq %rax, %rsi
callq 0x14764
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x147fb
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
jmp 0x4676
cmpl $0x0, (%r14)
je 0x4829
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x15df4
testl %eax, %eax
je 0x4829
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2be, 0xc(%rax)       # imm = 0x2BE
leaq 0x128d4(%rip), %rdi     # 0x170f6
xorl %eax, %eax
callq 0x166f0
leaq 0x19a60(%rip), %r12     # 0x1e290
movq %rbp, %rdi
movq %r12, %rsi
callq 0x14764
movq %rax, %r15
leaq 0x129cc(%rip), %rdi     # 0x17211
callq 0x11f1f
movq %rax, %rdi
movq %r15, %rsi
callq 0x14764
leaq -0x2184(%rip), %rsi     # 0x26d8
movq %rbx, %rdi
movq %rax, %rdx
callq 0xd9b7
movq %rax, %r15
leaq 0x12819(%rip), %rdi     # 0x1708a
callq 0x11f1f
movq %rax, %r13
callq 0xccde
movq %rax, %rdi
movq %r12, %rsi
callq 0x14764
movq %r13, %rdi
movq %rax, %rsi
callq 0x14764
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x14764
movq %r15, %rdi
movq %rax, %rsi
callq 0x14764
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
jmp 0x4676
leaq 0x1a02c(%rip), %rax     # 0x1e8f0
cmpl $0x0, (%rax)
je 0x4912
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x15df4
testl %eax, %eax
je 0x4912
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2c4, 0xc(%rax)       # imm = 0x2C4
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0xed08
leaq 0x12758(%rip), %rdi     # 0x17060
movq %rax, %rsi
xorl %eax, %eax
callq 0x166f0
callq 0x2050