// File: /workspace/github_c_makefile_star2_O3/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 0x11685
movq 0x14d0b(%rip), %rsi     # 0x1b148
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %rbp
movq 0x30(%rbx), %rdi
callq 0x115e6
movq %rax, %rdi
callq 0x96d9
movq %rax, %r15
movq 0x14cdb(%rip), %rsi     # 0x1b140
movq %rax, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, 0x8(%rsp)
movq 0x14cdd(%rip), %rsi     # 0x1b158
movq %r15, %rdi
xorl %edx, %edx
callq 0x11aba
movq %rax, %r12
leaq 0xdfc3(%rip), %rax      # 0x14452
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x14eea(%rip), %r14     # 0x1b388
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x44a, 0xc(%rdi)       # imm = 0x44A
leaq 0x1064b(%rip), %r15     # 0x16b04
movq %r15, 0x10(%rdi)
leaq 0x14c6c(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1339a
movq 0x14cc8(%rip), %rsi     # 0x1b1a0
movq %r12, %rdi
callq 0x11a0a
movq %rax, %r13
leaq 0x15446(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x652d
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12afc
testl %eax, %eax
je 0x652d
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x44c, 0xc(%rax)       # imm = 0x44C
movq %r13, %rdi
callq 0xb5b4
leaq 0xdf3a(%rip), %rdi      # 0x1445d
movq %rax, %rsi
xorl %eax, %eax
callq 0x1340b
movq %rbp, %rdi
callq 0x115e6
movq %rax, %rbp
leaq 0x153f1(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x6582
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12afc
testl %eax, %eax
je 0x6582
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x44e, 0xc(%rax)       # imm = 0x44E
movq %rbp, %rdi
callq 0xb5b4
leaq 0xded3(%rip), %rdi      # 0x1444b
movq %rax, %rsi
xorl %eax, %eax
callq 0x1340b
movq %r13, %rdi
callq 0x11685
cmpq 0x14bd7(%rip), %rax     # 0x1b168
jne 0x6687
movl %ebp, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x6687
movq 0x14bac(%rip), %rsi     # 0x1b158
leaq 0x14d45(%rip), %rdi     # 0x1b2f8
movq %r12, %rdx
callq 0x11b2c
movq 0x14bc6(%rip), %rsi     # 0x1b188
movq %rax, %rdi
movq %rbp, %rdx
callq 0x11b2c
leaq -0x498(%rip), %rsi      # 0x613c
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa232
movq %rax, %rbp
movq %r13, %rdi
movq %rax, %rsi
callq 0x11732
leaq 0x1533c(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x66af
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12afc
testl %eax, %eax
je 0x663b
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x455, 0xc(%rax)       # imm = 0x455
movq %r12, %rdi
callq 0xb5b4
leaq 0xdaae(%rip), %rdi      # 0x140df
movq %rax, %rsi
xorl %eax, %eax
callq 0x1340b
leaq 0x152ee(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x66af
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12afc
testl %eax, %eax
je 0x66af
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x456, 0xc(%rax)       # imm = 0x456
movq %rbp, %rdi
callq 0xb5b4
leaq 0xdd9e(%rip), %rdi      # 0x14419
movq %rax, %rsi
xorl %eax, %eax
callq 0x1340b
jmp 0x66af
movq 0x14ad2(%rip), %r15     # 0x1b160
leaq 0xddd3(%rip), %rdi      # 0x14468
callq 0xea73
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa30f
movq 0x14ab9(%rip), %rbp     # 0x1b168
movq 0x14a92(%rip), %rsi     # 0x1b148
leaq 0x14c3b(%rip), %rdi     # 0x1b2f8
movq %rbp, %rdx
callq 0x11b2c
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0xa30f
leaq 0x10(%rsp), %rdi
movl $0x45c, 0xc(%rdi)       # imm = 0x45C
callq 0x1351f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq