// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/emit.c
// Function: tail_to_str
static void
tail_to_str(int depth, int length, char* buf, CONS* cons)
{
	int n;

	XDBUG_ENTER("tail_to_str");
#if 0
	child_to_str((depth - 1), buf, car(cons));
	n = strlen(buf);
	if (n < (CONS_BUFSZ - 3)) {
		buf[n++] = ',';
		buf[n++] = ' ';
		buf[n] = '\0';
	}
	child_to_str((depth - 1), buf, cdr(cons));
#else
	if (length < 0) {			/* length limit */
		n = strlen(buf);
		if (n < (CONS_BUFSZ - 4)) {
			buf[n++] = '.';
			buf[n++] = '.';
			buf[n++] = '.';
			buf[n] = '\0';
		}
	} else {
		child_to_str((depth - 1), buf, car(cons));
		n = strlen(buf);
		if (n < (CONS_BUFSZ - 3)) {
			buf[n++] = ',';
			buf[n++] = ' ';
			buf[n] = '\0';
		}
		cons = cdr(cons);	/* advance to tail */
		if (nilp(cons) || actorp(cons) || !consp(cons)) {
			child_to_str((depth - 1), buf, cons);
		} else {
			tail_to_str(depth, (length - 1), buf, cons);
		}
	}
#endif
	XDBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x21384
movq -0x10(%rbp), %rdi
callq 0x20c0
movl %eax, -0x1c(%rbp)
cmpl $0x3fc, -0x1c(%rbp)     # imm = 0x3FC
jge 0x2137f
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x21499
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x25380
movl -0x2c(%rbp), %edi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
callq 0x21270
movq -0x10(%rbp), %rdi
callq 0x20c0
movl %eax, -0x1c(%rbp)
cmpl $0x3fd, -0x1c(%rbp)     # imm = 0x3FD
jge 0x213fa
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $0x2c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $0x20, (%rax,%rcx)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rdi
callq 0x25510
movq %rax, -0x18(%rbp)
leaq 0xde82(%rip), %rax      # 0x2f290
cmpq %rax, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
jne 0x2146c
movq -0x18(%rbp), %rax
andq $0x3, %rax
cmpq $0x1, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
jne 0x2146c
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x2d(%rbp)
je 0x2145c
movq -0x18(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
jne 0x21481
movl -0x4(%rbp), %edi
subl $0x1, %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x21270
jmp 0x21497
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
subl $0x1, %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x21300
jmp 0x21499
addq $0x30, %rsp
popq %rbp
retq
nop