// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/kernel.c
// Function: symbol_type
static
BEH_DECL(symbol_type)
{
	CONS* name = MINE;
	CONS* msg = WHAT;
	CONS* cust;
	CONS* req;

	DBUG_ENTER("symbol_type");
	ENSURE(is_pr(msg));
	cust = hd(msg);
	ENSURE(actorp(cust));
	req = tl(msg);

	DBUG_PRINT("name", ("%s", cons_to_str(name)));
	DBUG_PRINT("cust", ("%s", cons_to_str(cust)));
	DBUG_PRINT("req", ("%s", cons_to_str(req)));
	if (is_pr(req)
	&& (hd(req) == ATOM("type_eq"))) {
		SEND(cust, ((tl(req) == MK_REF(symbol_type)) ? a_true : a_false));
	} else if (is_pr(req)
	&& (hd(req) == ATOM("eval"))) {
		CONS* env = tl(req);

		SEND(env, pr(cust, pr(ATOM("lookup"), name)));
	} else if (is_pr(req) && is_pr(tl(req))
	&& (hd(req) == ATOM("match"))) {
		CONS* value = hd(tl(req));
		CONS* env = tl(tl(req));

		SEND(env, pr(cust, pr(ATOM("bind"), pr(name, value))));
	} else if (req == ATOM("write")) {
		SINK* sink = current_sink;
		char* s = printable(name);
		SEND(cust, (sink->put_cstr)(sink, s));
		FREE(s);
	} else {
		object_type(CFG);  /* DELEGATE BEHAVIOR */
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x191fb
movq %rax, %rdi
callq 0x1175b
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0x19306
movq %rax, %r12
leaq 0x1417f(%rip), %rax     # 0x1c7c9
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x1bcd9(%rip), %r13     # 0x24330
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x59d, 0xc(%rdi)       # imm = 0x59D
leaq 0x13cd7(%rip), %rcx     # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x1bad2(%rip), %rcx     # 0x24150
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b079
cmpq 0x1b92e(%rip), %r12     # 0x23fc0
je 0x8854
testq %r12, %r12
je 0x8854
movl %r12d, %eax
andl $0x3, %eax
jne 0x8854
movq %r12, %rdi
callq 0x191fb
movq %rax, %r14
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x88b8
movq %r12, %rdi
callq 0x19306
movq %rax, %r12
leaq 0x1c25a(%rip), %rbp     # 0x24930
cmpl $0x0, (%rbp)
je 0x87bc
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x140d5(%rip), %rdi     # 0x1c7c4
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x8724
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x5a3, 0xc(%rax)       # imm = 0x5A3
movq %r15, %rdi
callq 0x13708
leaq 0x14e1a(%rip), %rdi     # 0x1d534
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
cmpl $0x0, (%rbp)
je 0x87bc
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x13df9(%rip), %rdi     # 0x1c536
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x8772
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x5a4, 0xc(%rax)       # imm = 0x5A4
movq %r14, %rdi
callq 0x13708
leaq 0x14dcc(%rip), %rdi     # 0x1d534
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
cmpl $0x0, (%rbp)
je 0x87bc
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x13db4(%rip), %rdi     # 0x1c53b
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0x87bc
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x5a5, 0xc(%rax)       # imm = 0x5A5
movq %r12, %rdi
callq 0x13708
leaq 0x14d82(%rip), %rdi     # 0x1d534
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
cmpq 0x1b7fd(%rip), %r12     # 0x23fc0
je 0x8832
testq %r12, %r12
je 0x8832
movl %r12d, %eax
andl $0x3, %eax
jne 0x8832
movq %r12, %rdi
callq 0x191fb
movq %rax, %r13
leaq 0x13dad(%rip), %rdi     # 0x1c591
callq 0x1691f
cmpq %rax, %r13
je 0x8951
movq %r12, %rdi
callq 0x191fb
movq %rax, %rbp
leaq 0x13d95(%rip), %rdi     # 0x1c599
callq 0x1691f
movq %rax, %r13
movq %r12, %rdi
callq 0x19306
cmpq %r13, %rbp
je 0x8988
testq %rax, %rax
je 0x8832
movq %r12, %rdi
callq 0x19306
testb $0x3, %al
je 0x89da
leaq 0x13d97(%rip), %rdi     # 0x1c5d0
callq 0x1691f
cmpq %rax, %r12
je 0x891c
movq %rbx, %rdi
callq 0x8053
jmp 0x89bb
leaq -0x328f(%rip), %rsi     # 0x55cc
leaq 0x1ba3e(%rip), %rdx     # 0x242a0
movq %rbx, %rdi
callq 0x123b7
movq %rax, %r14
leaq 0x13cbf(%rip), %rdi     # 0x1c533
callq 0x1691f
movq %rax, %r15
leaq 0x13799(%rip), %rdi     # 0x1c01c
callq 0x1691f
movl $0x167b, %esi           # imm = 0x167B
movq %rax, %rdi
callq 0x19164
movq %r15, %rdi
movq %rax, %rsi
callq 0x19164
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12494
movl $0x59e, %eax            # imm = 0x59E
jmp 0x89c0
leaq -0x32f3(%rip), %rsi     # 0x55cc
leaq 0x1b9da(%rip), %rdx     # 0x242a0
movq %rbx, %rdi
callq 0x123b7
movq %rax, %r14
leaq 0x13c5b(%rip), %rdi     # 0x1c533
callq 0x1691f
movq %rax, %r15
leaq 0x13735(%rip), %rdi     # 0x1c01c
callq 0x1691f
movl $0x1683, %esi           # imm = 0x1683
movq %rax, %rdi
callq 0x19164
movq %r15, %rdi
movq %rax, %rsi
callq 0x19164
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12494
movl $0x5a0, %eax            # imm = 0x5A0
jmp 0x89c0
movq 0x1ba95(%rip), %r12     # 0x243b8
movq %r15, %rdi
callq 0x8011
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq *0x10(%r12)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12494
movq %r15, %rdi
callq 0x2030
jmp 0x89bb
movq %r12, %rdi
callq 0x19306
leaq -0x34e(%rip), %rcx      # 0x8612
leaq 0x3(,%rcx,4), %rcx
cmpq %rcx, %rax
leaq 0x1ba16(%rip), %rax     # 0x24388
leaq 0x1ba07(%rip), %rcx     # 0x24380
cmoveq %rax, %rcx
movq (%rcx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x89b6
leaq 0x13e46(%rip), %rdi     # 0x1c7d5
movq %rax, %r12
callq 0x1691f
movq %rax, %rdi
movq %r15, %rsi
callq 0x19164
movq %r14, %rdi
movq %rax, %rsi
callq 0x19164
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x12494
movl $0x5bc, %eax            # imm = 0x5BC
movq %rsp, %rdi
movl %eax, 0xc(%rdi)
callq 0x1b1f2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x19306
cmpq 0x1b5d7(%rip), %rax     # 0x23fc0
je 0x8832
movq %r12, %rdi
callq 0x19306
andl $0x3, %eax
cmpl $0x1, %eax
je 0x8832
movq %r12, %rdi
callq 0x191fb
movq %rax, %r13
leaq 0x13b9f(%rip), %rdi     # 0x1c5b4
callq 0x1691f
cmpq %rax, %r13
jne 0x8832
movq %r12, %rdi
callq 0x19306
movq %rax, %rdi
callq 0x191fb
movq %rax, %r13
movq %r12, %rdi
callq 0x19306
movq %rax, %rdi
callq 0x19306
movq %rax, %r12
leaq 0x13d8c(%rip), %rdi     # 0x1c7dc
callq 0x1691f
movq %rax, %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0x19164
movq %rbp, %rdi
movq %rax, %rsi
jmp 0x899d