// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/reduce.c
// Function: template
BEH_DECL(template)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* cont = map_get(msg, cont_symbol);
	CONS* env = map_get(msg, env_symbol);
	CONS* state = MINE;
	CONS* vars = map_get(state, ATOM("vars"));
	CONS* body = map_get(state, ATOM("body"));

	DBUG_ENTER("template");
	expr = replace(body, map_def(NIL, vars, expr));		/* FIXME: check for binding to a single symbol, like eval_function */
	DBUG_PRINT("", ("expr=%s", cons_to_str(expr)));
	msg = NIL;
	msg = map_put(msg, env_symbol, env);
	msg = map_put(msg, cont_symbol, cont);
	msg = map_put(msg, expr_symbol, expr);
	SEND(a_reduce, msg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x16990
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x19bfd(%rip), %rsi     # 0x20148
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq 0x19bdd(%rip), %rsi     # 0x20140
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq 0x19bdd(%rip), %rsi     # 0x20158
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x16800
movq %rax, %rdi
callq 0xba80
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x13e17(%rip), %rdi     # 0x1a3c7
callq 0x12b60
movq -0x80(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq 0x13df4(%rip), %rdi     # 0x1a3cc
callq 0x12b60
movq -0x78(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x40(%rbp)
leaq 0x13de0(%rip), %rax     # 0x1a3d8
movq %rax, -0x68(%rbp)
leaq 0x19d85(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movl $0x36c, -0x5c(%rbp)     # imm = 0x36C
leaq 0x16692(%rip), %rax     # 0x1ccb0
movq %rax, -0x58(%rbp)
leaq 0x19b07(%rip), %rax     # 0x20130
movq %rax, -0x50(%rbp)
leaq 0x19d54(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x19910
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x19c99(%rip), %rdi     # 0x202f8
callq 0x17490
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x16f90
movq %rax, -0x18(%rbp)
leaq 0x1a2b5(%rip), %rax     # 0x20930
cmpl $0x0, (%rax)
je 0x66d9
leaq 0x19d01(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x1661b(%rip), %rcx     # 0x1ccb0
movq %rcx, 0x10(%rax)
leaq 0x16610(%rip), %rdi     # 0x1ccb0
callq 0x18d20
cmpl $0x0, %eax
je 0x66d9
leaq 0x19cd7(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x36e, 0xc(%rax)       # imm = 0x36E
movq -0x18(%rbp), %rdi
callq 0xe6d0
movq %rax, %rsi
leaq 0x13ec1(%rip), %rdi     # 0x1a593
movb $0x0, %al
callq 0x199c0
jmp 0x66db
leaq 0x19c16(%rip), %rax     # 0x202f8
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x19a67(%rip), %rsi     # 0x20158
movq -0x28(%rbp), %rdx
callq 0x172a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x19a37(%rip), %rsi     # 0x20140
movq -0x20(%rbp), %rdx
callq 0x172a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x19a27(%rip), %rsi     # 0x20148
movq -0x18(%rbp), %rdx
callq 0x172a0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq 0x19a47(%rip), %rsi     # 0x20180
movq -0x10(%rbp), %rdx
callq 0xcc90
movl $0x374, -0x5c(%rbp)     # imm = 0x374
leaq -0x68(%rbp), %rdi
callq 0x19ae0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)