// File: /workspace/github_c_makefile_star2_O2/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 0x147fb
movq %rax, %rdi
callq 0xcd5b
movq %rax, %rdi
callq 0x147fb
movq %rax, 0x8(%rsp)
leaq 0x1461a(%rip), %rax     # 0x1708e
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1b89d(%rip), %rax     # 0x1e320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0xec, 0xc(%rdi)
leaq 0x16f1e(%rip), %rcx     # 0x199bc
movq %rcx, 0x10(%rdi)
leaq 0x1b697(%rip), %rcx     # 0x1e140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x16679
movq 0x30(%rbx), %rdi
callq 0x147fb
movq %rax, %rdi
callq 0xcd5b
movq %rax, %rdi
callq 0x14906
movq %rax, %r15
movq %rax, %rdi
callq 0x147fb
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x14906
movq %rax, 0x18(%rsp)
movq 0x30(%rbx), %rdi
callq 0x14906
testq %rax, %rax
je 0x2e2e
movq 0x30(%rbx), %rdi
callq 0x14906
testb $0x3, %al
jne 0x2e2e
movq 0x30(%rbx), %rdi
callq 0x14906
cmpq 0x1b4a1(%rip), %rax     # 0x1dfc0
je 0x2e2e
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x14906
testq %rax, %rax
je 0x2e2e
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x14906
testb $0x3, %al
jne 0x2e2e
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x14906
cmpq 0x1b450(%rip), %rax     # 0x1dfc0
je 0x2e2e
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0x147fb
movq %rax, %rbp
movq %r15, %rdi
callq 0x147fb
movq %rax, %r13
movq %rax, %rdi
callq 0x147fb
movq %rax, %r14
movq %r13, %rdi
callq 0x14906
movq %rax, %r15
movq %rax, %rdi
callq 0x147fb
movq %rax, %r12
movq %r15, %rdi
callq 0x14906
cmpq 0x10(%rsp), %r12
je 0x2bde
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
jmp 0x2d47
movq %rax, %r15
movq %rbp, (%rsp)
leaq 0x1449e(%rip), %rdi     # 0x1708a
callq 0x11f1f
cmpq %rax, %r14
je 0x2d6f
movq %r14, %rbp
leaq 0x144ab(%rip), %rdi     # 0x170af
callq 0x11f1f
cmpq %rax, %r14
je 0x2c23
leaq 0x144a1(%rip), %rdi     # 0x170b6
callq 0x11f1f
cmpq %rax, %rbp
jne 0x2e98
movq %r15, %rdi
callq 0x147fb
movq %rax, %r14
leaq 0x1bcbb(%rip), %r15     # 0x1e8f0
cmpl $0x0, (%r15)
leaq 0x1b6e0(%rip), %r13     # 0x1e320
je 0x2cd4
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x16d67(%rip), %rdi     # 0x199bc
movq %rdi, 0x10(%rax)
callq 0x15df4
testl %eax, %eax
je 0x2c8a
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x108, 0xc(%rax)       # imm = 0x108
movq %r12, %rdi
callq 0xed08
leaq 0x1443b(%rip), %rdi     # 0x170bb
movq %rax, %rsi
xorl %eax, %eax
callq 0x166f0
cmpl $0x0, (%r15)
je 0x2cd4
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x16d1d(%rip), %rdi     # 0x199bc
movq %rdi, 0x10(%rax)
callq 0x15df4
testl %eax, %eax
je 0x2cd4
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x109, 0xc(%rax)       # imm = 0x109
movq %r14, %rdi
callq 0xed08
leaq 0x143f8(%rip), %rdi     # 0x170c2
movq %rax, %rsi
xorl %eax, %eax
callq 0x166f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x14764
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x14764
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x147fb
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x147fb
movq %rax, %rdi
callq 0xcd24
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xd116
leaq 0x1438e(%rip), %rdi     # 0x170af
callq 0x11f1f
cmpq %rax, %rbp
leaq 0x14399(%rip), %rax     # 0x170c9
leaq 0x1439c(%rip), %rdi     # 0x170d3
cmoveq %rax, %rdi
callq 0x11f1f
movq %rbx, %rdi
movq (%rsp), %rsi
movq %rax, %rdx
callq 0xda94
leaq 0x20(%rsp), %rdi
movl $0x119, 0xc(%rdi)       # imm = 0x119
callq 0x167f2
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bb7a(%rip), %r15     # 0x1e8f0
cmpl $0x0, (%r15)
leaq 0x1b59f(%rip), %r12     # 0x1e320
movq (%rsp), %r13
movq 0x18(%rsp), %rbp
je 0x2e20
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x16c1d(%rip), %rdi     # 0x199bc
movq %rdi, 0x10(%rax)
callq 0x15df4
testl %eax, %eax
je 0x2dd6
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x102, 0xc(%rax)       # imm = 0x102
movq 0x10(%rsp), %rdi
callq 0xed08
leaq 0x142ce(%rip), %rdi     # 0x1709a
movq %rax, %rsi
xorl %eax, %eax
callq 0x166f0
cmpl $0x0, (%r15)
je 0x2e20
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x16bd1(%rip), %rdi     # 0x199bc
movq %rdi, 0x10(%rax)
callq 0x15df4
testl %eax, %eax
je 0x2e20
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x103, 0xc(%rax)       # imm = 0x103
movq %rbp, %rdi
callq 0xed08
leaq 0x1428e(%rip), %rdi     # 0x170a4
movq %rax, %rsi
xorl %eax, %eax
callq 0x166f0
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
jmp 0x2d4a
leaq 0x1babb(%rip), %rax     # 0x1e8f0
cmpl $0x0, (%rax)
je 0x2e93
leaq 0x1b4df(%rip), %rax     # 0x1e320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x16b6d(%rip), %rdi     # 0x199bc
movq %rdi, 0x10(%rax)
callq 0x15df4
testl %eax, %eax
je 0x2e93
leaq 0x1b4bd(%rip), %rax     # 0x1e320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x116, 0xc(%rax)       # imm = 0x116
movq 0x30(%rbx), %rdi
callq 0x14906
movq %rax, %rdi
callq 0xed08
leaq 0x141d7(%rip), %rdi     # 0x17060
movq %rax, %rsi
xorl %eax, %eax
callq 0x166f0
callq 0x2050
leaq 0x1ba51(%rip), %rax     # 0x1e8f0
cmpl $0x0, (%rax)
je 0x2e93
leaq 0x1b475(%rip), %rax     # 0x1e320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x16b03(%rip), %rdi     # 0x199bc
movq %rdi, 0x10(%rax)
callq 0x15df4
testl %eax, %eax
je 0x2e93
leaq 0x1b453(%rip), %rax     # 0x1e320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x10f, 0xc(%rax)       # imm = 0x10F
movq %r13, %rdi
callq 0xed08
leaq 0x141ec(%rip), %rdi     # 0x170d6
jmp 0x2e89