// File: /workspace/github_c_makefile_star2_O3/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 0x15ca
testq %r15, %r15
je 0x15f1
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x15f1
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x15bb
cmpq %r14, 0x8(%rcx)
jne 0x15c4
jmp 0x15ca
testq %r14, %r14
je 0x16e5
movq 0x10(%rax), %rax
jmp 0x15a5
leaq 0xab2f(%rip), %rdi      # 0xc100
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 0x16e5
movl (%r14), %edx
andl $0xf, %edx
cmpl $0x7, %edx
ja 0x1750
leaq 0xa9f4(%rip), %rax      # 0xc004
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testq %r15, %r15
je 0x1666
movl $0x18, %edi
callq 0x10e0
movq %rax, -0x40(%rbp)
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %r14, 0x8(%rax)
movq $0x0, 0x10(%rax)
movq 0x10(%r15), %rax
movq %rax, -0x48(%rbp)
movl $0x18, %edi
callq 0x10e0
xorl %ecx, %ecx
movl %ecx, (%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 0x1844
testb $0x1, -0x2c(%rbp)
je 0x169a
movq %rbx, %rdi
leaq 0xaa74(%rip), %rsi      # 0xc104
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movl $0x20, %edi
movq %rbx, %rsi
callq 0x1080
testb $-0x80, (%r14)
je 0x16ba
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 0x1567
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1676
jmp 0x1860
leaq 0xabbc(%rip), %rdi      # 0xc2a8
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1160
jmp 0x189a
leaq 0xaa0f(%rip), %r12      # 0xc119
jmp 0x17c4
testb $0x1, -0x2c(%rbp)
je 0x1729
leaq 0xa9f1(%rip), %rsi      # 0xc10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x18df
testq %rax, %rax
je 0x1885
leaq 0xa9dd(%rip), %rsi      # 0xc122
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x1893
testb $0x1, -0x2c(%rbp)
je 0x1770
leaq 0xa9b0(%rip), %rsi      # 0xc10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movl (%r14), %edx
andl $0xf, %edx
leaq 0xa9c4(%rip), %rsi      # 0xc13b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
jmp 0x189a
testb $0x1, -0x2c(%rbp)
je 0x17a0
leaq 0xa97a(%rip), %rsi      # 0xc10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rdx
cmpq $0x101, %rdx            # imm = 0x101
jb 0x187c
leaq 0xa95b(%rip), %rsi      # 0xc113
jmp 0x1890
leaq 0xac07(%rip), %r12      # 0xc3cb
testb $0x1, -0x2c(%rbp)
je 0x17de
leaq 0xa93c(%rip), %rsi      # 0xc10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rcx
leaq 0xa932(%rip), %rsi      # 0xc11b
movq %rbx, %rdi
movq %r12, %rdx
movq %r12, %r8
xorl %eax, %eax
callq 0x10b0
jmp 0x189a
testb $0x1, -0x2c(%rbp)
je 0x1818
leaq 0xa902(%rip), %rsi      # 0xc10d
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %rcx
movl $0x8, %eax
leaq 0xe8b8(%rip), %rsi      # 0x100e0
leaq 0xa9a0(%rip), %rdx      # 0xc1cf
cmpq -0x8(%rax,%rsi), %rcx
je 0x186f
addq $0x18, %rax
cmpq $0x1b8, %rax            # imm = 0x1B8
jne 0x182f
jmp 0x1873
movq %r15, (%rsp)
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x1567
movl $0x29, %edi
movq %rbx, %rsi
callq 0x1080
jmp 0x189a
movq (%rax,%rsi), %rdx
leaq 0xa8bc(%rip), %rsi      # 0xc136
jmp 0x1890
leaq 0xa9be(%rip), %rsi      # 0xc241
jmp 0x1890
movq 0x8(%r14), %rdx
leaq 0xa8a0(%rip), %rsi      # 0xc130
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