// File: /workspace/github_c_makefile_star2_O3/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 0x13b96(%rip), %rax     # 0x1839e
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1ab09(%rip), %r12     # 0x1f320
movq (%r12), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x2a0, 0xc(%rdi)       # imm = 0x2A0
leaq 0x161ad(%rip), %r13     # 0x1a9e0
movq %r13, 0x10(%rdi)
leaq 0x1a902(%rip), %rcx     # 0x1f140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x16ea2
movq 0x30(%rbx), %rdi
callq 0x1518d
testq %rax, %rax
je 0x4c65
movq 0x30(%rbx), %rdi
callq 0x1518d
testb $0x3, %al
jne 0x4c65
movq 0x30(%rbx), %rdi
callq 0x1518d
cmpq 0x1a742(%rip), %rax     # 0x1efc0
je 0x4c65
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x1518d
testq %rax, %rax
je 0x4c65
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x1518d
testb $0x3, %al
jne 0x4c65
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x1518d
cmpq 0x1a6f1(%rip), %rax     # 0x1efc0
je 0x4c65
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x150ee
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x150ee
movq %rax, %rbp
movq %r14, %rdi
callq 0x1518d
movq %rax, 0x8(%rsp)
leaq 0x1afe4(%rip), %r14     # 0x1f8f0
cmpl $0x0, (%r14)
je 0x4952
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x16604
testl %eax, %eax
je 0x4952
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2a6, 0xc(%rax)       # imm = 0x2A6
movq %rbp, %rdi
callq 0xf0bc
leaq 0x137a4(%rip), %rdi     # 0x180ec
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f13
cmpq 0x1a667(%rip), %rbp     # 0x1efc0
je 0x49d7
movl %ebp, %r15d
andl $0x3, %r15d
cmpq $0x3, %r15
je 0x49d7
movl $0x1, %edi
callq 0x3c98
cmpq %rax, %rbp
je 0x49d7
xorl %edi, %edi
callq 0x3c98
cmpq %rax, %rbp
je 0x49d7
callq 0xd160
cmpq %rax, %rbp
je 0x49d7
cmpl $0x2, %r15d
je 0x4a41
cmpl $0x1, %r15d
jne 0x4ae1
cmpl $0x0, (%r14)
je 0x4a12
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x16604
testl %eax, %eax
je 0x4a12
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2ab, 0xc(%rax)       # imm = 0x2AB
leaq 0x154c9(%rip), %rdi     # 0x19e9e
jmp 0x4a0b
cmpl $0x0, (%r14)
je 0x4a12
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x16604
testl %eax, %eax
je 0x4a12
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2a8, 0xc(%rax)       # imm = 0x2A8
leaq 0x137f1(%rip), %rdi     # 0x181fc
xorl %eax, %eax
callq 0x16f13
movq %rbx, %rdi
movq (%rsp), %rsi
movq %rbp, %rdx
callq 0xde17
leaq 0x10(%rsp), %rdi
movl $0x2c7, 0xc(%rdi)       # imm = 0x2C7
callq 0x17027
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x3c98
cmpq %rax, %rbp
je 0x4b96
xorl %edi, %edi
callq 0x3c98
cmpq %rax, %rbp
je 0x4b96
cmpl $0x0, (%r14)
je 0x4a9f
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x16604
testl %eax, %eax
je 0x4a9f
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2ae, 0xc(%rax)       # imm = 0x2AE
leaq 0x1366e(%rip), %rdi     # 0x18106
xorl %eax, %eax
callq 0x16f13
leaq 0x1a7ea(%rip), %rsi     # 0x1f290
movq %rbp, %rdi
callq 0x150cc
movq %rax, %r15
leaq 0x135d2(%rip), %rdi     # 0x1808a
callq 0x1257b
movq %rax, %rdi
movq %r15, %rsi
callq 0x150cc
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x150cc
movq (%rsp), %rdi
jmp 0x4c4f
testq %rbp, %rbp
je 0x4b96
cmpl $0x0, (%r14)
je 0x4b25
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x16604
testl %eax, %eax
je 0x4b25
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2b6, 0xc(%rax)       # imm = 0x2B6
leaq 0x136e7(%rip), %rdi     # 0x18205
xorl %eax, %eax
callq 0x16f13
movq %rbp, %rdi
callq 0x1518d
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x150cc
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x150cc
leaq -0x1fd4(%rip), %rsi     # 0x2b7c
movq %rbx, %rdi
movq %rax, %rdx
callq 0xdd3a
movq %rax, %r12
movq %rbp, %rdi
callq 0x150ee
movq %rax, %rdi
movq %r14, %rsi
callq 0x150cc
movq %r12, %rdi
movq %rax, %rsi
callq 0x150cc
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x150ee
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
jmp 0x4a1c
cmpl $0x0, (%r14)
je 0x4bd1
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x16604
testl %eax, %eax
je 0x4bd1
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2be, 0xc(%rax)       # imm = 0x2BE
leaq 0x1352c(%rip), %rdi     # 0x180f6
xorl %eax, %eax
callq 0x16f13
leaq 0x1a6b8(%rip), %r12     # 0x1f290
movq %rbp, %rdi
movq %r12, %rsi
callq 0x150cc
movq %rax, %r15
leaq 0x13624(%rip), %rdi     # 0x18211
callq 0x1257b
movq %rax, %rdi
movq %r15, %rsi
callq 0x150cc
leaq -0x218c(%rip), %rsi     # 0x2a78
movq %rbx, %rdi
movq %rax, %rdx
callq 0xdd3a
movq %rax, %r15
leaq 0x13471(%rip), %rdi     # 0x1808a
callq 0x1257b
movq %rax, %r13
callq 0xd160
movq %rax, %rdi
movq %r12, %rsi
callq 0x150cc
movq %r13, %rdi
movq %rax, %rsi
callq 0x150cc
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x150cc
movq %r15, %rdi
movq %rax, %rsi
callq 0x150cc
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
jmp 0x4a1c
leaq 0x1ac84(%rip), %rax     # 0x1f8f0
cmpl $0x0, (%rax)
je 0x4cba
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0x16604
testl %eax, %eax
je 0x4cba
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x2c4, 0xc(%rax)       # imm = 0x2C4
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0xf0bc
leaq 0x133b0(%rip), %rdi     # 0x18060
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f13
callq 0x2050