// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/compile.c
// Function: janetc_pushslots
int32_t janetc_pushslots(JanetCompiler *c, JanetSlot *slots) {
    int32_t i;
    int32_t count = janet_v_count(slots);
    int32_t min_arity = 0;
    int has_splice = 0;
    for (i = 0; i < count;) {
        if (slots[i].flags & JANET_SLOT_SPLICED) {
            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i], 0);
            i++;
            has_splice = 1;
        } else if (i + 1 == count) {
            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
            i++;
            min_arity++;
        } else if (slots[i + 1].flags & JANET_SLOT_SPLICED) {
            janetc_emit_s(c, JOP_PUSH, slots[i], 0);
            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 1], 0);
            i += 2;
            min_arity++;
            has_splice = 1;
        } else if (i + 2 == count) {
            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
            i += 2;
            min_arity += 2;
        } else if (slots[i + 2].flags & JANET_SLOT_SPLICED) {
            janetc_emit_ss(c, JOP_PUSH_2, slots[i], slots[i + 1], 0);
            janetc_emit_s(c, JOP_PUSH_ARRAY, slots[i + 2], 0);
            i += 3;
            min_arity += 2;
            has_splice = 1;
        } else {
            janetc_emit_sss(c, JOP_PUSH_3, slots[i], slots[i + 1], slots[i + 2], 0);
            i += 3;
            min_arity += 3;
        }
    }
    return has_splice ? (-1 - min_arity) : min_arity;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
xorl %r12d, %r12d
movl $0x0, %r15d
testq %rsi, %rsi
je 0x1b8ce
movl -0x4(%rsi), %r15d
movq %rsi, -0x38(%rbp)
movl %r15d, %eax
negl %eax
movq %rax, -0x40(%rbp)
movl $0x0, -0x2c(%rbp)
xorl %ebx, %ebx
movslq %r12d, %rax
incl %r12d
imulq $0x18, %rax, %r13
addq -0x38(%rbp), %r13
leal -0x1(%r12), %eax
cmpl %r15d, %eax
jge 0x1bad9
testb $0x1, 0x13(%r13)
je 0x1b932
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x34
popq %rsi
xorl %edx, %edx
callq 0x1fbb3
incl %r12d
addq $0x18, %r13
pushq $0x1
popq %rbx
jmp 0x1b8f2
cmpl %r12d, %r15d
jne 0x1b95e
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x31
popq %rsi
xorl %edx, %edx
callq 0x1fbb3
incl -0x2c(%rbp)
movl %r15d, %r12d
jmp 0x1b8e4
movslq %r12d, %rax
imulq $0x18, %rax, %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax), %rdx
testb $0x1, 0x13(%rcx,%rax)
jne 0x1b9f0
movq -0x40(%rbp), %rax
addl %r12d, %eax
cmpl $-0x1, %eax
je 0x1ba3d
leal 0x1(%r12), %eax
cltq
imulq $0x18, %rax, %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax), %rsi
testb $0x1, 0x13(%rcx,%rax)
jne 0x1ba79
movq 0x10(%rsi), %rax
movq %rax, 0x40(%rsp)
movups (%rsi), %xmm0
movups %xmm0, 0x30(%rsp)
movq 0x10(%rdx), %rax
movq %rax, 0x28(%rsp)
movups (%rdx), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x33
popq %rsi
xorl %edx, %edx
callq 0x2010f
addl $0x2, %r12d
addl $0x3, -0x2c(%rbp)
jmp 0x1b8e4
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x31
popq %rsi
movq %rdx, %rbx
xorl %edx, %edx
callq 0x1fbb3
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x34
popq %rsi
xorl %edx, %edx
callq 0x1fbb3
incl %r12d
incl -0x2c(%rbp)
pushq $0x1
popq %rbx
jmp 0x1b8e4
movq 0x10(%rdx), %rax
movq %rax, 0x28(%rsp)
movups (%rdx), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x32
popq %rsi
xorl %edx, %edx
callq 0x1fe89
addl $0x2, -0x2c(%rbp)
movl %r15d, %r12d
jmp 0x1b8e4
movq 0x10(%rdx), %rax
movq %rax, 0x28(%rsp)
movups (%rdx), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rsi, %rbx
pushq $0x32
popq %rsi
xorl %edx, %edx
callq 0x1fe89
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
pushq $0x34
popq %rsi
xorl %edx, %edx
callq 0x1fbb3
addl $0x2, %r12d
addl $0x2, -0x2c(%rbp)
pushq $0x1
popq %rbx
jmp 0x1b8e4
negl %ebx
movl -0x2c(%rbp), %eax
xorl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq