// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/reduce.c
// Function: eval_actor
BEH_DECL(eval_actor)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* state = MINE;
	CONS* cont = map_get(state, cont_symbol);
	CONS* env = map_get(state, env_symbol);
	CONS* binding;
	CONS* beh;
	
	DBUG_ENTER("eval_actor");
	binding = map_find(env, self_symbol);
	DBUG_PRINT("", ("binding=%s", cons_to_str(binding)));
	beh = car(expr);
	DBUG_PRINT("", ("beh=%s", cons_to_str(beh)));
	if ((cdr(binding) == undefined_symbol) && actorp(beh)) {
		state = NIL;
		state = map_put(state, env_symbol, env);
		state = map_put(state, beh_symbol, beh);
		expr = ACTOR(invoke_actor, state);
		rplacd(binding, expr);
		DBUG_PRINT("", ("env=%s", cons_to_str(env)));
		DBUG_PRINT("", ("actor=%s", cons_to_str(expr)));
	} else {	/* error */
		SEND(an_error, ATOM("actor: behavior required"));
		expr = undefined_symbol;
	}
	SEND(cont, map_put(NIL, expr_symbol, expr));
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x10e46
movq 0x140e4(%rip), %rsi     # 0x1a158
movq %rax, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %rbp
movq 0x30(%rbx), %rdi
callq 0x10d3b
movq %rax, %rdi
callq 0x929b
movq %rax, %r15
movq 0x140b4(%rip), %rsi     # 0x1a150
movq %rax, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, 0x8(%rsp)
movq 0x140b6(%rip), %rsi     # 0x1a168
movq %r15, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r12
leaq 0xd38c(%rip), %rax      # 0x13452
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x142c3(%rip), %r14     # 0x1a398
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x44a, 0xc(%rdi)       # imm = 0x44A
leaq 0xf9f4(%rip), %r15      # 0x15ae4
movq %r15, 0x10(%rdi)
leaq 0x14045(%rip), %rcx     # 0x1a140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x12bb9
movq 0x140a1(%rip), %rsi     # 0x1a1b0
movq %r12, %rdi
callq 0x11221
movq %rax, %r13
leaq 0x1481f(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x6164
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12334
testl %eax, %eax
je 0x6164
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x44c, 0xc(%rax)       # imm = 0x44C
movq %r13, %rdi
callq 0xb248
leaq 0xd303(%rip), %rdi      # 0x1345d
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
movq %rbp, %rdi
callq 0x10d3b
movq %rax, %rbp
leaq 0x147ca(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x61b9
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12334
testl %eax, %eax
je 0x61b9
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x44e, 0xc(%rax)       # imm = 0x44E
movq %rbp, %rdi
callq 0xb248
leaq 0xd29c(%rip), %rdi      # 0x1344b
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
movq %r13, %rdi
callq 0x10e46
cmpq 0x13fb0(%rip), %rax     # 0x1a178
jne 0x62be
movl %ebp, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x62be
movq 0x13f85(%rip), %rsi     # 0x1a168
leaq 0x1411e(%rip), %rdi     # 0x1a308
movq %r12, %rdx
callq 0x11339
movq 0x13f9f(%rip), %rsi     # 0x1a198
movq %rax, %rdi
movq %rbp, %rdx
callq 0x11339
leaq -0x481(%rip), %rsi      # 0x5d8a
movq %rbx, %rdi
movq %rax, %rdx
callq 0x9ef7
movq %rax, %rbp
movq %r13, %rdi
movq %rax, %rsi
callq 0x10f5f
leaq 0x14715(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x62e6
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12334
testl %eax, %eax
je 0x6272
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x455, 0xc(%rax)       # imm = 0x455
movq %r12, %rdi
callq 0xb248
leaq 0xce77(%rip), %rdi      # 0x130df
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
leaq 0x146c7(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x62e6
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12334
testl %eax, %eax
je 0x62e6
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x456, 0xc(%rax)       # imm = 0x456
movq %rbp, %rdi
callq 0xb248
leaq 0xd167(%rip), %rdi      # 0x13419
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
jmp 0x62e6
movq 0x13eab(%rip), %r15     # 0x1a170
leaq 0xd19c(%rip), %rdi      # 0x13468
callq 0xe45f
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x9fd4
movq 0x13e92(%rip), %rbp     # 0x1a178
movq 0x13e6b(%rip), %rsi     # 0x1a158
leaq 0x14014(%rip), %rdi     # 0x1a308
movq %rbp, %rdx
callq 0x11339
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x9fd4
leaq 0x10(%rsp), %rdi
movl $0x45c, 0xc(%rdi)       # imm = 0x45C
callq 0x12d32
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq