// File: /workspace/github_c_makefile_star2_O3/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 0x150ee
movq %rax, %rdi
callq 0xd1e1
movq %rax, %rdi
callq 0x150ee
movq %rax, 0x8(%rsp)
leaq 0x1527a(%rip), %rax     # 0x1808e
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1c4fd(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0xec, 0xc(%rdi)
leaq 0x17ba2(%rip), %rcx     # 0x1a9e0
movq %rcx, 0x10(%rdi)
leaq 0x1c2f7(%rip), %rcx     # 0x1f140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x16ea2
movq 0x30(%rbx), %rdi
callq 0x150ee
movq %rax, %rdi
callq 0xd1e1
movq %rax, %rdi
callq 0x1518d
movq %rax, %r15
movq %rax, %rdi
callq 0x150ee
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x1518d
movq %rax, 0x18(%rsp)
movq 0x30(%rbx), %rdi
callq 0x1518d
testq %rax, %rax
je 0x31ce
movq 0x30(%rbx), %rdi
callq 0x1518d
testb $0x3, %al
jne 0x31ce
movq 0x30(%rbx), %rdi
callq 0x1518d
cmpq 0x1c101(%rip), %rax     # 0x1efc0
je 0x31ce
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x1518d
testq %rax, %rax
je 0x31ce
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x1518d
testb $0x3, %al
jne 0x31ce
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x1518d
cmpq 0x1c0b0(%rip), %rax     # 0x1efc0
je 0x31ce
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0x150ee
movq %rax, %rbp
movq %r15, %rdi
callq 0x150ee
movq %rax, %r13
movq %rax, %rdi
callq 0x150ee
movq %rax, %r14
movq %r13, %rdi
callq 0x1518d
movq %rax, %r15
movq %rax, %rdi
callq 0x150ee
movq %rax, %r12
movq %r15, %rdi
callq 0x1518d
cmpq 0x10(%rsp), %r12
je 0x2f7e
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
jmp 0x30e7
movq %rax, %r15
movq %rbp, (%rsp)
leaq 0x150fe(%rip), %rdi     # 0x1808a
callq 0x1257b
cmpq %rax, %r14
je 0x310f
movq %r14, %rbp
leaq 0x1510b(%rip), %rdi     # 0x180af
callq 0x1257b
cmpq %rax, %r14
je 0x2fc3
leaq 0x15101(%rip), %rdi     # 0x180b6
callq 0x1257b
cmpq %rax, %rbp
jne 0x3238
movq %r15, %rdi
callq 0x150ee
movq %rax, %r14
leaq 0x1c91b(%rip), %r15     # 0x1f8f0
cmpl $0x0, (%r15)
leaq 0x1c340(%rip), %r13     # 0x1f320
je 0x3074
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x179eb(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16604
testl %eax, %eax
je 0x302a
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x108, 0xc(%rax)       # imm = 0x108
movq %r12, %rdi
callq 0xf0bc
leaq 0x1509b(%rip), %rdi     # 0x180bb
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f13
cmpl $0x0, (%r15)
je 0x3074
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x179a1(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16604
testl %eax, %eax
je 0x3074
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x109, 0xc(%rax)       # imm = 0x109
movq %r14, %rdi
callq 0xf0bc
leaq 0x15058(%rip), %rdi     # 0x180c2
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f13
movq %r12, %rdi
movq %r14, %rsi
callq 0x150cc
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x150cc
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x150ee
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x150ee
movq %rax, %rdi
callq 0xd1a8
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xd43a
leaq 0x14fee(%rip), %rdi     # 0x180af
callq 0x1257b
cmpq %rax, %rbp
leaq 0x14ff9(%rip), %rax     # 0x180c9
leaq 0x14ffc(%rip), %rdi     # 0x180d3
cmoveq %rax, %rdi
callq 0x1257b
movq %rbx, %rdi
movq (%rsp), %rsi
movq %rax, %rdx
callq 0xde17
leaq 0x20(%rsp), %rdi
movl $0x119, 0xc(%rdi)       # imm = 0x119
callq 0x17027
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c7da(%rip), %r15     # 0x1f8f0
cmpl $0x0, (%r15)
leaq 0x1c1ff(%rip), %r12     # 0x1f320
movq (%rsp), %r13
movq 0x18(%rsp), %rbp
je 0x31c0
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x178a1(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16604
testl %eax, %eax
je 0x3176
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x102, 0xc(%rax)       # imm = 0x102
movq 0x10(%rsp), %rdi
callq 0xf0bc
leaq 0x14f2e(%rip), %rdi     # 0x1809a
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f13
cmpl $0x0, (%r15)
je 0x31c0
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x17855(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16604
testl %eax, %eax
je 0x31c0
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x103, 0xc(%rax)       # imm = 0x103
movq %rbp, %rdi
callq 0xf0bc
leaq 0x14eee(%rip), %rdi     # 0x180a4
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f13
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
jmp 0x30ea
leaq 0x1c71b(%rip), %rax     # 0x1f8f0
cmpl $0x0, (%rax)
je 0x3233
leaq 0x1c13f(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x177f1(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16604
testl %eax, %eax
je 0x3233
leaq 0x1c11d(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x116, 0xc(%rax)       # imm = 0x116
movq 0x30(%rbx), %rdi
callq 0x1518d
movq %rax, %rdi
callq 0xf0bc
leaq 0x14e37(%rip), %rdi     # 0x18060
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f13
callq 0x2050
leaq 0x1c6b1(%rip), %rax     # 0x1f8f0
cmpl $0x0, (%rax)
je 0x3233
leaq 0x1c0d5(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x17787(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16604
testl %eax, %eax
je 0x3233
leaq 0x1c0b3(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x10f, 0xc(%rax)       # imm = 0x10F
movq %r13, %rdi
callq 0xf0bc
leaq 0x14e4c(%rip), %rdi     # 0x180d6
jmp 0x3229