// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/schemer.c
// Function: eval_define_beh
BEH_DECL(eval_define_beh)
{
	CONS* p;
	CONS* state;
	CONS* msg;
	CONS* a;

	DBUG_ENTER("eval_define_beh");
	if (is_pair(WHAT) && is_pair(p = pr_tail(WHAT))) {
		CONS* to = pr_head(WHAT);
		CONS* expr = pr_head(p);
		CONS* env = pr_tail(p);
		CONS* form = is_pair(expr) ? lst_first(expr) : NIL;

		DBUG_PRINT("", ("form = %s", cons_to_str(form)));
		if (is_symbol(form)) {
			DBUG_PRINT("", ("symbol"));
			state = mk_pair(form, env);
			state = mk_pair(to, state);
			a = ACTOR(apply_define_beh, state);
			DBUG_PRINT("", ("expr = %s", cons_to_str(lst_second(expr))));
			msg = mk_pair(lst_second(expr), env);
			msg = mk_pair(a, msg);
			SEND(eval__actor, msg);
		} else if (is_pair(form)) {
			CONS* name = lst_first(form);
			CONS* vars = lst_rest(form);
			CONS* body = lst_rest(expr);
			
			DBUG_PRINT("", ("lambda"));
			DBUG_PRINT("", ("name = %s", cons_to_str(name)));
			DBUG_PRINT("", ("vars = %s", cons_to_str(vars)));
			DBUG_PRINT("", ("body = %s", cons_to_str(body)));
			state = mk_pair(vars, body);
			state = mk_pair(state, env);
			a = ACTOR(lambda_beh, state);
			msg = mk_empty();
			msg = mk_list(a, msg);
			msg = mk_list(name, msg);
			msg = mk_list(ATOM("define"), msg);
			msg = mk_pair(msg, env);
			msg = mk_pair(to, msg);
			SEND(env, msg);
		} else {
			DBUG_PRINT("", ("error"));
			msg = mk_list(ATOM("define"), expr);
			FAIL(env, msg);
		}
	} else {
		DBUG_PRINT("", ("Ignored! %s", cons_to_str(WHAT)));
		abort();
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x12bdf(%rip), %rax     # 0x18270
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x19c80(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x367, 0xc(%rdi)       # imm = 0x367
leaq 0x15325(%rip), %r15     # 0x1a9e0
movq %r15, 0x10(%rdi)
leaq 0x19a7a(%rip), %rcx     # 0x1f140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x16ef2
movq 0x30(%rbx), %rdi
callq 0x15225
testq %rax, %rax
je 0x5c35
movq 0x30(%rbx), %rdi
callq 0x15225
testb $0x3, %al
jne 0x5c35
movq 0x30(%rbx), %rdi
callq 0x15225
cmpq 0x198ba(%rip), %rax     # 0x1efc0
je 0x5c35
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
testq %rax, %rax
je 0x5c35
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
testb $0x3, %al
jne 0x5c35
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
cmpq 0x19869(%rip), %rax     # 0x1efc0
je 0x5c35
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15186
movq %rax, %r12
movq %r14, %rdi
callq 0x15186
movq %rax, %r13
movq %r14, %rdi
callq 0x15225
movq %rax, 0x8(%rsp)
leaq 0x19afd(%rip), %r14     # 0x1f290
cmpq %r14, %r13
movq %r12, 0x18(%rsp)
je 0x57b5
testq %r13, %r13
je 0x57b5
movl %r13d, %eax
andl $0x3, %eax
jne 0x57b5
movq %r13, %rdi
callq 0x15186
movq %rax, %r14
leaq 0x1a134(%rip), %rbp     # 0x1f8f0
cmpl $0x0, (%rbp)
je 0x580e
leaq 0x19b57(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x580e
leaq 0x19b39(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x36e, 0xc(%rax)       # imm = 0x36E
movq %r14, %rdi
callq 0xf17c
leaq 0x129e0(%rip), %rdi     # 0x181e4
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
movl %r14d, %r12d
andl $0x3, %r12d
cmpq $0x2, %r12
jne 0x5952
movl $0x1, %edi
callq 0x3d66
cmpq %rax, %r14
je 0x5952
xorl %edi, %edi
callq 0x3d66
cmpq %rax, %r14
je 0x5952
cmpl $0x0, (%rbp)
je 0x5889
leaq 0x19ad1(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x5889
leaq 0x19ab3(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x370, 0xc(%rax)       # imm = 0x370
leaq 0x12884(%rip), %rdi     # 0x18106
xorl %eax, %eax
callq 0x16f63
movq %r14, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x15164
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x15164
leaq -0x3ea(%rip), %rsi      # 0x54c3
movq %rbx, %rdi
movq %rax, %rdx
callq 0xde1a
movq %rax, %r12
cmpl $0x0, (%rbp)
je 0x591d
leaq 0x19a58(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x591d
leaq 0x19a3a(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x374, 0xc(%rax)       # imm = 0x374
movq %r13, %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15186
movq %rax, %rdi
callq 0xf17c
leaq 0x127d9(%rip), %rdi     # 0x180ec
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
movq %r13, %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15186
movq %rax, %rdi
movq %r14, %rsi
callq 0x15164
movq %r12, %rdi
movq %rax, %rsi
callq 0x15164
movq 0x19a2e(%rip), %rsi     # 0x1f378
movq %rbx, %rdi
jmp 0x5c0d
cmpq 0x19667(%rip), %r14     # 0x1efc0
je 0x5b4b
testq %r14, %r14
je 0x5b4b
testq %r12, %r12
jne 0x5b4b
movq %r14, %rdi
callq 0x15186
movq %rax, 0x10(%rsp)
movq %r14, %rdi
callq 0x15225
movq %rax, %r12
movq %r13, %rdi
callq 0x15225
movq %rax, %r13
cmpl $0x0, (%rbp)
je 0x59db
leaq 0x1997f(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x59db
leaq 0x19961(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x37d, 0xc(%rax)       # imm = 0x37D
leaq 0x128ac(%rip), %rdi     # 0x18280
xorl %eax, %eax
callq 0x16f63
cmpl $0x0, (%rbp)
je 0x5a2f
leaq 0x19938(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x5a2f
leaq 0x1991a(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x37e, 0xc(%rax)       # imm = 0x37E
movq 0x10(%rsp), %rdi
callq 0xf17c
leaq 0x12675(%rip), %rdi     # 0x1809a
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
cmpl $0x0, (%rbp)
movq 0x8(%rsp), %r14
je 0x5a86
leaq 0x198df(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x5a86
leaq 0x198c1(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x37f, 0xc(%rax)       # imm = 0x37F
movq %r12, %rdi
callq 0xf17c
leaq 0x126ac(%rip), %rdi     # 0x18128
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
cmpl $0x0, (%rbp)
je 0x5ad8
leaq 0x1988d(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x5ad8
leaq 0x1986f(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x380, 0xc(%rax)       # imm = 0x380
movq %r13, %rdi
callq 0xf17c
leaq 0x12664(%rip), %rdi     # 0x18132
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
movq %r12, %rdi
movq %r13, %rsi
callq 0x15164
movq %rax, %rdi
movq %r14, %rsi
callq 0x15164
leaq -0x1d13(%rip), %rsi     # 0x3de2
movq %rbx, %rdi
movq %rax, %rdx
callq 0xde1a
leaq 0x19789(%rip), %rsi     # 0x1f290
movq %rax, %rdi
callq 0x15164
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x15164
movq %rax, %r15
leaq 0x12589(%rip), %rdi     # 0x180af
callq 0x1265c
movq %rax, %rdi
movq %r15, %rsi
callq 0x15164
movq %rax, %rdi
movq %r14, %rsi
callq 0x15164
movq 0x18(%rsp), %rdi
jmp 0x5bff
cmpl $0x0, (%rbp)
je 0x5b92
leaq 0x197c8(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x5b92
leaq 0x197aa(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x38c, 0xc(%rax)       # imm = 0x38C
leaq 0x126a2(%rip), %rdi     # 0x1822d
xorl %eax, %eax
callq 0x16f63
leaq 0x12516(%rip), %rdi     # 0x180af
callq 0x1265c
movq %rax, %rdi
movq %r13, %rsi
callq 0x15164
leaq -0x30d8(%rip), %rsi     # 0x2ad8
movq %rbx, %rdi
movq %rax, %rdx
callq 0xde1a
movq %rax, %r15
leaq 0x124c5(%rip), %rdi     # 0x1808a
callq 0x1265c
movq %rax, %r12
callq 0xd26a
leaq 0x196b7(%rip), %rsi     # 0x1f290
movq %rax, %rdi
callq 0x15164
movq %r12, %rdi
movq %rax, %rsi
callq 0x15164
movq %rax, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x15164
movq %r15, %rdi
movq %rax, %rsi
callq 0x15164
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xdef7
leaq 0x20(%rsp), %rdi
movl $0x394, 0xc(%rdi)       # imm = 0x394
callq 0x17077
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19cb4(%rip), %rax     # 0x1f8f0
cmpl $0x0, (%rax)
je 0x5c96
leaq 0x196d8(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r15, 0x10(%rax)
movq %r15, %rdi
callq 0x16664
testl %eax, %eax
je 0x5c96
leaq 0x196ba(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x391, 0xc(%rax)       # imm = 0x391
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0xf17c
leaq 0x123d4(%rip), %rdi     # 0x18060
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
callq 0x2050