// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/reduce.c
// Function: eval_function
BEH_DECL(eval_function)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* state = MINE;
	CONS* vars = map_get(state, ATOM("vars"));
	CONS* body = map_get(state, ATOM("body"));
	CONS* cont = map_get(state, cont_symbol);
	CONS* env = map_get(state, env_symbol);

	DBUG_ENTER("eval_function");
	DBUG_PRINT("", ("vars=%s", cons_to_str(vars)));
	DBUG_PRINT("", ("expr=%s", cons_to_str(expr)));
	if (consp(vars)) {
		/* bind vars to values */
		env = map_def(env, vars, expr);
	} else if (atomp(vars)) {
		/* bind single var to list of values */
		env = map_put(env, vars, expr);
	}
	DBUG_PRINT("", ("body=%s", cons_to_str(body)));
	msg = NIL;
	msg = map_put(msg, env_symbol, env);
	msg = map_put(msg, cont_symbol, cont);
	msg = map_put(msg, expr_symbol, body);
	SEND(a_reduce, msg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x11655
movq 0x1575c(%rip), %rsi     # 0x1b148
movq %rax, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, 0x8(%rsp)
movq 0x30(%rbx), %rdi
callq 0x115b6
movq %rax, %rdi
callq 0x9721
movq %rax, %r14
leaq 0xe9b1(%rip), %rdi      # 0x143c7
callq 0xea8c
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x11a8a
movq %rax, %rbp
movq %rax, (%rsp)
leaq 0xe996(%rip), %rdi      # 0x143cc
callq 0xea8c
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x11a8a
movq %rax, 0x18(%rsp)
movq 0x156ec(%rip), %rsi     # 0x1b140
movq %r14, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, 0x10(%rsp)
movq 0x156ee(%rip), %rsi     # 0x1b158
movq %r14, %rdi
xorl %edx, %edx
callq 0x11a8a
movq %rax, %r13
leaq 0xe963(%rip), %rax      # 0x143e1
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x158fb(%rip), %r12     # 0x1b388
movq (%r12), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x3a1, 0xc(%rdi)       # imm = 0x3A1
leaq 0x1105b(%rip), %r14     # 0x16b04
movq %r14, 0x10(%rdi)
leaq 0x1567c(%rip), %rcx     # 0x1b130
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x13322
leaq 0x15e68(%rip), %r15     # 0x1b930
cmpl $0x0, (%r15)
je 0x5b0f
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x12a94
testl %eax, %eax
je 0x5b0f
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x3a2, 0xc(%rax)       # imm = 0x3A2
movq (%rsp), %rdi
callq 0xb5ac
leaq 0xe8ea(%rip), %rdi      # 0x143ef
movq %rax, %rsi
xorl %eax, %eax
callq 0x13393
cmpl $0x0, (%r15)
je 0x5b57
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x12a94
testl %eax, %eax
je 0x5b57
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x3a3, 0xc(%rax)       # imm = 0x3A3
movq 0x8(%rsp), %rdi
callq 0xb5ac
leaq 0xea48(%rip), %rdi      # 0x14595
movq %rax, %rsi
xorl %eax, %eax
callq 0x13393
testq %rbp, %rbp
sete %al
andq $0x3, %rbp
setne %cl
orb %al, %cl
je 0x5b80
cmpl $0x2, %ebp
jne 0x5b94
movq %r13, %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x11afc
jmp 0x5b91
movq %r13, %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x11c11
movq %rax, %r13
cmpl $0x0, (%r15)
movq 0x18(%rsp), %r15
je 0x5bdf
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0x12a94
testl %eax, %eax
je 0x5bdf
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x3ab, 0xc(%rax)       # imm = 0x3AB
movq %r15, %rdi
callq 0xb5ac
leaq 0xe822(%rip), %rdi      # 0x143f7
movq %rax, %rsi
xorl %eax, %eax
callq 0x13393
movq 0x15572(%rip), %rsi     # 0x1b158
leaq 0x1570b(%rip), %rdi     # 0x1b2f8
movq %r13, %rdx
callq 0x11afc
movq 0x15544(%rip), %rsi     # 0x1b140
movq %rax, %rdi
movq 0x10(%rsp), %rdx
callq 0x11afc
movq 0x15538(%rip), %rsi     # 0x1b148
movq %rax, %rdi
movq %r15, %rdx
callq 0x11afc
movq 0x1555e(%rip), %rsi     # 0x1b180
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa327
leaq 0x20(%rsp), %rdi
movl $0x3b1, 0xc(%rdi)       # imm = 0x3B1
callq 0x134a7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq