// File: /workspace/github_c_makefile_star2_O2/eiselekd[P]MinimalLisp/./l1.c
// Function: print
void _print(ctx *cctx, FILE *s, v *v, int flags, int max, int cur, struct v *h) {
    char *d = "", *fn; 
    fflush(s);
    if (cur >= max || (h && assq(v,cdr(h)))) {
        fprintf(s, "...");
        return;
    }
    if (!v) fprintf(s, "nil");
    else {
        switch(v->tag) {
        case CONS:
            if (h)
                rplacd(h, mkCons(mkCons(v,0),cdr(h)));
            fprintf(s, "(");
            for (; v && ConsP(v); v = cdr(v)) {
                if (flags & PRINT_HEX)
                    fprintf(s, " 0x%p=", v);
                fprintf(s," ");
                if (QUOTED(v))
                    fprintf(s, "'");
                _print(cctx, s, car(v), flags, max, cur+1, h);
            }
            if (v)
                _print(cctx, s, v, flags, max, cur+1, h);
            fprintf(s, ")");
            break;
        case INT:
            if (flags & PRINT_HEX)
                fprintf(s, "0x%p:", v);
            if (((unsigned long)v->u.i) > 0x100) {
                fprintf(s, "0x%lx", v->u.i);
            } else {
                fprintf(s, "%ld", v->u.i);
            }
            break;
        case STR:
            d = "\"";
        case SYM:
            if (flags & PRINT_HEX)
                fprintf(s, "0x%p:", v);
            fprintf(s, "%s%s%s", d, v->u.str, d);
            break;
        case FOP:
            if (flags & PRINT_HEX)
                fprintf(s, "0x%p:", v);
            if (fn = RESOLVE_FOP(cctx,v)) {
                fprintf(s, "[[4m%s[24m]", fn);
            } else {
                fprintf(s, "fop%p", v->u.fop);
            }
            break;
        case OP:
            if (flags & PRINT_HEX)
                fprintf(s, "0x%p:", v);
            fprintf(s, "<%s>", optoa(cctx,v));
            break;
        default:
            if (flags & PRINT_HEX)
                fprintf(s, "0x%p:", v);
            fprintf(s, "<?%d>", v->tag);
            break;
        }
    }
    fflush(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r13d
movl %r8d, %r12d
movl %ecx, -0x2c(%rbp)
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
movq 0x10(%rbp), %r15
movq %rsi, %rdi
callq 0x1100
cmpl %r12d, %r13d
jge 0x14f8
testq %r15, %r15
je 0x151b
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x1772
testq %rax, %rax
je 0x151b
leaq 0x8be9(%rip), %rdi      # 0xa0e8
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1160
testq %r14, %r14
je 0x15dc
movl (%r14), %edx
andl $0xf, %edx
cmpl $0x7, %edx
ja 0x163d
leaq 0x8aca(%rip), %rax      # 0xa004
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testq %r15, %r15
je 0x1562
movq %r14, %rdi
xorl %esi, %esi
callq 0x1322
movq 0x10(%r15), %rsi
movq %rax, %rdi
callq 0x1322
movq %rax, 0x10(%r15)
pushq $0x28
popq %rdi
movq %rbx, %rsi
callq 0x1080
incl %r13d
testq %r14, %r14
je 0x173a
testb $0xf, (%r14)
jne 0x171e
testb $0x1, -0x2c(%rbp)
je 0x159d
movq %rbx, %rdi
leaq 0x8b59(%rip), %rsi      # 0xa0ec
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
pushq $0x20
popq %rdi
movq %rbx, %rsi
callq 0x1080
testb $-0x80, (%r14)
je 0x15b9
pushq $0x27
popq %rdi
movq %rbx, %rsi
callq 0x1080
movq 0x8(%r14), %rdx
movq %r15, (%rsp)
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %ecx
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x14ad
movq 0x10(%r14), %r14
jmp 0x1570
leaq 0x8cad(%rip), %rdi      # 0xa290
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1160
jmp 0x175c
leaq 0x8b04(%rip), %r12      # 0xa101
jmp 0x16ad
testb $0x1, -0x2c(%rbp)
je 0x161c
leaq 0x8ae6(%rip), %rsi      # 0xa0f5
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x179b
testq %rax, %rax
je 0x1747
leaq 0x8ad2(%rip), %rsi      # 0xa10a
jmp 0x170d
testb $0x1, -0x2c(%rbp)
je 0x165d
leaq 0x8aab(%rip), %rsi      # 0xa0f5
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movl (%r14), %edx
andl $0xf, %edx
leaq 0x8abf(%rip), %rsi      # 0xa123
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
jmp 0x175c
testb $0x1, -0x2c(%rbp)
je 0x168d
leaq 0x8a75(%rip), %rsi      # 0xa0f5
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rdx
cmpq $0x101, %rdx            # imm = 0x101
jb 0x1715
leaq 0x8a5a(%rip), %rsi      # 0xa0fb
jmp 0x1752
leaq 0x8d06(%rip), %r12      # 0xa3b3
testb $0x1, -0x2c(%rbp)
je 0x16c7
leaq 0x8a3b(%rip), %rsi      # 0xa0f5
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rcx
leaq 0x8a31(%rip), %rsi      # 0xa103
movq %rbx, %rdi
movq %r12, %rdx
movq %r12, %r8
xorl %eax, %eax
callq 0x10b0
jmp 0x175c
testb $0x1, -0x2c(%rbp)
je 0x16fe
leaq 0x8a04(%rip), %rsi      # 0xa0f5
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq %r14, %rsi
callq 0x1803
leaq 0x8a11(%rip), %rsi      # 0xa11e
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x1755
leaq 0x8b0d(%rip), %rsi      # 0xa229
jmp 0x1752
movq %r15, (%rsp)
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x14ad
pushq $0x29
popq %rdi
movq %rbx, %rsi
callq 0x1080
jmp 0x175c
movq 0x8(%r14), %rdx
leaq 0x89c6(%rip), %rsi      # 0xa118
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1100