void Ptngc_comp_canonical_dict(unsigned int *dict, int *ndict) {
  int i;
  for (i = 0; i < 0x20004; i++)
    dict[i] = i;
  *ndict = 0x20004;
}


x86 assembly (clang, -O0):
<Ptngc_comp_canonical_dict>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20004,-0x14(%rbp)
jge    113c <Ptngc_comp_canonical_dict+0x3c>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <Ptngc_comp_canonical_dict+0x13>
mov    -0x10(%rbp),%rax
movl   $0x20004,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ptngc_comp_canonical_dict>:
movdqa 0xef8(%rip),%xmm0
xor    %eax,%eax
movdqa 0xefd(%rip),%xmm8
movdqa 0xf04(%rip),%xmm9
movdqa 0xf0b(%rip),%xmm10
movdqa 0xf13(%rip),%xmm4
movdqa 0xf1b(%rip),%xmm5
movdqa 0xf23(%rip),%xmm6
movdqa 0xf2b(%rip),%xmm7
movdqa 0xf33(%rip),%xmm1
nopl   (%rax)
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqu %xmm0,(%rdi,%rax,4)
movdqu %xmm2,0x10(%rdi,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqu %xmm2,0x20(%rdi,%rax,4)
movdqu %xmm3,0x30(%rdi,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqu %xmm2,0x40(%rdi,%rax,4)
movdqu %xmm3,0x50(%rdi,%rax,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqu %xmm2,0x60(%rdi,%rax,4)
movdqu %xmm3,0x70(%rdi,%rax,4)
add    $0x20,%rax
paddd  %xmm1,%xmm0
cmp    $0x20000,%rax
jne    1150 <Ptngc_comp_canonical_dict+0x50>
movaps 0xebf(%rip),%xmm0
movups %xmm0,0x80000(%rdi)
movl   $0x20004,(%rsi)
ret

LLVM IR (-O0):
define void @Ptngc_comp_canonical_dict(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 131076
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %5
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 %10, i32* %14
br label %15
15: ; preds = %9
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
%19 = load i32*, i32** %4
store i32 131076, i32* %19
ret void
}

LLVM IR (-O2):
define void @Ptngc_comp_canonical_dict(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 0, %2 ], [ %32, %3 ]
%5 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %2 ], [ %33, %3 ]
%6 = add <4 x i32> %5, <i32 4, i32 4, i32 4, i32 4>
%7 = getelementptr inbounds i32, i32* %0, i64 %4
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %8
%9 = getelementptr inbounds i32, i32* %7, i64 4
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> %6, <4 x i32>* %10
%11 = or i64 %4, 8
%12 = add <4 x i32> %5, <i32 8, i32 8, i32 8, i32 8>
%13 = add <4 x i32> %5, <i32 12, i32 12, i32 12, i32 12>
%14 = getelementptr inbounds i32, i32* %0, i64 %11
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> %12, <4 x i32>* %15
%16 = getelementptr inbounds i32, i32* %14, i64 4
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> %13, <4 x i32>* %17
%18 = or i64 %4, 16
%19 = add <4 x i32> %5, <i32 16, i32 16, i32 16, i32 16>
%20 = add <4 x i32> %5, <i32 20, i32 20, i32 20, i32 20>
%21 = getelementptr inbounds i32, i32* %0, i64 %18
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> %19, <4 x i32>* %22
%23 = getelementptr inbounds i32, i32* %21, i64 4
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> %20, <4 x i32>* %24
%25 = or i64 %4, 24
%26 = add <4 x i32> %5, <i32 24, i32 24, i32 24, i32 24>
%27 = add <4 x i32> %5, <i32 28, i32 28, i32 28, i32 28>
%28 = getelementptr inbounds i32, i32* %0, i64 %25
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> %26, <4 x i32>* %29
%30 = getelementptr inbounds i32, i32* %28, i64 4
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> %27, <4 x i32>* %31
%32 = add nuw nsw i64 %4, 32
%33 = add <4 x i32> %5, <i32 32, i32 32, i32 32, i32 32>
%34 = icmp eq i64 %32, 131072
br i1 %34, label %35, label %3
35: ; preds = %3
%36 = getelementptr inbounds i32, i32* %0, i64 131072
store i32 131072, i32* %36
%37 = getelementptr inbounds i32, i32* %0, i64 131073
store i32 131073, i32* %37
%38 = getelementptr inbounds i32, i32* %0, i64 131074
store i32 131074, i32* %38
%39 = getelementptr inbounds i32, i32* %0, i64 131075
store i32 131075, i32* %39
store i32 131076, i32* %1
ret void
}