// File: /workspace/github_c_makefile_star2_O0/dnbaker[P]fastiota/././fastiota.c
// Function: fastiota64(unsigned long*, unsigned long, unsigned long)
FASTIOTA_EXPORT uint64_t *fastiota64(uint64_t *start, size_t nelem, uint64_t sv) {
    {
        const size_t leftover = VECSIZE / sizeof(uint64_t) - (uint64_t)start % (VECSIZE / sizeof(uint64_t));
        if(leftover && leftover != VECSIZE / sizeof(uint64_t)) {
            nelem -= leftover;
            switch(leftover) {
                case 7: CASEN case 6: CASEN case 5: CASEN case 4: CASEN case 3: CASEN case 2: CASEN case 1: CASEN
                default: ;
            }
        }
    }
#undef CASEN
    uint64_t *const end = start + nelem, *const origstart = start;
#if __AVX512F__
    __m512i m = init_start64(_mm512_set_epi64, sv);
    const __m512i inc = _mm512_set1_epi64((signed_size_t)(sizeof(m) / sizeof(uint64_t)));
    UNROLL4
    while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint64_t))) {
        _mm512_store_si512((void *)start, m);
        m = _mm512_add_epi64(m, inc);
        start += (signed_size_t)(sizeof(m) / sizeof(uint64_t));
    }
    sv += (start - origstart);
#elif __AVX2__
    __m256i m = init_start64(_mm256_set_epi64x, sv);
    const __m256i inc = _mm256_set1_epi64x((signed_size_t)(sizeof(m) / sizeof(uint64_t)));
    UNROLL4
    while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint64_t))) {
        _mm256_store_si256((__m256i *)start, m);
        m = _mm256_add_epi64(m, inc);
        start += (signed_size_t)(sizeof(m) / sizeof(uint64_t));
    }
    sv += (start - origstart);
#elif __SSE2__
    __m128i m = init_start64(_mm_set_epi64x, sv);
    const __m128i inc = _mm_set1_epi64x((signed_size_t)(sizeof(m) / sizeof(uint64_t)));
    UNROLL4
    while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint64_t))) {
        _mm_store_si128((__m128i *)start, m);
        m = _mm_add_epi64(m, inc);
        start += (signed_size_t)(sizeof(m) / sizeof(uint64_t));
    }
    sv += (start - origstart);
#endif
    while(start < end) *start++ = sv++;
    return origstart;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x98(%rbp)
movq %rsi, -0xa0(%rbp)
movq %rdx, -0xa8(%rbp)
movq -0x98(%rbp), %rcx
andq $0x1, %rcx
movl $0x2, %eax
subq %rcx, %rax
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0x204c
cmpq $0x2, -0xb0(%rbp)
je 0x204c
movq -0xb0(%rbp), %rcx
movq -0xa0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0xb0(%rbp), %rax
decq %rax
movq %rax, -0xe8(%rbp)
subq $0x6, %rax
ja 0x2048
movq -0xe8(%rbp), %rax
leaq 0x213c(%rip), %rcx      # 0x4040
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
jmp 0x204a
jmp 0x204c
movq -0x98(%rbp), %rax
movq -0xa0(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0xb8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %xmm1
movq -0x58(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x70(%rbp)
movaps -0x70(%rbp), %xmm0
movaps %xmm0, -0xd0(%rbp)
movq $0x2, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %xmm1
movq -0x30(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x40(%rbp)
movdqa -0x40(%rbp), %xmm0
movdqa %xmm0, -0xe0(%rbp)
movq -0xb8(%rbp), %rax
movq -0x98(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x2, %rax
jl 0x2162
movq -0x98(%rbp), %rax
movdqa -0xd0(%rbp), %xmm0
movq %rax, -0x78(%rbp)
movdqa %xmm0, -0x90(%rbp)
movdqa -0x90(%rbp), %xmm0
movq -0x78(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0xd0(%rbp), %xmm1
movdqa -0xe0(%rbp), %xmm0
movdqa %xmm1, -0x10(%rbp)
movdqa %xmm0, -0x20(%rbp)
movdqa -0x10(%rbp), %xmm0
paddq -0x20(%rbp), %xmm0
movdqa %xmm0, -0xd0(%rbp)
movq -0x98(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x98(%rbp)
jmp 0x20d9
movq -0x98(%rbp), %rax
movq -0xc0(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
cmpq -0xb8(%rbp), %rax
jae 0x21c4
movq -0xa8(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x98(%rbp)
movq %rcx, (%rax)
jmp 0x2185
movq -0xc0(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)