// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/kernel.c
// Function: const_type
static
BEH_DECL(const_type)  /* FIXME: extend to implement encapsulation types */
{
	CONS* value = MINE;
	CONS* msg = WHAT;
	CONS* cust;
	CONS* req;

	DBUG_ENTER("const_type");
	ENSURE(is_pr(msg));
	cust = hd(msg);
	ENSURE(actorp(cust));
	req = tl(msg);

	DBUG_PRINT("value", ("%s", cons_to_str(value)));
	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(const_type)) ? a_true : a_false));
	} else if (req == ATOM("value")) {
		SEND(cust, value);
	} else if (req == ATOM("write")) {
		SINK* sink = current_sink;
		char* s = printable(value);
		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 0x19ba6
movq %rax, %rdi
callq 0x11d11
movq %rax, %r14
movq 0x30(%rbx), %rdi
callq 0x19c45
movq %rax, %r12
leaq 0x14475(%rip), %rax     # 0x1c77d
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x1b01b(%rip), %r13     # 0x23330
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x319, 0xc(%rdi)       # imm = 0x319
leaq 0x14019(%rip), %rcx     # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x1ae14(%rip), %rcx     # 0x23150
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b912
cmpq 0x1ac70(%rip), %r12     # 0x22fc0
je 0x84df
testq %r12, %r12
je 0x84df
movl %r12d, %eax
andl $0x3, %eax
jne 0x84df
movq %r12, %rdi
callq 0x19ba6
movq %rax, %r15
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x8543
movq %r12, %rdi
callq 0x19c45
movq %rax, %r12
leaq 0x1b59c(%rip), %rbp     # 0x23930
cmpl $0x0, (%rbp)
je 0x83de
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x15d1e(%rip), %rdi     # 0x1e0c7
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x83de
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x31f, 0xc(%rax)       # imm = 0x31F
movq %r14, %rdi
callq 0x13b9c
leaq 0x15180(%rip), %rdi     # 0x1d554
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
cmpl $0x0, (%rbp)
je 0x8428
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x14143(%rip), %rdi     # 0x1c536
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x8428
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x320, 0xc(%rax)       # imm = 0x320
movq %r15, %rdi
callq 0x13b9c
leaq 0x15136(%rip), %rdi     # 0x1d554
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
cmpl $0x0, (%rbp)
je 0x8472
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x140fe(%rip), %rdi     # 0x1c53b
movq %rdi, 0x10(%rax)
callq 0x1b084
testl %eax, %eax
je 0x8472
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x321, 0xc(%rax)       # imm = 0x321
movq %r12, %rdi
callq 0x13b9c
leaq 0x150ec(%rip), %rdi     # 0x1d554
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b983
cmpq 0x1ab47(%rip), %r12     # 0x22fc0
je 0x84a8
testq %r12, %r12
je 0x84a8
movl %r12d, %eax
andl $0x3, %eax
jne 0x84a8
movq %r12, %rdi
callq 0x19ba6
movq %rax, %r13
leaq 0x140f7(%rip), %rdi     # 0x1c591
callq 0x1707c
cmpq %rax, %r13
je 0x85e4
leaq 0x15c18(%rip), %rdi     # 0x1e0c7
callq 0x1707c
cmpq %rax, %r12
je 0x85a4
leaq 0x1410c(%rip), %rdi     # 0x1c5d0
callq 0x1707c
cmpq %rax, %r12
je 0x85af
movq %rbx, %rdi
callq 0x8681
jmp 0x861e
leaq -0x28f1(%rip), %rsi     # 0x5bf5
leaq 0x1adb3(%rip), %rdx     # 0x232a0
movq %rbx, %rdi
callq 0x1283a
movq %rax, %r14
leaq 0x14034(%rip), %rdi     # 0x1c533
callq 0x1707c
movq %rax, %r15
leaq 0x13b0e(%rip), %rdi     # 0x1c01c
callq 0x1707c
movl $0xc6b, %esi            # imm = 0xC6B
movq %rax, %rdi
callq 0x19b84
movq %r15, %rdi
movq %rax, %rsi
callq 0x19b84
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12917
movl $0x31a, %eax            # imm = 0x31A
jmp 0x8623
leaq -0x2955(%rip), %rsi     # 0x5bf5
leaq 0x1ad4f(%rip), %rdx     # 0x232a0
movq %rbx, %rdi
callq 0x1283a
movq %rax, %r14
leaq 0x13fd0(%rip), %rdi     # 0x1c533
callq 0x1707c
movq %rax, %r15
leaq 0x13aaa(%rip), %rdi     # 0x1c01c
callq 0x1707c
movl $0xc73, %esi            # imm = 0xC73
movq %rax, %rdi
callq 0x19b84
movq %r15, %rdi
movq %rax, %rsi
callq 0x19b84
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x12917
movl $0x31c, %eax            # imm = 0x31C
jmp 0x8623
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
jmp 0x8619
movq 0x1ae02(%rip), %r12     # 0x233b8
movq %r14, %rdi
callq 0x863d
movq %rax, %r14
movq %r12, %rdi
movq %rax, %rsi
callq *0x10(%r12)
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x12917
movq %r14, %rdi
callq 0x2030
jmp 0x861e
movq %r12, %rdi
callq 0x19c45
leaq -0x323(%rip), %rcx      # 0x82d0
leaq 0x3(,%rcx,4), %rcx
cmpq %rcx, %rax
leaq 0x1ad83(%rip), %rax     # 0x23388
leaq 0x1ad74(%rip), %rcx     # 0x23380
cmoveq %rax, %rcx
movq (%rcx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12917
movl $0x32f, %eax            # imm = 0x32F
movq %rsp, %rdi
movl %eax, 0xc(%rdi)
callq 0x1ba97
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq