// File: /workspace/github_c_makefile_star2_O3/dnbaker[P]fastiota/./fastiota.h
// Function: unsigned long* fastiota::iota<unsigned long, int, int>(unsigned long*, unsigned long, int, int)
IT *iota(IT *start, size_t nelem, IT2 firstv=0, IT3 inc=1) {
    if(sizeof(IT) == 4) {
        return reinterpret_cast<IT *>(fastiota32_inc(reinterpret_cast<uint32_t *>(start), nelem, firstv, inc));
    }
    if(sizeof(IT) == 8) {
        return reinterpret_cast<IT *>(fastiota64_inc(reinterpret_cast<uint64_t *>(start), nelem, firstv, inc));
    }
    IT *ptr = start;
    const IT *const end = start + nelem;
    if(inc == 1) {
        while(ptr + 8 <= end) {
            ptr[0] = firstv;
            ptr[1] = firstv + 1;
            ptr[2] = firstv + 2;
            ptr[3] = firstv + 3;
            ptr[4] = firstv + 4;
            ptr[5] = firstv + 5;
            ptr[6] = firstv + 6;
            ptr[7] = firstv + 7;
            ptr += 8;
            firstv += 8;
        }
        while(ptr < end) *ptr++ = firstv++;
    } else {
        const std::array<const IT, 8> tmp {IT(0), IT(1) * inc, IT(2) * inc, IT(3) * inc, IT(4) * inc, IT(5) * inc, IT(6) * inc, IT(7) * inc};
        for(const IT blockinc = 8 * inc;ptr + 8 <= end;ptr += 8, firstv += blockinc) {
            ptr[0] = firstv;
            ptr[1] = firstv + tmp[1];
            ptr[2] = firstv + tmp[2];
            ptr[3] = firstv + tmp[3];
            ptr[4] = firstv + tmp[4];
            ptr[5] = firstv + tmp[5];
            ptr[6] = firstv + tmp[6];
            ptr[7] = firstv + tmp[7];
        }
        while(ptr < end) *ptr++ = (firstv += inc);
    }
    return start;
}

