// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/kernel.c
// Function: appl_type
static
BEH_DECL(appl_type)
{
	CONS* comb = MINE;
	CONS* msg = WHAT;
	CONS* cust;
	CONS* req;

	DBUG_ENTER("appl_type");
	ENSURE(actorp(comb));
	ENSURE(is_pr(msg));
	cust = hd(msg);
	ENSURE(actorp(cust));
	req = tl(msg);

	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(appl_type)) ? a_true : a_false));
	} else if (is_pr(req) && is_pr(tl(req))
	&& (hd(req) == ATOM("comb"))) {
		CONS* opnds = hd(tl(req));
		CONS* env = tl(tl(req));
		CONS* k_args = ACTOR(appl_args_beh, pr(cust, pr(comb, env)));

		SEND(opnds, pr(k_args, pr(ATOM("map"), pr(ATOM("eval"), env))));
	} else if (req == ATOM("unwrap")) {
		SEND(cust, comb);
	} else if (req == ATOM("write")) {
		SINK* sink = current_sink;
		SEND(cust, (sink->put_cstr)(sink, "#applicative"));
	} 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, %r14
movq 0x30(%rbx), %rdi
callq 0x19306
movq %rax, %r12
leaq 0x127e0(%rip), %rax     # 0x1c98a
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0x1a179(%rip), %r13     # 0x24330
movq (%r13), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x2e7, 0xc(%rdi)       # imm = 0x2E7
leaq 0x12177(%rip), %rcx     # 0x1c34a
movq %rcx, 0x10(%rdi)
leaq 0x19f72(%rip), %rcx     # 0x24150
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b079
movl %r14d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0xa36a
cmpq 0x19dbf(%rip), %r12     # 0x23fc0
je 0xa3ce
testq %r12, %r12
je 0xa3ce
movl %r12d, %eax
andl $0x3, %eax
jne 0xa3ce
movq %r12, %rdi
callq 0x191fb
movq %rax, %r15
andl $0x3, %eax
cmpl $0x1, %eax
jne 0xa432
movq %r12, %rdi
callq 0x19306
movq %rax, %r12
leaq 0x1a6eb(%rip), %rbp     # 0x24930
cmpl $0x0, (%rbp)
je 0xa2dd
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x122d8(%rip), %rdi     # 0x1c536
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0xa293
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x2ee, 0xc(%rax)       # imm = 0x2EE
movq %r15, %rdi
callq 0x13708
leaq 0x132ab(%rip), %rdi     # 0x1d534
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
cmpl $0x0, (%rbp)
je 0xa2dd
movq (%r13), %rax
movq 0x50(%rax), %rax
leaq 0x12293(%rip), %rdi     # 0x1c53b
movq %rdi, 0x10(%rax)
callq 0x1a7f4
testl %eax, %eax
je 0xa2dd
movq (%r13), %rax
movq 0x50(%rax), %rax
movl $0x2ef, 0xc(%rax)       # imm = 0x2EF
movq %r12, %rdi
callq 0x13708
leaq 0x13261(%rip), %rdi     # 0x1d534
movq %rax, %rsi
xorl %eax, %eax
callq 0x1b0f0
cmpq 0x19cdc(%rip), %r12     # 0x23fc0
je 0xa333
testq %r12, %r12
je 0xa333
movl %r12d, %eax
andl $0x3, %eax
jne 0xa333
movq %r12, %rdi
callq 0x191fb
movq %rax, %r13
leaq 0x1228c(%rip), %rdi     # 0x1c591
callq 0x1691f
movq %rax, %rbp
movq %r12, %rdi
callq 0x19306
cmpq %rbp, %r13
je 0xa4ba
testq %rax, %rax
je 0xa333
movq %r12, %rdi
callq 0x19306
testb $0x3, %al
je 0xa50b
leaq 0x125a1(%rip), %rdi     # 0x1c8db
callq 0x1691f
cmpq %rax, %r12
je 0xa493
leaq 0x12281(%rip), %rdi     # 0x1c5d0
callq 0x1691f
cmpq %rax, %r12
je 0xa49e
movq %rbx, %rdi
callq 0x8053
jmp 0xa4ec
leaq -0x4da5(%rip), %rsi     # 0x55cc
leaq 0x19f28(%rip), %rdx     # 0x242a0
movq %rbx, %rdi
callq 0x123b7
movq %rax, %r14
leaq 0x121a9(%rip), %rdi     # 0x1c533
callq 0x1691f
movq %rax, %r15
leaq 0x11c83(%rip), %rdi     # 0x1c01c
callq 0x1691f
movl $0xba3, %esi            # imm = 0xBA3
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 $0x2e8, %eax            # imm = 0x2E8
jmp 0xa4f1
leaq -0x4e09(%rip), %rsi     # 0x55cc
leaq 0x19ec4(%rip), %rdx     # 0x242a0
movq %rbx, %rdi
callq 0x123b7
movq %rax, %r14
leaq 0x12145(%rip), %rdi     # 0x1c533
callq 0x1691f
movq %rax, %r15
leaq 0x11c1f(%rip), %rdi     # 0x1c01c
callq 0x1691f
movl $0xba7, %esi            # imm = 0xBA7
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 $0x2e9, %eax            # imm = 0x2E9
jmp 0xa4f1
leaq -0x4e6d(%rip), %rsi     # 0x55cc
leaq 0x19e60(%rip), %rdx     # 0x242a0
movq %rbx, %rdi
callq 0x123b7
movq %rax, %r14
leaq 0x120e1(%rip), %rdi     # 0x1c533
callq 0x1691f
movq %rax, %r15
leaq 0x11bbb(%rip), %rdi     # 0x1c01c
callq 0x1691f
movl $0xbaf, %esi            # imm = 0xBAF
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 $0x2eb, %eax            # imm = 0x2EB
jmp 0xa4f1
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
jmp 0xa4e7
movq 0x19f13(%rip), %rdi     # 0x243b8
leaq 0x124e8(%rip), %rsi     # 0x1c994
callq *0x10(%rdi)
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
jmp 0xa4e7
leaq -0x34f(%rip), %rcx      # 0xa172
leaq 0x3(,%rcx,4), %rcx
cmpq %rcx, %rax
leaq 0x19eb5(%rip), %rax     # 0x24388
leaq 0x19ea6(%rip), %rcx     # 0x24380
cmoveq %rax, %rcx
movq (%rcx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12494
movl $0x302, %eax            # imm = 0x302
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 0x19aa6(%rip), %rax     # 0x23fc0
je 0xa333
movq %r12, %rdi
callq 0x19306
andl $0x3, %eax
cmpl $0x1, %eax
je 0xa333
movq %r12, %rdi
callq 0x191fb
movq %rax, %r13
leaq 0x120b8(%rip), %rdi     # 0x1c5fe
callq 0x1691f
cmpq %rax, %r13
jne 0xa333
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
movq %r14, %rdi
movq %rax, %rsi
callq 0x19164
movq %r15, %rdi
movq %rax, %rsi
callq 0x19164
leaq 0x503d(%rip), %rsi      # 0xf5d4
movq %rbx, %rdi
movq %rax, %rdx
callq 0x123b7
movq %rax, %r14
leaq 0x1201a(%rip), %rdi     # 0x1c5c6
callq 0x1691f
movq %rax, %r15
leaq 0x11fde(%rip), %rdi     # 0x1c599
callq 0x1691f
movq %rax, %rdi
movq %r12, %rsi
callq 0x19164
movq %r15, %rdi
movq %rax, %rsi
callq 0x19164
movq %r14, %rdi
movq %rax, %rsi
callq 0x19164
movq %rbx, %rdi
movq %r13, %rsi
jmp 0xa4b5