// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/schemer.c
// Function: binding_beh
BEH_DECL(binding_beh)
{
	CONS* next = pr_head(MINE);
	CONS* name;
	CONS* value;
	CONS* p;
	CONS* state;

	DBUG_ENTER("binding_beh");
	XDBUG_PRINT("", ("next = %s", cons_to_str(next)));
	p = pr_tail(MINE);
	name = pr_head(p);
	XDBUG_PRINT("", ("name = %s", cons_to_str(name)));
	value = pr_tail(p);
	XDBUG_PRINT("", ("value = %s", cons_to_str(value)));
	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* verb;
		CONS* n;

		XDBUG_PRINT("", ("expr = %s", cons_to_str(expr)));
		p = expr;
		verb = lst_first(p);
		p = lst_rest(p);
		n = lst_first(p);
		p = lst_rest(p);
		if (n == name) {
			if (verb == ATOM("get")) {
				DBUG_PRINT("", ("name = %s", cons_to_str(name)));
				DBUG_PRINT("", ("value = %s", cons_to_str(value)));
				SEND(to, value);
			} else if ((verb == ATOM("define")) || (verb == ATOM("set!"))) {
				CONS* v = lst_first(p);

				DBUG_PRINT("", ("n = %s", cons_to_str(n)));
				DBUG_PRINT("", ("v = %s", cons_to_str(v)));
				state = mk_pair(n, v);
				state = mk_pair(next, state);
				BECOME(THIS, state);
				SEND(to, ATOM((verb == ATOM("define")) ? "redefined" : "ok"));
			} else {
				DBUG_PRINT("", ("Unknown! %s", cons_to_str(expr)));
				abort();
			}
		} else {
			SEND(next, WHAT);
		}
	} 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
movq 0x30(%rdi), %rdi
callq 0x15186
movq %rax, %rdi
callq 0xd2f1
movq %rax, %rdi
callq 0x15186
movq %rax, 0x8(%rsp)
leaq 0x1521a(%rip), %rax     # 0x1808e
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1c49d(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0xec, 0xc(%rdi)
leaq 0x17b42(%rip), %rcx     # 0x1a9e0
movq %rcx, 0x10(%rdi)
leaq 0x1c297(%rip), %rcx     # 0x1f140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x16ef2
movq 0x30(%rbx), %rdi
callq 0x15186
movq %rax, %rdi
callq 0xd2f1
movq %rax, %rdi
callq 0x15225
movq %rax, %r15
movq %rax, %rdi
callq 0x15186
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x15225
movq %rax, 0x18(%rsp)
movq 0x30(%rbx), %rdi
callq 0x15225
testq %rax, %rax
je 0x3226
movq 0x30(%rbx), %rdi
callq 0x15225
testb $0x3, %al
jne 0x3226
movq 0x30(%rbx), %rdi
callq 0x15225
cmpq 0x1c0a1(%rip), %rax     # 0x1efc0
je 0x3226
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
testq %rax, %rax
je 0x3226
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
testb $0x3, %al
jne 0x3226
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
cmpq 0x1c050(%rip), %rax     # 0x1efc0
je 0x3226
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15186
movq %rax, %rbp
movq %r15, %rdi
callq 0x15186
movq %rax, %r13
movq %rax, %rdi
callq 0x15186
movq %rax, %r14
movq %r13, %rdi
callq 0x15225
movq %rax, %r15
movq %rax, %rdi
callq 0x15186
movq %rax, %r12
movq %r15, %rdi
callq 0x15225
cmpq 0x10(%rsp), %r12
je 0x2fde
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
jmp 0x3143
movq %rax, %r15
movq %rbp, (%rsp)
leaq 0x1509e(%rip), %rdi     # 0x1808a
callq 0x1265c
cmpq %rax, %r14
je 0x316b
movq %r14, %rbp
leaq 0x150ab(%rip), %rdi     # 0x180af
callq 0x1265c
cmpq %rax, %r14
je 0x3023
leaq 0x150a1(%rip), %rdi     # 0x180b6
callq 0x1265c
cmpq %rax, %rbp
jne 0x3290
movq %r15, %rdi
callq 0x15186
movq %rax, %r14
leaq 0x1c8bb(%rip), %r15     # 0x1f8f0
cmpl $0x0, (%r15)
leaq 0x1c2e0(%rip), %r13     # 0x1f320
je 0x3086
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x1798f(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x3086
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x108, 0xc(%rax)       # imm = 0x108
movq %r12, %rdi
callq 0xf17c
leaq 0x1503f(%rip), %rdi     # 0x180bb
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
cmpl $0x0, (%r15)
je 0x30d0
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x17945(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x30d0
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x109, 0xc(%rax)       # imm = 0x109
movq %r14, %rdi
callq 0xf17c
leaq 0x14ffc(%rip), %rdi     # 0x180c2
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
movq %r12, %rdi
movq %r14, %rsi
callq 0x15164
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x15164
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x15186
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x15186
movq %rax, %rdi
callq 0xd2b8
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xd500
leaq 0x14f92(%rip), %rdi     # 0x180af
callq 0x1265c
cmpq %rax, %rbp
leaq 0x14f9d(%rip), %rax     # 0x180c9
leaq 0x14fa0(%rip), %rdi     # 0x180d3
cmoveq %rax, %rdi
callq 0x1265c
movq %rbx, %rdi
movq (%rsp), %rsi
movq %rax, %rdx
callq 0xdef7
leaq 0x20(%rsp), %rdi
movl $0x119, 0xc(%rdi)       # imm = 0x119
callq 0x17077
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c77e(%rip), %r15     # 0x1f8f0
cmpl $0x0, (%r15)
leaq 0x1c1a3(%rip), %r12     # 0x1f320
je 0x31c5
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x17852(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x31c5
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x102, 0xc(%rax)       # imm = 0x102
movq 0x10(%rsp), %rdi
callq 0xf17c
leaq 0x14edf(%rip), %rdi     # 0x1809a
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
cmpl $0x0, (%r15)
movq (%rsp), %r14
movq 0x18(%rsp), %r15
je 0x3218
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x177fd(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x3218
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x103, 0xc(%rax)       # imm = 0x103
movq %r15, %rdi
callq 0xf17c
leaq 0x14e96(%rip), %rdi     # 0x180a4
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
jmp 0x3146
leaq 0x1c6c3(%rip), %rax     # 0x1f8f0
cmpl $0x0, (%rax)
je 0x328b
leaq 0x1c0e7(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x17799(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x328b
leaq 0x1c0c5(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x116, 0xc(%rax)       # imm = 0x116
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0xf17c
leaq 0x14ddf(%rip), %rdi     # 0x18060
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
callq 0x2050
leaq 0x1c659(%rip), %rax     # 0x1f8f0
cmpl $0x0, (%rax)
je 0x328b
leaq 0x1c07d(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x1772f(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x328b
leaq 0x1c05b(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x10f, 0xc(%rax)       # imm = 0x10F
movq %r13, %rdi
callq 0xf17c
leaq 0x14df4(%rip), %rdi     # 0x180d6
jmp 0x3281