// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %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 0x15ec
testq %r15, %r15
je 0x1613
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1613
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x15d5
movq 0x8(%rcx), %rdx
jmp 0x15d7
xorl %edx, %edx
cmpq %r14, %rdx
je 0x15e7
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x15c6
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x1613
leaq 0xcb0d(%rip), %rdi      # 0xe100
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1160
testq %r14, %r14
je 0x1705
movl (%r14), %eax
andl $0xf, %eax
cmpl $0x7, %eax
ja 0x1770
leaq 0xc9d2(%rip), %rcx      # 0xe004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testq %r15, %r15
je 0x1686
movl $0x18, %edi
callq 0x10e0
movq %rax, -0x40(%rbp)
andb $-0x10, (%rax)
movq %r14, 0x8(%rax)
movq $0x0, 0x10(%rax)
movq 0x10(%r15), %rax
movq %rax, -0x48(%rbp)
movl $0x18, %edi
callq 0x10e0
andb $-0x10, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x10(%r15)
movl $0x28, %edi
movq %rbx, %rsi
callq 0x1080
incl %r13d
testb $0xf, (%r14)
jne 0x187b
testb $0x1, -0x2c(%rbp)
je 0x16ba
movq %rbx, %rdi
leaq 0xca54(%rip), %rsi      # 0xe104
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movl $0x20, %edi
movq %rbx, %rsi
callq 0x1080
testb $-0x80, (%r14)
je 0x16da
movl $0x27, %edi
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 0x1583
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1696
jmp 0x1897
leaq 0xcb9a(%rip), %rdi      # 0xe2a6
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1160
jmp 0x18c4
leaq 0xc9ef(%rip), %r12      # 0xe119
jmp 0x17e4
testb $0x1, -0x2c(%rbp)
je 0x1749
leaq 0xc9d1(%rip), %rsi      # 0xe10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x190f
testq %rax, %rax
je 0x18af
leaq 0xc9bd(%rip), %rsi      # 0xe122
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x18bd
testb $0x1, -0x2c(%rbp)
je 0x178a
leaq 0xc990(%rip), %rsi      # 0xe10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movl (%r14), %edx
andl $0xf, %edx
leaq 0xc9a4(%rip), %rsi      # 0xe13b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
jmp 0x18c4
testb $0x1, -0x2c(%rbp)
je 0x17c0
leaq 0xc95a(%rip), %rsi      # 0xe10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rdx
cmpq $0x101, %rdx            # imm = 0x101
jb 0x18a6
leaq 0xc93b(%rip), %rsi      # 0xe113
jmp 0x18ba
leaq 0xcbe5(%rip), %r12      # 0xe3c9
testb $0x1, -0x2c(%rbp)
je 0x17fe
leaq 0xc91c(%rip), %rsi      # 0xe10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rcx
leaq 0xc912(%rip), %rsi      # 0xe11b
movq %rbx, %rdi
movq %r12, %rdx
movq %r12, %r8
xorl %eax, %eax
callq 0x10b0
jmp 0x18c4
testb $0x1, -0x2c(%rbp)
je 0x1838
leaq 0xc8e2(%rip), %rsi      # 0xe10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rax
movl $0x8, %ecx
leaq 0x10898(%rip), %rdi     # 0x120e0
leaq 0xc97e(%rip), %rsi      # 0xe1cd
movq -0x8(%rcx,%rdi), %r8
cmpq %r8, %rax
jne 0x185d
movq (%rcx,%rdi), %rdx
cmpq %r8, %rax
je 0x1872
addq $0x18, %rcx
cmpq $0x1b8, %rcx            # imm = 0x1B8
jne 0x184f
movq %rsi, %rdx
leaq 0xc8bd(%rip), %rsi      # 0xe136
jmp 0x18ba
movq %r15, (%rsp)
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x1583
movl $0x29, %edi
movq %rbx, %rsi
callq 0x1080
jmp 0x18c4
leaq 0xc992(%rip), %rsi      # 0xe23f
jmp 0x18ba
movq 0x8(%r14), %rdx
leaq 0xc876(%rip), %rsi      # 0xe130
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1100