// File: /workspace/github_c_makefile_star2_O1/dnbaker[P]fastiota/fastiota.c
// Function: fastiota32_inc
FASTIOTA_EXPORT uint32_t *fastiota32_inc(uint32_t *start, size_t nelem, uint32_t sv, uint32_t incv) {
    if(incv == 1) return fastiota32(start, nelem, sv);
    uint32_t *const end = start + nelem, *const origstart = start;
#if __AVX512F__
    __m512i m = init_start_val(_mm512_set_epi32, sv, incv);
    const __m512i inc = _mm512_set1_epi32(sizeof(m) / sizeof(uint32_t));
    if((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);
        }
    } else {
        UNROLL4
        while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint32_t))) {
            _mm512_storeu_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_val(_mm256_set_epi32, sv, incv);
    const __m256i inc = _mm256_set1_epi32((signed_size_t)(sizeof(m) / sizeof(uint32_t)));
    if((uint64_t)start % sizeof(m) == 0) {
        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);
        }
    } else {
        UNROLL4
        while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint32_t))) {
            _mm256_storeu_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_val(_mm_set_epi32, sv, incv);
    const __m128i inc = _mm_set1_epi32(sizeof(m) / sizeof(uint32_t));
    if((uint64_t)start % sizeof(m) == 0) {
        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);
        }
    } else {
        UNROLL4
        while(end - start >= (signed_size_t)(sizeof(m) / sizeof(uint32_t))) {
            _mm_storeu_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:
cmpl $0x1, %ecx
je 0x1518
leaq (%rdi,%rsi,4), %rax
vpbroadcastd %ecx, %xmm0
vpmulld 0x1a46(%rip), %xmm0, %xmm1 # 0x3490
vpbroadcastd %edx, %ymm2
vpaddd %xmm2, %xmm1, %xmm1
leal (%rcx,%rcx,2), %r8d
vpmulld 0x1a1f(%rip), %xmm0, %xmm3 # 0x3480
leal (%rcx,%r8,4), %r8d
addl %edx, %r8d
vpaddd %xmm2, %xmm3, %xmm3
vpmulld 0x1a5b(%rip), %xmm0, %xmm4 # 0x34d0
vpmovsxbd 0x1ac2(%rip), %ymm5 # 0x3540
vpermi2d %ymm0, %ymm4, %ymm5
vpmulld 0x1a53(%rip), %xmm0, %xmm0 # 0x34e0
shll $0x3, %ecx
vinserti128 $0x1, %xmm0, %ymm0, %ymm0
vpblendd $0x60, %ymm0, %ymm5, %ymm0 # ymm0 = ymm5[0,1,2,3,4],ymm0[5,6],ymm5[7]
vpbroadcastd %ecx, %ymm4
vpblendd $0x80, %ymm4, %ymm0, %ymm0 # ymm0 = ymm0[0,1,2,3,4,5,6],ymm4[7]
vpaddd %ymm2, %ymm0, %ymm0
vpmovsxbd 0x19ea(%rip), %zmm4 # 0x34a0
vpermi2d %zmm2, %zmm0, %zmm4
vpmovsxbd 0x19ea(%rip), %zmm2 # 0x34b0
vpermi2d %zmm3, %zmm4, %zmm2
movw $0x2000, %cx            # imm = 0x2000
kmovd %ecx, %k1
vpbroadcastd %r8d, %zmm2 {%k1}
vpmovsxbq 0x1a24(%rip), %zmm0 # 0x3508
vpermi2q %zmm1, %zmm2, %zmm0
movq %rdi, %rcx
testb $0x3f, %dil
je 0x1b5d
cmpq $0x10, %rsi
jl 0x1cd5
leaq (,%rsi,4), %r8
movl $0x3f, %ecx
subq %r8, %rcx
cmpq $-0x3c, %rcx
movq $-0x3d, %r9
cmovgeq %rcx, %r9
leaq (%r9,%rsi,4), %rsi
movl %esi, %r9d
shrl $0x6, %r9d
incl %r9d
andl $0x3, %r9d
je 0x1bca
shll $0x6, %r9d
vpbroadcastd 0x19ae(%rip), %zmm1 # 0x34f0
movq %rdi, %rcx
vmovdqu64 %zmm0, (%rcx)
vpaddd %zmm1, %zmm0, %zmm0
addq $0x40, %rcx
addq $-0x40, %r9
jne 0x1b45
jmp 0x1bcd
cmpq $0x10, %rsi
jl 0x1cd5
leaq (,%rsi,4), %r8
movl $0x3f, %ecx
subq %r8, %rcx
cmpq $-0x3c, %rcx
movq $-0x3d, %r9
cmovgeq %rcx, %r9
leaq (%r9,%rsi,4), %rsi
movl %esi, %r9d
shrl $0x6, %r9d
incl %r9d
andl $0x3, %r9d
je 0x1c54
shll $0x6, %r9d
vpbroadcastd 0x1944(%rip), %zmm1 # 0x34f0
movq %rdi, %rcx
vmovdqa64 %zmm0, (%rcx)
vpaddd %zmm1, %zmm0, %zmm0
addq $0x40, %rcx
addq $-0x40, %r9
jne 0x1baf
jmp 0x1c57
movq %rdi, %rcx
cmpq $0xc0, %rsi
jb 0x1cd5
addq %rdi, %r8
subq %rcx, %r8
vpbroadcastd 0x1906(%rip), %zmm1 # 0x34f0
vpbroadcastd 0x1900(%rip), %zmm2 # 0x34f4
vpbroadcastd 0x18fa(%rip), %zmm3 # 0x34f8
vpbroadcastd 0x18f4(%rip), %zmm4 # 0x34fc
vmovdqu64 %zmm0, (%rcx)
vpaddd %zmm1, %zmm0, %zmm5
vmovdqu64 %zmm5, 0x40(%rcx)
vpaddd %zmm2, %zmm0, %zmm5
vmovdqu64 %zmm5, 0x80(%rcx)
vpaddd %zmm3, %zmm0, %zmm5
vmovdqu64 %zmm5, 0xc0(%rcx)
vpaddd %zmm4, %zmm0, %zmm0
addq $0x100, %rcx            # imm = 0x100
addq $-0x100, %r8
cmpq $0x3c, %r8
jg 0x1c08
jmp 0x1cd5
movq %rdi, %rcx
cmpq $0xc0, %rsi
jb 0x1cd5
addq %rdi, %r8
subq %rcx, %r8
vpbroadcastd 0x1880(%rip), %zmm1 # 0x34f0
vpbroadcastd 0x187a(%rip), %zmm2 # 0x34f4
vpbroadcastd 0x1874(%rip), %zmm3 # 0x34f8
vpbroadcastd 0x186e(%rip), %zmm4 # 0x34fc
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
addq $-0x100, %r8
cmpq $0x3c, %r8
jg 0x1c8e
cmpq %rax, %rcx
jae 0x1d61
leaq 0x4(%rcx), %rsi
cmpq %rsi, %rax
cmovaq %rax, %rsi
movq %rcx, %rax
notq %rax
addq %rsi, %rax
vpbroadcastq %rax, %zmm1
shrq $0x2, %rax
movq %rcx, %rsi
subq %rdi, %rsi
shrq $0x2, %rsi
addl %edx, %esi
addq $0x8, %rax
andq $-0x8, %rax
vpbroadcastd %esi, %ymm0
vpaddd 0x1362(%rip), %ymm0, %ymm0 # 0x3080
vpsrlq $0x2, %zmm1, %zmm1
xorl %edx, %edx
vpmovsxbq 0x17df(%rip), %zmm2 # 0x3510
vpbroadcastd 0x17c6(%rip), %ymm3 # 0x3500
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 0x1d3a
movq %rdi, %rax
vzeroupper
retq