// File: /workspace/github_c_makefile_star2_O3/samsonjs[P]lake/src/primitive.c
// Function: bind_primitives
void bind_primitives(LakeCtx *ctx)
{
#define DEFINE(name, fn, arity)                                                \
    env_define(ctx->toplevel, sym_intern(ctx, name),                           \
               VAL(prim_make(name, arity, fn)))

    DEFINE("car", _car, 1);
    DEFINE("cdr", _cdr, 1);
    DEFINE("cons", _cons, 2);
    DEFINE("null?", _nullP, 1);
    DEFINE("pair?", _pairP, 1);
    DEFINE("is?", _isP, 2);
    DEFINE("equal?", _equalP, 2);
    DEFINE("not", _not, 1);
    DEFINE("+", _add, ARITY_VARARGS);
    DEFINE("-", _sub, ARITY_VARARGS);
    DEFINE("*", _mul, ARITY_VARARGS);
    DEFINE("/", _div, ARITY_VARARGS);
    DEFINE("=", _int_eq, ARITY_VARARGS);
    DEFINE("<", _int_lt, ARITY_VARARGS);
    DEFINE(">", _int_gt, ARITY_VARARGS);
    DEFINE("set-car!", _set_carB, 2);

    DEFINE("display", _display, ARITY_VARARGS);

    DEFINE("symbol?", _symbolP, 1);
    DEFINE("list?", _listP, 1);
    DEFINE("dotted-list?", _dotted_listP, 1);
    DEFINE("number?", _numberP, 1);
    DEFINE("integer?", _integerP, 1);
    DEFINE("string?", _stringP, 1);
    DEFINE("bool?", _boolP, 1);
    DEFINE("function?", _functionP, 1);
    DEFINE("primitive?", _primitiveP, 1);

    /* string=? */
    /* string< */
    /* string> */
    /* string-concatenate */
    /* string-slice */

#undef DEFINE
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
leaq 0x1f0e(%rip), %r15      # 0x64b2
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %ebp
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movq %rbp, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x1, %eax
movl %eax, 0x18(%r13)
leaq 0x9d1(%rip), %rax       # 0x4fbb
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1eb0(%rip), %r15      # 0x64b6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %ebp
movl %ebp, (%rax)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x1, %eax
movl %eax, 0x18(%r13)
leaq 0x9c5(%rip), %rax       # 0x5012
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1e51(%rip), %r15      # 0x64ba
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x2, %eax
movl %eax, 0x18(%r13)
leaq 0x9c8(%rip), %rax       # 0x5078
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1df3(%rip), %r15      # 0x64bf
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x1, %ebp
movl %ebp, 0x18(%r13)
leaq 0x992(%rip), %rax       # 0x50a0
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1d9b(%rip), %r15      # 0x64c5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
leaq 0x96f(%rip), %rax       # 0x50dd
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1d41(%rip), %r15      # 0x64cb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x2, %ebp
movl %ebp, 0x18(%r13)
leaq 0x947(%rip), %rax       # 0x511a
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1ce0(%rip), %r15      # 0x64cf
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
leaq 0x91b(%rip), %rax       # 0x514e
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1c87(%rip), %r15      # 0x64d6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x1, %eax
movl %eax, 0x18(%r13)
leaq 0x8e5(%rip), %rax       # 0x5182
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1c21(%rip), %r15      # 0x64da
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0x8a4(%rip), %rax       # 0x51a4
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1bc0(%rip), %r15      # 0x64dc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0x8b3(%rip), %rax       # 0x5216
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1b5f(%rip), %r15      # 0x64de
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0x8c5(%rip), %rax       # 0x528b
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1afe(%rip), %r15      # 0x64e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0x8db(%rip), %rax       # 0x5304
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1a9d(%rip), %r15      # 0x64e2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0x955(%rip), %rax       # 0x53e1
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1a3c(%rip), %r15      # 0x64e4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0x999(%rip), %rax       # 0x5488
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x19a5(%rip), %r15      # 0x64b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0x9d7(%rip), %rax       # 0x5529
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1978(%rip), %r15      # 0x64e6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x2, %eax
movl %eax, 0x18(%r13)
leaq 0xa15(%rip), %rax       # 0x55ca
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x191e(%rip), %r15      # 0x64ef
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x18(%r13)
leaq 0xa24(%rip), %rax       # 0x563c
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x18c3(%rip), %r15      # 0x64f7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl %ebp, (%rax)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x1, %ebp
movl %ebp, 0x18(%r13)
leaq 0xa3a(%rip), %rax       # 0x56b0
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1874(%rip), %r15      # 0x6506
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
movl $0x1, %ebp
leaq 0xa00(%rip), %rax       # 0x56db
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1808(%rip), %r15      # 0x64ff
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
movl $0x1, %ebp
leaq 0x9c6(%rip), %rax       # 0x5706
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x17b0(%rip), %r15      # 0x650c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
movl $0x1, %ebp
leaq 0x98c(%rip), %rax       # 0x5731
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1753(%rip), %r15      # 0x6514
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
movl $0x1, %ebp
leaq 0x952(%rip), %rax       # 0x575c
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x16f7(%rip), %r15      # 0x651d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
movl $0x1, %ebp
leaq 0x918(%rip), %rax       # 0x5787
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x169a(%rip), %r15      # 0x6525
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl %ebp, 0x18(%r13)
leaq 0x8e3(%rip), %rax       # 0x57b2
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x1640(%rip), %r15      # 0x652b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %r12
movl $0x28, %edi
callq 0x11a0
movq %rax, %r13
movl $0x7, %eax
movl %eax, (%r13)
movl $0x7, %ebp
movl $0x28, %eax
movq %rax, 0x8(%r13)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r13)
movl $0x1, %eax
movl %eax, 0x18(%r13)
leaq 0x8a4(%rip), %rax       # 0x57dd
movq %rax, 0x20(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x22ce
movq (%rbx), %r14
leaq 0x15e0(%rip), %r15      # 0x6535
movq %rbx, %rdi
movq %r15, %rsi
callq 0x58f0
movq %rax, %rbx
movl $0x28, %edi
callq 0x11a0
movq %rax, %r12
movl %ebp, (%rax)
movl $0x28, %eax
movq %rax, 0x8(%r12)
movq %r15, %rdi
callq 0x11f0
movq %rax, 0x10(%r12)
movl $0x1, %eax
movl %eax, 0x18(%r12)
leaq 0x86e(%rip), %rax       # 0x5808
movq %rax, 0x20(%r12)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22ce