// File: /workspace/github_c_makefile_star2_O2/dalnefre[P]kernel_abe/emit.c
// Function: test_cons_to_str
void
test_cons_to_str()
{
	CONS* value;
	char* actual;
	char expect[256];

	DBUG_ENTER("test_cons_to_str");
	TRACE(printf("--test_cons_to_str--\n"));

	ASSERT_CONS_TO_STR(NIL, "NIL", actual);

	ASSERT_CONS_TO_STR(TRUE, "TRUE", actual);

	ASSERT_CONS_TO_STR(FALSE, "FALSE", actual);

	ASSERT_CONS_TO_STR(ATOM("TRUE"), "#TRUE", actual);

	ASSERT_CONS_TO_STR(ATOM("#x,y"), "#\"#x,y\"", actual);

	ASSERT_CONS_TO_STR(NUMBER(0), "0", actual);

	ASSERT_CONS_TO_STR(NUMBER(1), "1", actual);

	ASSERT_CONS_TO_STR(NUMBER(-1), "-1", actual);

	value = MK_FUNC(test_cons_to_str);
#if NUMBER_IS_FUNC
	sprintf(expect, "%d", (int)MK_PTR(value));
#else
	sprintf(expect, "^%lx", (ulint)MK_PTR(value));
#endif
	ASSERT_CONS_TO_STR(value, expect, actual);

	value = CFG_ACTOR(NULL, sink_beh, NIL);
	sprintf(expect, "@%lx[^%lx, NIL]", (ulint)value, (ulint)sink_beh);
	ASSERT_CONS_TO_STR(value, expect, actual);
#if 0
	rplacd(value, value);  /* FIXME: CIRCULAR LINK FORCED FOR TESTING */
	ASSERT_CONS_TO_STR(value, expect, actual);
#endif

	ASSERT_CONS_TO_STR(cons(NUMBER(0), NIL), "(0, NIL)", actual);

	value = cons(
		FALSE, 
		cons(
			cons(
				ATOM("x"),
				NUMBER(0)
			),
			NIL
		)
	);
	ASSERT_CONS_TO_STR(value, "(FALSE, (#x, 0), NIL)", actual);

	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
leaq 0x97fd(%rip), %rax      # 0x1d120
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x109fe(%rip), %r12     # 0x24330
movq (%r12), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0xb8, 0xc(%rdi)
leaq 0x89fc(%rip), %rbx      # 0x1c34a
movq %rbx, 0x10(%rdi)
leaq 0x10867(%rip), %rcx     # 0x241c0
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0x1b079
leaq 0x9f97(%rip), %rdi      # 0x1d904
callq 0x20a0
leaq 0x10927(%rip), %rdi     # 0x242a0
callq 0x13708
leaq 0x10fab(%rip), %r13     # 0x24930
cmpl $0x0, (%r13)
je 0x139cf
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x139cf
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xbb, 0xc(%rax)
leaq 0x9777(%rip), %rdi      # 0x1d131
leaq 0xaaa8(%rip), %rsi      # 0x1e469
leaq 0x10a28(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
cmpl $0x4c494e, 0x10a17(%rip) # imm = 0x4C494E
jne 0x13f48
pushq $0x1
popq %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13a31
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13a31
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xbd, 0xc(%rax)
leaq 0x9715(%rip), %rdi      # 0x1d131
leaq 0xa48b(%rip), %rsi      # 0x1deae
leaq 0x109c6(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
leaq 0xa476(%rip), %rdi      # 0x1deae
leaq 0x109b1(%rip), %rsi     # 0x243f0
pushq $0x5
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x13f67
xorl %edi, %edi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13aa0
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13aa0
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xbf, 0xc(%rax)
leaq 0x96a6(%rip), %rdi      # 0x1d131
leaq 0xa452(%rip), %rsi      # 0x1dee4
leaq 0x10957(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
leaq 0xa43d(%rip), %rdi      # 0x1dee4
leaq 0x10942(%rip), %rsi     # 0x243f0
pushq $0x6
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x13f86
leaq 0xa3e9(%rip), %rdi      # 0x1deae
callq 0x1691f
movq %rax, %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13b1c
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13b1c
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xc1, 0xc(%rax)
leaq 0x962a(%rip), %rdi      # 0x1d131
leaq 0x969e(%rip), %rsi      # 0x1d1ac
leaq 0x108db(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
leaq 0x9689(%rip), %rdi      # 0x1d1ac
leaq 0x108c6(%rip), %rsi     # 0x243f0
pushq $0x6
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x13fa5
leaq 0x968e(%rip), %rdi      # 0x1d1cf
callq 0x1691f
movq %rax, %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13b98
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13b98
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xc3, 0xc(%rax)
leaq 0x95ae(%rip), %rdi      # 0x1d131
leaq 0x964a(%rip), %rsi      # 0x1d1d4
leaq 0x1085f(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
movabsq $0x22792c78232223, %rax # imm = 0x22792C78232223
cmpq %rax, 0x10847(%rip)     # 0x243f0
jne 0x13fc4
pushq $0x3
popq %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13c01
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13c01
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xc5, 0xc(%rax)
leaq 0x9545(%rip), %rdi      # 0x1d131
leaq 0x9f66(%rip), %rsi      # 0x1db59
leaq 0x107f6(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
cmpw $0x30, 0x107e7(%rip)    # 0x243f0
jne 0x13fe3
pushq $0x7
popq %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13c61
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13c61
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xc7, 0xc(%rax)
leaq 0x94e5(%rip), %rdi      # 0x1d131
leaq 0xa1ec(%rip), %rsi      # 0x1de3f
leaq 0x10796(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
cmpw $0x31, 0x10787(%rip)    # 0x243f0
jne 0x14002
pushq $-0x1
popq %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13cc1
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13cc1
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xc9, 0xc(%rax)
leaq 0x9485(%rip), %rdi      # 0x1d131
leaq 0x957c(%rip), %rsi      # 0x1d22f
leaq 0x10736(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
leaq 0x9567(%rip), %rdi      # 0x1d22f
leaq 0x10721(%rip), %rsi     # 0x243f0
pushq $0x3
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x14021
leaq -0x3da(%rip), %rdx      # 0x1390c
leaq 0x3(,%rdx,4), %r14
leaq 0x99db(%rip), %rsi      # 0x1d6d0
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0x2230
movq %r14, %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13d51
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13d51
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xd1, 0xc(%rax)
leaq 0x93f3(%rip), %rdi      # 0x1d131
leaq 0x106ab(%rip), %rdx     # 0x243f0
leaq 0x30(%rsp), %rsi
xorl %eax, %eax
callq 0x1b0f0
leaq 0x10698(%rip), %rsi     # 0x243f0
leaq 0x30(%rsp), %rdi
callq 0x2170
testl %eax, %eax
jne 0x14040
leaq -0x25e5(%rip), %r14     # 0x1178c
leaq 0x10528(%rip), %rdx     # 0x242a0
xorl %edi, %edi
movq %r14, %rsi
callq 0x123b7
movq %rax, %r15
leaq 0x94dc(%rip), %rsi      # 0x1d268
leaq 0x30(%rsp), %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2230
movq %r15, %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13dee
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13dee
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xd5, 0xc(%rax)
leaq 0x9356(%rip), %rdi      # 0x1d131
leaq 0x1060e(%rip), %rdx     # 0x243f0
leaq 0x30(%rsp), %rsi
xorl %eax, %eax
callq 0x1b0f0
leaq 0x105fb(%rip), %rsi     # 0x243f0
leaq 0x30(%rsp), %rdi
callq 0x2170
testl %eax, %eax
jne 0x1405f
leaq 0x10492(%rip), %rsi     # 0x242a0
pushq $0x3
popq %rdi
callq 0x19164
movq %rax, %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13e68
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13e68
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xdb, 0xc(%rax)
leaq 0x92de(%rip), %rdi      # 0x1d131
leaq 0x941e(%rip), %rsi      # 0x1d278
leaq 0x1058f(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
leaq 0x9409(%rip), %rdi      # 0x1d278
leaq 0x1057a(%rip), %rsi     # 0x243f0
pushq $0x9
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x1407e
leaq 0x9e79(%rip), %rdi      # 0x1dd06
callq 0x1691f
pushq $0x3
popq %rsi
movq %rax, %rdi
callq 0x19164
leaq 0x103fc(%rip), %rsi     # 0x242a0
movq %rax, %rdi
callq 0x19164
xorl %edi, %edi
movq %rax, %rsi
callq 0x19164
movq %rax, %rdi
callq 0x13708
cmpl $0x0, (%r13)
je 0x13f08
movq (%r12), %rax
movq 0x50(%rax), %rax
movq %rbx, 0x10(%rax)
movq %rbx, %rdi
callq 0x1a7f4
testl %eax, %eax
je 0x13f08
movq (%r12), %rax
movq 0x50(%rax), %rax
movl $0xe7, 0xc(%rax)
leaq 0x923e(%rip), %rdi      # 0x1d131
leaq 0x93a7(%rip), %rsi      # 0x1d2a1
leaq 0x104ef(%rip), %rdx     # 0x243f0
xorl %eax, %eax
callq 0x1b0f0
leaq 0x9392(%rip), %rdi      # 0x1d2a1
leaq 0x104da(%rip), %rsi     # 0x243f0
pushq $0x16
popq %rdx
callq 0x21d0
testl %eax, %eax
jne 0x1409d
leaq 0x8(%rsp), %rdi
movl $0xe9, 0xc(%rdi)
callq 0x1b1f2
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x91ea(%rip), %rdi      # 0x1d139
leaq 0x91fe(%rip), %rsi      # 0x1d154
leaq 0x91fe(%rip), %rcx      # 0x1d15b
movl $0xbb, %edx
callq 0x2100
leaq 0x9205(%rip), %rdi      # 0x1d173
leaq 0x91df(%rip), %rsi      # 0x1d154
leaq 0x91df(%rip), %rcx      # 0x1d15b
movl $0xbd, %edx
callq 0x2100
leaq 0x9202(%rip), %rdi      # 0x1d18f
leaq 0x91c0(%rip), %rsi      # 0x1d154
leaq 0x91c0(%rip), %rcx      # 0x1d15b
movl $0xbf, %edx
callq 0x2100
leaq 0x9206(%rip), %rdi      # 0x1d1b2
leaq 0x91a1(%rip), %rsi      # 0x1d154
leaq 0x91a1(%rip), %rcx      # 0x1d15b
movl $0xc1, %edx
callq 0x2100
leaq 0x9211(%rip), %rdi      # 0x1d1dc
leaq 0x9182(%rip), %rsi      # 0x1d154
leaq 0x9182(%rip), %rcx      # 0x1d15b
movl $0xc3, %edx
callq 0x2100
leaq 0x9213(%rip), %rdi      # 0x1d1fd
leaq 0x9163(%rip), %rsi      # 0x1d154
leaq 0x9163(%rip), %rcx      # 0x1d15b
movl $0xc5, %edx
callq 0x2100
leaq 0x920d(%rip), %rdi      # 0x1d216
leaq 0x9144(%rip), %rsi      # 0x1d154
leaq 0x9144(%rip), %rcx      # 0x1d15b
movl $0xc7, %edx
callq 0x2100
leaq 0x920a(%rip), %rdi      # 0x1d232
leaq 0x9125(%rip), %rsi      # 0x1d154
leaq 0x9125(%rip), %rcx      # 0x1d15b
movl $0xc9, %edx
callq 0x2100
leaq 0x9205(%rip), %rdi      # 0x1d24c
leaq 0x9106(%rip), %rsi      # 0x1d154
leaq 0x9106(%rip), %rcx      # 0x1d15b
movl $0xd1, %edx
callq 0x2100
leaq 0x91e6(%rip), %rdi      # 0x1d24c
leaq 0x90e7(%rip), %rsi      # 0x1d154
leaq 0x90e7(%rip), %rcx      # 0x1d15b
movl $0xd5, %edx
callq 0x2100
leaq 0x91fc(%rip), %rdi      # 0x1d281
leaq 0x90c8(%rip), %rsi      # 0x1d154
leaq 0x90c8(%rip), %rcx      # 0x1d15b
movl $0xdb, %edx
callq 0x2100
leaq 0x9213(%rip), %rdi      # 0x1d2b7
leaq 0x90a9(%rip), %rsi      # 0x1d154
leaq 0x90a9(%rip), %rcx      # 0x1d15b
movl $0xe7, %edx
callq 0x2100