// Assembly:
movq %rdi, %rax
movslq %edx, %rdx
cmpl $0x1, %ecx
jne 0x1914
testb $0x1, %al
je 0x1886
decq %rsi
movq %rdx, (%rax)
addq $0x8, %rax
incq %rdx
leaq (%rax,%rsi,8), %rdi
movq %rax, %rcx
movq %rax, %r8
cmpq $0x2, %rsi
jl 0x1a78
leaq 0x1(%rdx), %rcx
movq %rdx, %xmm0
movq %rcx, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
leaq (,%rsi,8), %rcx
movl $0xf, %r8d
subq %rcx, %r8
cmpq $-0x8, %r8
movq $-0x9, %rcx
cmovgeq %r8, %rcx
leaq (%rcx,%rsi,8), %rsi
movl %esi, %r8d
shrl $0x4, %r8d
incl %r8d
andl $0x3, %r8d
je 0x1a01
movl %r8d, %r9d
shll $0x4, %r9d
movdqa 0x7ad(%rip), %xmm1      # 0x20a0
movq %rax, %rcx
movdqa %xmm0, (%rcx)
paddq %xmm1, %xmm0
addq $0x10, %rcx
addq $-0x10, %r9
jne 0x18f6
shll $0x4, %r8d
addq %rax, %r8
jmp 0x1a04
movslq %ecx, %rdi
leaq (%rax,%rsi,8), %rcx
addq %rdx, %rdi
movq %rdi, %xmm1
movq %rdx, %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %rax, %rdi
testb $0xf, %al
je 0x199a
cmpq $0x2, %rsi
jl 0x1c22
leaq (,%rsi,8), %r8
movl $0xf, %edi
subq %r8, %rdi
cmpq $-0x8, %rdi
movq $-0x9, %r9
cmovgeq %rdi, %r9
leaq (%r9,%rsi,8), %rsi
movl %esi, %r9d
shrl $0x4, %r9d
incl %r9d
andl $0x3, %r9d
je 0x1b44
shll $0x4, %r9d
movdqa 0x720(%rip), %xmm1      # 0x20a0
movq %rax, %rdi
movdqu %xmm0, (%rdi)
paddq %xmm1, %xmm0
addq $0x10, %rdi
addq $-0x10, %r9
jne 0x1983
jmp 0x1b47
cmpq $0x2, %rsi
jl 0x1c22
leaq (,%rsi,8), %r8
movl $0xf, %edi
subq %r8, %rdi
cmpq $-0x8, %rdi
movq $-0x9, %r9
cmovgeq %rdi, %r9
leaq (%r9,%rsi,8), %rsi
movl %esi, %r9d
shrl $0x4, %r9d
incl %r9d
andl $0x3, %r9d
je 0x1bb6
shll $0x4, %r9d
movdqa 0x6b9(%rip), %xmm1      # 0x20a0
movq %rax, %rdi
movdqa %xmm0, (%rdi)
paddq %xmm1, %xmm0
addq $0x10, %rdi
addq $-0x10, %r9
jne 0x19ea
jmp 0x1bb9
movq %rax, %rcx
cmpq $0x30, %rsi
jb 0x1a78
movq %rcx, %r8
negq %r8
movdqa 0x688(%rip), %xmm1      # 0x20a0
movdqa 0x690(%rip), %xmm2      # 0x20b0
movdqa 0x698(%rip), %xmm3      # 0x20c0
movdqa 0x6a0(%rip), %xmm4      # 0x20d0
movdqa %xmm0, (%rcx)
movdqa %xmm0, %xmm5
paddq %xmm1, %xmm5
movdqa %xmm5, 0x10(%rcx)
movdqa %xmm0, %xmm5
paddq %xmm2, %xmm5
movdqa %xmm5, 0x20(%rcx)
movdqa %xmm0, %xmm5
paddq %xmm3, %xmm5
movdqa %xmm5, 0x30(%rcx)
paddq %xmm4, %xmm0
addq $0x40, %rcx
leaq (%rdi,%r8), %rsi
addq $-0x40, %rsi
addq $-0x40, %r8
cmpq $0x8, %rsi
jg 0x1a30
negq %r8
cmpq %rdi, %rcx
jae 0x1cec
subq %rax, %r8
sarq $0x3, %r8
leaq 0x8(%rcx), %r9
cmpq %r9, %rdi
cmovaq %rdi, %r9
movq %rcx, %rsi
notq %rsi
addq %r9, %rsi
movq %rsi, %xmm0
shrq $0x3, %rsi
addq $0x2, %rsi
andq $-0x2, %rsi
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x3, %xmm0
addq %r8, %rdx
xorl %edi, %edi
movdqa 0x5ac(%rip), %xmm1      # 0x2070
movdqa 0x5b4(%rip), %xmm2      # 0x2080
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdi, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %r8d
notl %r8d
testb $0x1, %r8b
je 0x1b1a
leaq (%rdx,%rdi), %r8
movq %r8, (%rcx,%rdi,8)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %r8d
testb $0x1, %r8b
je 0x1b36
leaq (%rdx,%rdi), %r8
incq %r8
movq %r8, 0x8(%rcx,%rdi,8)
addq $0x2, %rdi
cmpq %rdi, %rsi
jne 0x1ad4
jmp 0x1cec
movq %rax, %rdi
cmpq $0x30, %rsi
jb 0x1c22
addq %rax, %r8
subq %rdi, %r8
movdqa 0x541(%rip), %xmm1      # 0x20a0
movdqa 0x549(%rip), %xmm2      # 0x20b0
movdqa 0x551(%rip), %xmm3      # 0x20c0
movdqa 0x559(%rip), %xmm4      # 0x20d0
movdqu %xmm0, (%rdi)
movdqa %xmm0, %xmm5
paddq %xmm1, %xmm5
movdqu %xmm5, 0x10(%rdi)
movdqa %xmm0, %xmm5
paddq %xmm2, %xmm5
movdqu %xmm5, 0x20(%rdi)
movdqa %xmm0, %xmm5
paddq %xmm3, %xmm5
movdqu %xmm5, 0x30(%rdi)
paddq %xmm4, %xmm0
addq $0x40, %rdi
addq $-0x40, %r8
cmpq $0x8, %r8
jg 0x1b77
jmp 0x1c22
movq %rax, %rdi
cmpq $0x30, %rsi
jb 0x1c22
addq %rax, %r8
subq %rdi, %r8
movdqa 0x4d3(%rip), %xmm1      # 0x20a0
movdqa 0x4db(%rip), %xmm2      # 0x20b0
movdqa 0x4e3(%rip), %xmm3      # 0x20c0
movdqa 0x4eb(%rip), %xmm4      # 0x20d0
movdqa %xmm0, (%rdi)
movdqa %xmm0, %xmm5
paddq %xmm1, %xmm5
movdqa %xmm5, 0x10(%rdi)
movdqa %xmm0, %xmm5
paddq %xmm2, %xmm5
movdqa %xmm5, 0x20(%rdi)
movdqa %xmm0, %xmm5
paddq %xmm3, %xmm5
movdqa %xmm5, 0x30(%rdi)
paddq %xmm4, %xmm0
addq $0x40, %rdi
addq $-0x40, %r8
cmpq $0x8, %r8
jg 0x1be5
cmpq %rcx, %rdi
jae 0x1cec
movq %rdi, %rsi
subq %rax, %rsi
sarq $0x3, %rsi
leaq 0x8(%rdi), %r8
cmpq %r8, %rcx
cmovaq %rcx, %r8
movq %rdi, %rcx
notq %rcx
addq %r8, %rcx
movq %rcx, %xmm0
shrq $0x3, %rcx
addq $0x2, %rcx
andq $-0x2, %rcx
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x3, %xmm0
addq %rdx, %rsi
xorl %edx, %edx
movdqa 0x3ff(%rip), %xmm1      # 0x2070
movdqa 0x407(%rip), %xmm2      # 0x2080
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %r8d
notl %r8d
testb $0x1, %r8b
je 0x1cc7
leaq (%rsi,%rdx), %r8
movq %r8, (%rdi,%rdx,8)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %r8d
testb $0x1, %r8b
je 0x1ce3
leaq (%rsi,%rdx), %r8
incq %r8
movq %r8, 0x8(%rdi,%rdx,8)
addq $0x2, %rdx
cmpq %rdx, %rcx
jne 0x1c81
retq
nop