// File: /workspace/github_c_makefile_star2_O3/dnbaker[P]fastiota/fastiota.c
// Function: fastiota32
FASTIOTA_EXPORT uint32_t *fastiota32(uint32_t *start, size_t nelem, uint32_t sv) {
#define CASEN *start++ = sv++; __attribute__((fallthrough));
    {
        const size_t leftover = VECSIZE / sizeof(uint32_t) - (uint64_t)start % (VECSIZE / sizeof(uint32_t));
        if(leftover && leftover != VECSIZE / sizeof(uint32_t)) {
            nelem -= leftover;
            switch(leftover) {
                case 15: CASEN case 14: CASEN case 13: CASEN case 12: CASEN case 11: CASEN case 10: CASEN case 9: CASEN case 8: CASEN case 7: CASEN case 6: CASEN case 5: CASEN case 4: CASEN case 3: CASEN case 2: CASEN case 1: CASEN
                default: ;
            }
        }
    }
    uint32_t *const end = start + nelem, *const origstart = start;
#if __AVX512F__
    __m512i m = init_start(_mm512_set_epi32, sv);
    const __m512i inc = _mm512_set1_epi32(sizeof(m) / sizeof(uint32_t));
    assert((uint64_t)start % sizeof(m) == 0);
    UNROLL4
    while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint32_t))) {
        _mm512_store_si512((void *)start, m);
        m = _mm512_add_epi32(m, inc);
        start += sizeof(m) / sizeof(uint32_t);
    }
    sv += (start - origstart);
#elif __AVX2__
    __m256i m = init_start(_mm256_set_epi32, sv);
    assert((uint64_t)start % sizeof(m) == 0);
    const __m256i inc = _mm256_set1_epi32(sizeof(m) / sizeof(uint32_t));
    UNROLL4
    while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint32_t))) {
        _mm256_store_si256((__m256i *)start, m);
        m = _mm256_add_epi32(m, inc);
        start += sizeof(m) / sizeof(uint32_t);
    }
    sv += (start - origstart);
#elif __SSE2__
    __m128i m = init_start(_mm_set_epi32, sv);
    assert((uint64_t)start % sizeof(m) == 0);
    const __m128i inc = _mm_set1_epi32(sizeof(m) / sizeof(uint32_t));
    UNROLL4
    while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint32_t))) {
        _mm_store_si128((__m128i *)start, m);
        m = _mm_add_epi32(m, inc);
        start += sizeof(m) / sizeof(uint32_t);
    }
    sv += (start - origstart);
#endif
    while(start < end) *start++ = sv++;
    return origstart;
}

// Assembly:
pushq %rax
movq %rdi, %rcx
andq $0xf, %rcx
je 0x169f
movq %rdi, %rax
orq $-0x10, %rax
decq %rcx
leaq 0x1c65(%rip), %r8       # 0x3280
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
addq %rax, %rsi
movl %edx, (%rdi)
addq $0x4, %rdi
incl %edx
testb $0x3f, %dil
jne 0x18a6
leaq (%rdi,%rsi,4), %rax
movq %rdi, %rcx
movq %rdi, %r8
cmpq $0x10, %rsi
jl 0x1814
vpbroadcastd %edx, %ymm0
vpaddd 0x19f5(%rip), %ymm0, %ymm1 # 0x30c0
vpmovsxbd 0x1e4b(%rip), %zmm2 # 0x3520
vpermi2d %zmm0, %zmm1, %zmm2
vpaddd 0x1e1d(%rip), %xmm0, %xmm1 # 0x3500
vpmovsxbd 0x1e43(%rip), %zmm3 # 0x3530
vpermi2d %zmm1, %zmm2, %zmm3
leal 0xd(%rdx), %ecx
movw $0x2000, %r8w           # imm = 0x2000
kmovd %r8d, %k1
vpaddd 0x1e08(%rip), %xmm0, %xmm1 # 0x3510
vpmovsxbq 0x1e76(%rip), %zmm0 # 0x3588
vpbroadcastd %ecx, %zmm3 {%k1}
vpermi2q %zmm1, %zmm3, %zmm0
leaq (,%rsi,4), %rcx
movl $0x3f, %r8d
subq %rcx, %r8
cmpq $-0x3c, %r8
movq $-0x3d, %rcx
cmovgeq %r8, %rcx
leaq (%rcx,%rsi,4), %rsi
movl %esi, %r8d
shrl $0x6, %r8d
incl %r8d
andl $0x3, %r8d
je 0x1781
shll $0x6, %r8d
vpbroadcastd 0x1e10(%rip), %zmm1 # 0x3570
movq %r8, %r9
movq %rdi, %rcx
vmovdqa64 %zmm0, (%rcx)
vpaddd %zmm1, %zmm0, %zmm0
addq $0x40, %rcx
addq $-0x40, %r9
jne 0x1766
addq %rdi, %r8
jmp 0x1784
movq %rdi, %rcx
cmpq $0xc0, %rsi
jb 0x1814
movq %rcx, %r8
negq %r8
vpbroadcastd 0x1dcf(%rip), %zmm1 # 0x3570
vpbroadcastd 0x1dc9(%rip), %zmm2 # 0x3574
vpbroadcastd 0x1dc3(%rip), %zmm3 # 0x3578
vpbroadcastd 0x1dbd(%rip), %zmm4 # 0x357c
vmovdqa64 %zmm0, (%rcx)
vpaddd %zmm1, %zmm0, %zmm5
vmovdqa64 %zmm5, 0x40(%rcx)
vpaddd %zmm2, %zmm0, %zmm5
vmovdqa64 %zmm5, 0x80(%rcx)
vpaddd %zmm3, %zmm0, %zmm5
vmovdqa64 %zmm5, 0xc0(%rcx)
vpaddd %zmm4, %zmm0, %zmm0
addq $0x100, %rcx            # imm = 0x100
leaq (%rax,%r8), %rsi
addq $-0x100, %rsi
addq $-0x100, %r8
cmpq $0x3c, %rsi
jg 0x17bf
negq %r8
cmpq %rax, %rcx
jae 0x189e
leaq 0x4(%rcx), %rsi
cmpq %rsi, %rax
cmovaq %rax, %rsi
movq %rcx, %rax
notq %rax
addq %rsi, %rax
vpbroadcastq %rax, %zmm1
shrq $0x2, %rax
subq %rdi, %r8
shrq $0x2, %r8
addl %r8d, %edx
addq $0x8, %rax
andq $-0x8, %rax
vpbroadcastd %edx, %ymm0
vpaddd 0x1885(%rip), %ymm0, %ymm0 # 0x30e0
vpsrlq $0x2, %zmm1, %zmm1
xorl %edx, %edx
vpmovsxbq 0x1d22(%rip), %zmm2 # 0x3590
vpbroadcastd 0x1d09(%rip), %ymm3 # 0x3580
vpbroadcastq %rdx, %zmm4
vporq %zmm2, %zmm4, %zmm4
vpcmpleuq %zmm1, %zmm4, %k1
vmovdqu32 %ymm0, (%rcx,%rdx,4) {%k1}
addq $0x8, %rdx
vpaddd %ymm3, %ymm0, %ymm0
cmpq %rdx, %rax
jne 0x1877
movq %rdi, %rax
popq %rcx
vzeroupper
retq
leaq 0x1d23(%rip), %rdi      # 0x35d0
leaq 0x1d3d(%rip), %rsi      # 0x35f1
leaq 0x1d41(%rip), %rcx      # 0x35fc
movl $0x32, %edx
callq 0x1050