// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/schemer.c
// Function: frame_beh
BEH_DECL(frame_beh)
{
	CONS* parent = MINE;
	CONS* p;
	CONS* state;
	CONS* msg;
	CONS* a;

	DBUG_ENTER("frame_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* verb;
		CONS* n;

		DBUG_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 (verb == ATOM("define")) {
			CONS* v = lst_first(p);

			DBUG_PRINT("", ("n = %s", cons_to_str(n)));
			DBUG_PRINT("", ("v = %s", cons_to_str(v)));
			a = ACTOR(THIS, parent);
			state = mk_pair(n, v);
			state = mk_pair(a, state);
			BECOME(binding_beh, state);
			SEND(to, ATOM("ok"));
		} else if (is_actor(parent)) {
			SEND(parent, WHAT);
		} else {
			DBUG_PRINT("", ("unknown"));
			msg = mk_list(n, mk_empty());
			msg = mk_list(ATOM("unknown-symbol"), msg);
			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 $0x38, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x15186
movq %rax, %rdi
callq 0xd2f1
movq %rax, %r15
leaq 0x14dd2(%rip), %rax     # 0x180e2
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1c001(%rip), %r12     # 0x1f320
movq (%r12), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x13c, 0xc(%rdi)       # imm = 0x13C
leaq 0x176a5(%rip), %rcx     # 0x1a9e0
movq %rcx, 0x10(%rdi)
leaq 0x1bdfa(%rip), %rcx     # 0x1f140
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x16ef2
movq 0x30(%rbx), %rdi
callq 0x15225
testq %rax, %rax
je 0x36df
movq 0x30(%rbx), %rdi
callq 0x15225
testb $0x3, %al
jne 0x36df
movq 0x30(%rbx), %rdi
callq 0x15225
cmpq 0x1bc3a(%rip), %rax     # 0x1efc0
je 0x36df
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
testq %rax, %rax
je 0x36df
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
testb $0x3, %al
jne 0x36df
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15225
cmpq 0x1bbe9(%rip), %rax     # 0x1efc0
je 0x36df
movq %rax, %r13
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0x15186
movq %rax, 0x8(%rsp)
movq %r13, %rdi
callq 0x15186
movq %rax, %rbp
movq %r13, %rdi
callq 0x15225
movq %rax, (%rsp)
leaq 0x1c4dc(%rip), %r13     # 0x1f8f0
cmpl $0x0, (%r13)
je 0x345f
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x175b6(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x345f
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x144, 0xc(%rax)       # imm = 0x144
movq %rbp, %rdi
callq 0xf17c
leaq 0x14c97(%rip), %rdi     # 0x180ec
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
movq %rbp, %rdi
callq 0x15186
movq %rax, %r14
movq %rbp, %rdi
callq 0x15225
movq %rax, %r12
movq %rax, %rdi
callq 0x15186
movq %rax, %rbp
movq %r12, %rdi
callq 0x15225
movq %rax, %r12
leaq 0x14c1d(%rip), %rdi     # 0x180af
callq 0x1265c
cmpq %rax, %r14
je 0x34bf
movl %r15d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x35e7
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x36b7
movq %r12, %rdi
callq 0x15186
movq %rax, %r12
cmpl $0x0, (%r13)
je 0x3521
leaq 0x1be48(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x174fa(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x3521
leaq 0x1be26(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x14d, 0xc(%rax)       # imm = 0x14D
movq %rbp, %rdi
callq 0xf17c
leaq 0x14ba4(%rip), %rdi     # 0x180bb
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
cmpl $0x0, (%r13)
je 0x3578
leaq 0x1bdf1(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x174a3(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x3578
leaq 0x1bdcf(%rip), %rax     # 0x1f320
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x14e, 0xc(%rax)       # imm = 0x14E
movq %r12, %rdi
callq 0xf17c
leaq 0x14b54(%rip), %rdi     # 0x180c2
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
movq 0x30(%rbx), %rdi
callq 0x15186
movq %rax, %rdi
callq 0xd2b8
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xde1a
movq %rax, %r14
movq %rbp, %rdi
movq %r12, %rsi
callq 0x15164
movq %r14, %rdi
movq %rax, %rsi
callq 0x15164
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x15186
leaq -0x785(%rip), %rsi      # 0x2e3e
movq %rax, %rdi
movq %r14, %rdx
callq 0xd500
leaq 0x14afe(%rip), %rdi     # 0x180d3
callq 0x1265c
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
jmp 0x36b7
cmpl $0x0, (%r13)
leaq 0x1bd2d(%rip), %r14     # 0x1f320
je 0x362c
movq (%r14), %rax
movq 0x50(%rax), %rax
leaq 0x173dd(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x362c
movq (%r14), %rax
movq 0x50(%rax), %rax
movl $0x157, 0xc(%rax)       # imm = 0x157
leaq 0x14ad1(%rip), %rdi     # 0x180f6
xorl %eax, %eax
callq 0x16f63
leaq 0x1bc5d(%rip), %r14     # 0x1f290
movq %rbp, %rdi
movq %r14, %rsi
callq 0x15164
movq %rax, %r15
leaq 0x14ab6(%rip), %rdi     # 0x180fe
callq 0x1265c
movq %rax, %rdi
movq %r15, %rsi
callq 0x15164
leaq -0xb87(%rip), %rsi      # 0x2ad8
movq %rbx, %rdi
movq %rax, %rdx
callq 0xde1a
movq %rax, %r15
leaq 0x14a16(%rip), %rdi     # 0x1808a
callq 0x1265c
movq %rax, %r12
callq 0xd26a
movq %rax, %rdi
movq %r14, %rsi
callq 0x15164
movq %r12, %rdi
movq %rax, %rsi
callq 0x15164
movq %rax, %rdi
movq (%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 0x10(%rsp), %rdi
movl $0x160, 0xc(%rdi)       # imm = 0x160
callq 0x17077
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c20a(%rip), %rax     # 0x1f8f0
cmpl $0x0, (%rax)
je 0x3738
movq (%r12), %rax
movq 0x50(%rax), %rax
leaq 0x172e6(%rip), %rdi     # 0x1a9e0
movq %rdi, 0x10(%rax)
callq 0x16664
testl %eax, %eax
je 0x3738
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0x15d, 0xc(%rax)       # imm = 0x15D
movq 0x30(%rbx), %rdi
callq 0x15225
movq %rax, %rdi
callq 0xf17c
leaq 0x14932(%rip), %rdi     # 0x18060
movq %rax, %rsi
xorl %eax, %eax
callq 0x16f63
callq 0x2050