// File: /workspace/github_c_makefile_star2_O3/janet-lang[P]janet/src/core/compile.c
// Function: janetc_maker
static JanetSlot janetc_maker(JanetFopts opts, JanetSlot *slots, int op) {
    JanetCompiler *c = opts.compiler;
    JanetSlot retslot;

    /* Check if this structure is composed entirely of constants */
    int can_inline = 1;
    for (int32_t i = 0; i < janet_v_count(slots); i++) {
        if (!(slots[i].flags & JANET_SLOT_CONSTANT) ||
                (slots[i].flags & JANET_SLOT_SPLICED)) {
            can_inline = 0;
            break;
        }
    }

    if (can_inline && (op == JOP_MAKE_STRUCT)) {
        JanetKV *st = janet_struct_begin(janet_v_count(slots) / 2);
        for (int32_t i = 0; i < janet_v_count(slots); i += 2) {
            Janet k = slots[i].constant;
            Janet v = slots[i + 1].constant;
            janet_struct_put(st, k, v);
        }
        retslot = janetc_cslot(janet_wrap_struct(janet_struct_end(st)));
        janetc_freeslots(c, slots);
    } else if (can_inline && (op == JOP_MAKE_TUPLE)) {
        Janet *tup = janet_tuple_begin(janet_v_count(slots));
        for (int32_t i = 0; i < janet_v_count(slots); i++) {
            tup[i] = slots[i].constant;
        }
        retslot = janetc_cslot(janet_wrap_tuple(janet_tuple_end(tup)));
        janetc_freeslots(c, slots);
    } else {
        janetc_pushslots(c, slots);
        janetc_freeslots(c, slots);
        retslot = janetc_gettarget(opts);
        janetc_emit_s(c, op, retslot, 1);
    }

    return retslot;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rbp), %r13
movq (%r13), %rbx
leaq 0x10(%rsi), %rax
movq $-0x1, %rcx
movl $0x1010000, %edi        # imm = 0x1010000
testq %r15, %r15
je 0x1e381
movslq -0x4(%r15), %rsi
jmp 0x1e383
xorl %esi, %esi
incq %rcx
cmpq %rsi, %rcx
jge 0x1e39d
movl (%rax), %esi
andl %edi, %esi
addq $0x18, %rax
cmpl $0x10000, %esi          # imm = 0x10000
je 0x1e376
jmp 0x1e3ca
cmpl $0x45, %edx
je 0x1e47a
cmpl $0x43, %edx
jne 0x1e3ca
testq %r15, %r15
movq %rbx, -0x38(%rbp)
je 0x1e48c
movl -0x4(%r15), %eax
movl %eax, %edi
shrl $0x1f, %edi
addl %eax, %edi
sarl %edi
jmp 0x1e48e
movl %edx, -0x2c(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d251
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d496
movl 0x10(%r13), %eax
movl 0x14(%r13), %ecx
movl 0x1c(%r13), %r12d
movb 0x22(%r13), %dl
shrb %dl
testl %ecx, %ecx
sets %sil
andb %dl, %sil
cmpl $0x100, %eax            # imm = 0x100
setb %dl
testb %dl, %sil
je 0x1e415
movq 0x8(%r13), %r15
movl 0x18(%r13), %edx
jmp 0x1e436
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x4ece6
movq %rax, %r15
movq %rbx, %rdi
callq 0x216e0
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
movq %r15, (%r14)
movl %eax, 0x8(%r14)
movl %ecx, 0xc(%r14)
movl %edx, 0x10(%r14)
movl %r12d, 0x14(%r14)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
movzbl -0x2c(%rbp), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x21ae6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r15, %r15
je 0x1e519
movl -0x4(%r15), %edi
jmp 0x1e51b
xorl %edi, %edi
callq 0x46574
movq %rax, %r12
xorl %ebx, %ebx
movq %r15, %r13
testq %r15, %r15
je 0x1e4a6
movslq -0x4(%r15), %rax
jmp 0x1e4a8
xorl %eax, %eax
cmpq %rax, %rbx
jge 0x1e4c7
movq (%r13), %rsi
movq 0x18(%r13), %rdx
movq %r12, %rdi
callq 0x468b5
addq $0x2, %rbx
addq $0x30, %r13
jmp 0x1e49b
movq %r12, %rdi
callq 0x468c4
movabsq $-0x3000000000000, %rsi # imm = 0xFFFD000000000000
movq %rax, %rdi
callq 0x4ed39
movq %rax, %xmm0
movq %rax, %rcx
shrq $0x2f, %rcx
andb $0xf, %cl
movl $0x10000, %edx          # imm = 0x10000
btsl %ecx, %edx
ucomisd %xmm0, %xmm0
movq %rax, (%r14)
movl $0x10001, %eax          # imm = 0x10001
cmovpl %edx, %eax
movq $-0x1, 0x8(%r14)
movl %eax, 0x10(%r14)
movq -0x38(%rbp), %rdi
jmp 0x1e596
xorl %edi, %edi
callq 0x47fa0
xorl %ecx, %ecx
movq %r15, %rdx
testq %r15, %r15
je 0x1e530
movslq -0x4(%r15), %rsi
jmp 0x1e532
xorl %esi, %esi
cmpq %rsi, %rcx
jge 0x1e547
movq (%rdx), %rsi
movq %rsi, (%rax,%rcx,8)
incq %rcx
addq $0x18, %rdx
jmp 0x1e525
movq %rax, %rdi
callq 0x47fd1
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
movq %rax, %rdi
callq 0x4ed39
movq %rax, %xmm0
movq %rax, %rcx
shrq $0x2f, %rcx
andb $0xf, %cl
movl $0x10000, %edx          # imm = 0x10000
btsl %ecx, %edx
ucomisd %xmm0, %xmm0
movq %rax, (%r14)
movl $0x10001, %eax          # imm = 0x10001
cmovpl %edx, %eax
movq $-0x1, 0x8(%r14)
movl %eax, 0x10(%r14)
movq %rbx, %rdi
movq %r15, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1d496