// File: /workspace/github_c_makefile_star2_O1/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 0x11655
movq 0x14cbf(%rip), %rsi     # 0x1b148
movq %rax, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, %rbp
movq 0x30(%rbx), %rdi
callq 0x115b6
movq %rax, %rdi
callq 0x9721
movq %rax, %r15
movq 0x14c8f(%rip), %rsi     # 0x1b140
movq %rax, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, 0x8(%rsp)
movq 0x14c91(%rip), %rsi     # 0x1b158
movq %r15, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, %r12
leaq 0xdf77(%rip), %rax      # 0x14452
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x14e9e(%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 0x105ff(%rip), %r15     # 0x16b04
movq %r15, 0x10(%rdi)
leaq 0x14c20(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x13322
movq 0x14c7c(%rip), %rsi     # 0x1b1a0
movq %r12, %rdi
callq 0x119da
movq %rax, %r13
leaq 0x153fa(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x6579
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12a94
testl %eax, %eax
je 0x6579
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x44c, 0xc(%rax)       # imm = 0x44C
movq %r13, %rdi
callq 0xb5ac
leaq 0xdeee(%rip), %rdi      # 0x1445d
movq %rax, %rsi
xorl %eax, %eax
callq 0x13393
movq %rbp, %rdi
callq 0x115b6
movq %rax, %rbp
leaq 0x153a5(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x65ce
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12a94
testl %eax, %eax
je 0x65ce
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x44e, 0xc(%rax)       # imm = 0x44E
movq %rbp, %rdi
callq 0xb5ac
leaq 0xde87(%rip), %rdi      # 0x1444b
movq %rax, %rsi
xorl %eax, %eax
callq 0x13393
movq %r13, %rdi
callq 0x11655
cmpq 0x14b8b(%rip), %rax     # 0x1b168
jne 0x66cf
movl %ebp, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x66cf
movq 0x14b60(%rip), %rsi     # 0x1b158
leaq 0x14cf9(%rip), %rdi     # 0x1b2f8
movq %r12, %rdx
callq 0x11afc
movq 0x14b7a(%rip), %rsi     # 0x1b188
movq %rax, %rdi
movq %rbp, %rdx
callq 0x11afc
leaq -0x494(%rip), %rsi      # 0x618c
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa24a
movq %rax, %rbp
movq %r13, %rdi
movq %rax, %rsi
callq 0x11702
leaq 0x152f0(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x6683
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12a94
testl %eax, %eax
je 0x6683
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x455, 0xc(%rax)       # imm = 0x455
movq %r12, %rdi
callq 0xb5ac
leaq 0xda66(%rip), %rdi      # 0x140df
movq %rax, %rsi
xorl %eax, %eax
callq 0x13393
leaq 0x152a6(%rip), %rax     # 0x1b930
cmpl $0x0, (%rax)
je 0x66f7
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x12a94
testl %eax, %eax
je 0x66f7
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x456, 0xc(%rax)       # imm = 0x456
movq %rbp, %rdi
callq 0xb5ac
leaq 0xdd56(%rip), %rdi      # 0x14419
movq %rax, %rsi
xorl %eax, %eax
callq 0x13393
jmp 0x66f7
movq 0x14a8a(%rip), %r15     # 0x1b160
leaq 0xdd8b(%rip), %rdi      # 0x14468
callq 0xea8c
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xa327
movq 0x14a71(%rip), %rbp     # 0x1b168
movq 0x14a4a(%rip), %rsi     # 0x1b148
leaq 0x14bf3(%rip), %rdi     # 0x1b2f8
movq %rbp, %rdx
callq 0x11afc
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0xa327
leaq 0x10(%rsp), %rdi
movl $0x45c, 0xc(%rdi)       # imm = 0x45C
callq 0x134a7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq