// File: /workspace/github_c_makefile_star2_O2/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 0x10e46
movq 0x14b72(%rip), %rsi     # 0x1a158
movq %rax, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, 0x8(%rsp)
movq 0x30(%rbx), %rdi
callq 0x10d3b
movq %rax, %rdi
callq 0x929b
movq %rax, %r12
leaq 0xddb7(%rip), %rdi      # 0x133c7
callq 0xe45f
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x112c7
movq %rax, %rbp
movq %rax, %r15
leaq 0xdd9d(%rip), %rdi      # 0x133cc
callq 0xe45f
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x112c7
movq %rax, 0x18(%rsp)
movq 0x14b03(%rip), %rsi     # 0x1a150
movq %r12, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, 0x10(%rsp)
movq 0x14b05(%rip), %rsi     # 0x1a168
movq %r12, %rdi
xorl %edx, %edx
callq 0x112c7
movq %rax, %r13
leaq 0xdd6a(%rip), %rax      # 0x133e1
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x14d12(%rip), %r14     # 0x1a398
movq (%r14), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x3a1, 0xc(%rdi)       # imm = 0x3A1
leaq 0x10443(%rip), %r12     # 0x15ae4
movq %r12, 0x10(%rdi)
leaq 0x14a94(%rip), %rcx     # 0x1a140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x12bb9
leaq 0x15280(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x5753
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x12334
testl %eax, %eax
je 0x5707
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x3a2, 0xc(%rax)       # imm = 0x3A2
movq %r15, %rdi
callq 0xb248
leaq 0xdcf2(%rip), %rdi      # 0x133ef
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
leaq 0x15232(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
je 0x5753
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x12334
testl %eax, %eax
je 0x5753
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x3a3, 0xc(%rax)       # imm = 0x3A3
movq 0x8(%rsp), %rdi
callq 0xb248
leaq 0xde4c(%rip), %rdi      # 0x13595
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
testq %rbp, %rbp
sete %al
andq $0x3, %rbp
setne %cl
orb %al, %cl
je 0x577b
cmpl $0x2, %ebp
jne 0x578e
movq %r13, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
callq 0x11339
jmp 0x578b
movq %r13, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
callq 0x11448
movq %rax, %r13
leaq 0x151ab(%rip), %rax     # 0x1a940
cmpl $0x0, (%rax)
movq 0x18(%rsp), %r15
je 0x57dd
movq (%r14), %rax
movq 0x50(%rax), %rax
movq %r12, 0x10(%rax)
movq %r12, %rdi
callq 0x12334
testl %eax, %eax
je 0x57dd
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x3ab, 0xc(%rax)       # imm = 0x3AB
movq %r15, %rdi
callq 0xb248
leaq 0xdc24(%rip), %rdi      # 0x133f7
movq %rax, %rsi
xorl %eax, %eax
callq 0x12c30
movq 0x14984(%rip), %rsi     # 0x1a168
leaq 0x14b1d(%rip), %rdi     # 0x1a308
movq %r13, %rdx
callq 0x11339
movq 0x14956(%rip), %rsi     # 0x1a150
movq %rax, %rdi
movq 0x10(%rsp), %rdx
callq 0x11339
movq 0x1494a(%rip), %rsi     # 0x1a158
movq %rax, %rdi
movq %r15, %rdx
callq 0x11339
movq 0x14970(%rip), %rsi     # 0x1a190
movq %rbx, %rdi
movq %rax, %rdx
callq 0x9fd4
leaq 0x20(%rsp), %rdi
movl $0x3b1, 0xc(%rdi)       # imm = 0x3B1
callq 0x12d32
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq