void init_permutations(unsigned char alpha[26], unsigned char ialpha[26],
                       unsigned char numer[10], unsigned char inumer[10],
                       unsigned char *key, int key_length) {
  unsigned char K[26];
  unsigned char temp;
  int i;
  int j;
  for (i = 0; i < 26; i++)
    alpha[i] = i;
  for (i = 0; i < 10; i++)
    numer[i] = i;
  for (i = 0; i < 26; i++) {
    K[i] = (key[i % key_length] + i * 0xe7) % 26;
  }
  for (i = 0; i < 26; i++) {
    j = (i + alpha[i] + K[i]) % 26;
    temp = alpha[i];
    alpha[i] = alpha[j];
    alpha[j] = temp;
  }
  for (i = 0; i < 26; i++)
    ialpha[alpha[i]] = i;
  for (i = 0; i < 10; i++) {
    j = (i + numer[i] + K[i]) % 10;
    temp = numer[i];
    numer[i] = numer[j];
    numer[j] = temp;
  }
  for (i = 0; i < 10; i++)
    inumer[numer[i]] = i;
}


x86 assembly (clang, -O0):
<init_permutations>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movl   $0x0,-0x58(%rbp)
cmpl   $0x1a,-0x58(%rbp)
jge    114b <init_permutations+0x4b>
mov    -0x58(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1123 <init_permutations+0x23>
movl   $0x0,-0x58(%rbp)
cmpl   $0xa,-0x58(%rbp)
jge    117a <init_permutations+0x7a>
mov    -0x58(%rbp),%eax
mov    %al,%dl
mov    -0x18(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1152 <init_permutations+0x52>
movl   $0x0,-0x58(%rbp)
cmpl   $0x1a,-0x58(%rbp)
jge    11ce <init_permutations+0xce>
mov    -0x28(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
mov    -0x68(%rbp),%rax
movslq %edx,%rcx
movzbl (%rax,%rcx,1),%eax
imul   $0xe7,-0x58(%rbp),%ecx
add    %ecx,%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
movslq -0x58(%rbp),%rax
mov    %cl,-0x50(%rbp,%rax,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1181 <init_permutations+0x81>
movl   $0x0,-0x58(%rbp)
cmpl   $0x1a,-0x58(%rbp)
jge    1246 <init_permutations+0x146>
mov    -0x58(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x58(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
movslq -0x58(%rbp),%rcx
movzbl -0x50(%rbp,%rcx,1),%ecx
add    %ecx,%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
mov    %edx,-0x5c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x51(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x51(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11d5 <init_permutations+0xd5>
movl   $0x0,-0x58(%rbp)
cmpl   $0x1a,-0x58(%rbp)
jge    127d <init_permutations+0x17d>
mov    -0x58(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x58(%rbp),%rsi
movzbl (%rcx,%rsi,1),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    124d <init_permutations+0x14d>
movl   $0x0,-0x58(%rbp)
cmpl   $0xa,-0x58(%rbp)
jge    12f5 <init_permutations+0x1f5>
mov    -0x58(%rbp),%eax
mov    -0x18(%rbp),%rcx
movslq -0x58(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
movslq -0x58(%rbp),%rcx
movzbl -0x50(%rbp,%rcx,1),%ecx
add    %ecx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x5c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x51(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x18(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x51(%rbp),%dl
mov    -0x18(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1284 <init_permutations+0x184>
movl   $0x0,-0x58(%rbp)
cmpl   $0xa,-0x58(%rbp)
jge    132c <init_permutations+0x22c>
mov    -0x58(%rbp),%eax
mov    %al,%dl
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq -0x58(%rbp),%rsi
movzbl (%rcx,%rsi,1),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    12fc <init_permutations+0x1fc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_permutations>:
push   %r14
push   %rbx
mov    %rdx,%r10
movaps 0xef3(%rip),%xmm0
movups %xmm0,(%rdi)
movabs $0x1716151413121110,%rax
15 16 17
mov    %rax,0x10(%rdi)
movw   $0x1918,0x18(%rdi)
movabs $0x706050403020100,%rax
05 06 07
mov    %rax,(%rdx)
movw   $0x908,0x8(%rdx)
xor    %r14d,%r14d
xor    %r11d,%r11d
nopl   (%rax)
mov    %r11d,%eax
cltd
idiv   %r9d
movzbl (%r8,%rdx,1),%eax
mov    %eax,%edx
add    %r14d,%edx
movzwl %dx,%edx
imul   $0x4ec5,%edx,%edx
shr    $0x13,%edx
lea    (%rdx,%rdx,4),%ebx
lea    (%rbx,%rbx,4),%ebx
add    %edx,%ebx
sub    %bl,%al
add    %r14b,%al
mov    %al,-0x28(%rsp,%r11,1)
add    $0x1,%r11
add    $0xe7,%r14d
cmp    $0x1a,%r11
jne    1140 <init_permutations+0x40>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%r8d
movzbl -0x28(%rsp,%rax,1),%r9d
lea    (%rax,%r8,1),%edx
mov    %r8d,%ebx
add    %r9d,%ebx
add    %r9d,%edx
movzwl %dx,%edx
imul   $0x4ec5,%edx,%r9d
shr    $0x13,%r9d
lea    (%r9,%r9,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %r9d,%edx
sub    %edx,%ebx
add    %eax,%ebx
movzwl %bx,%edx
movzbl (%rdi,%rdx,1),%ebx
mov    %bl,(%rdi,%rax,1)
mov    %r8b,(%rdi,%rdx,1)
add    $0x1,%rax
cmp    $0x1a,%rax
jne    1190 <init_permutations+0x90>
movzbl (%rdi),%eax
movb   $0x0,(%rsi,%rax,1)
movzbl 0x1(%rdi),%eax
movb   $0x1,(%rsi,%rax,1)
movzbl 0x2(%rdi),%eax
movb   $0x2,(%rsi,%rax,1)
movzbl 0x3(%rdi),%eax
movb   $0x3,(%rsi,%rax,1)
movzbl 0x4(%rdi),%eax
movb   $0x4,(%rsi,%rax,1)
movzbl 0x5(%rdi),%eax
movb   $0x5,(%rsi,%rax,1)
movzbl 0x6(%rdi),%eax
movb   $0x6,(%rsi,%rax,1)
movzbl 0x7(%rdi),%eax
movb   $0x7,(%rsi,%rax,1)
movzbl 0x8(%rdi),%eax
movb   $0x8,(%rsi,%rax,1)
movzbl 0x9(%rdi),%eax
movb   $0x9,(%rsi,%rax,1)
movzbl 0xa(%rdi),%eax
movb   $0xa,(%rsi,%rax,1)
movzbl 0xb(%rdi),%eax
movb   $0xb,(%rsi,%rax,1)
movzbl 0xc(%rdi),%eax
movb   $0xc,(%rsi,%rax,1)
movzbl 0xd(%rdi),%eax
movb   $0xd,(%rsi,%rax,1)
movzbl 0xe(%rdi),%eax
movb   $0xe,(%rsi,%rax,1)
movzbl 0xf(%rdi),%eax
movb   $0xf,(%rsi,%rax,1)
movzbl 0x10(%rdi),%eax
movb   $0x10,(%rsi,%rax,1)
movzbl 0x11(%rdi),%eax
movb   $0x11,(%rsi,%rax,1)
movzbl 0x12(%rdi),%eax
movb   $0x12,(%rsi,%rax,1)
movzbl 0x13(%rdi),%eax
movb   $0x13,(%rsi,%rax,1)
movzbl 0x14(%rdi),%eax
movb   $0x14,(%rsi,%rax,1)
movzbl 0x15(%rdi),%eax
movb   $0x15,(%rsi,%rax,1)
movzbl 0x16(%rdi),%eax
movb   $0x16,(%rsi,%rax,1)
movzbl 0x17(%rdi),%eax
movb   $0x17,(%rsi,%rax,1)
movzbl 0x18(%rdi),%eax
movb   $0x18,(%rsi,%rax,1)
movzbl 0x19(%rdi),%eax
movb   $0x19,(%rsi,%rax,1)
movzbl (%r10),%eax
movzbl -0x28(%rsp),%edx
add    %eax,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x1(%r10),%eax
movzbl -0x27(%rsp),%edx
add    %eax,%edx
add    $0x1,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x1(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x2(%r10),%eax
movzbl -0x26(%rsp),%edx
add    %eax,%edx
add    $0x2,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x2(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x3(%r10),%eax
movzbl -0x25(%rsp),%edx
add    %eax,%edx
add    $0x3,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x3(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x4(%r10),%eax
movzbl -0x24(%rsp),%edx
add    %eax,%edx
add    $0x4,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x4(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x5(%r10),%eax
movzbl -0x23(%rsp),%edx
add    %eax,%edx
add    $0x5,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x5(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x6(%r10),%eax
movzbl -0x22(%rsp),%edx
add    %eax,%edx
add    $0x6,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x6(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x7(%r10),%eax
movzbl -0x21(%rsp),%edx
add    %eax,%edx
add    $0x7,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x7(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x8(%r10),%eax
movzbl -0x20(%rsp),%edx
add    %eax,%edx
add    $0x8,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x8(%r10)
mov    %al,(%r10,%rdx,1)
movzbl 0x9(%r10),%eax
movzbl -0x1f(%rsp),%edx
add    %eax,%edx
add    $0x9,%edx
imul   $0xcccd,%edx,%esi
shr    $0x12,%esi
and    $0xfffffffe,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
movzwl %dx,%edx
mov    (%r10,%rdx,1),%bl
mov    %bl,0x9(%r10)
mov    %al,(%r10,%rdx,1)
movzbl (%r10),%eax
movb   $0x0,(%rcx,%rax,1)
movzbl 0x1(%r10),%eax
movb   $0x1,(%rcx,%rax,1)
movzbl 0x2(%r10),%eax
movb   $0x2,(%rcx,%rax,1)
movzbl 0x3(%r10),%eax
movb   $0x3,(%rcx,%rax,1)
movzbl 0x4(%r10),%eax
movb   $0x4,(%rcx,%rax,1)
movzbl 0x5(%r10),%eax
movb   $0x5,(%rcx,%rax,1)
movzbl 0x6(%r10),%eax
movb   $0x6,(%rcx,%rax,1)
movzbl 0x7(%r10),%eax
movb   $0x7,(%rcx,%rax,1)
movzbl 0x8(%r10),%eax
movb   $0x8,(%rcx,%rax,1)
movzbl 0x9(%r10),%eax
movb   $0x9,(%rcx,%rax,1)
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @init_permutations(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca [26 x i8]
%14 = alloca i8
%15 = alloca i32
%16 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
store i32 0, i32* %15
br label %17
17: ; preds = %27, %6
%18 = load i32, i32* %15
%19 = icmp slt i32 %18, 26
br i1 %19, label %20, label %30
20: ; preds = %17
%21 = load i32, i32* %15
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %7
%24 = load i32, i32* %15
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
store i8 %22, i8* %26
br label %27
27: ; preds = %20
%28 = load i32, i32* %15
%29 = add nsw i32 %28, 1
store i32 %29, i32* %15
br label %17
30: ; preds = %17
store i32 0, i32* %15
br label %31
31: ; preds = %41, %30
%32 = load i32, i32* %15
%33 = icmp slt i32 %32, 10
br i1 %33, label %34, label %44
34: ; preds = %31
%35 = load i32, i32* %15
%36 = trunc i32 %35 to i8
%37 = load i8*, i8** %9
%38 = load i32, i32* %15
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8, i8* %37, i64 %39
store i8 %36, i8* %40
br label %41
41: ; preds = %34
%42 = load i32, i32* %15
%43 = add nsw i32 %42, 1
store i32 %43, i32* %15
br label %31
44: ; preds = %31
store i32 0, i32* %15
br label %45
45: ; preds = %65, %44
%46 = load i32, i32* %15
%47 = icmp slt i32 %46, 26
br i1 %47, label %48, label %68
48: ; preds = %45
%49 = load i8*, i8** %11
%50 = load i32, i32* %15
%51 = load i32, i32* %12
%52 = srem i32 %50, %51
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %49, i64 %53
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = load i32, i32* %15
%58 = mul nsw i32 %57, 231
%59 = add nsw i32 %56, %58
%60 = srem i32 %59, 26
%61 = trunc i32 %60 to i8
%62 = load i32, i32* %15
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [26 x i8], [26 x i8]* %13, i64 0, i64 %63
store i8 %61, i8* %64
br label %65
65: ; preds = %48
%66 = load i32, i32* %15
%67 = add nsw i32 %66, 1
store i32 %67, i32* %15
br label %45
68: ; preds = %45
store i32 0, i32* %15
br label %69
69: ; preds = %107, %68
%70 = load i32, i32* %15
%71 = icmp slt i32 %70, 26
br i1 %71, label %72, label %110
72: ; preds = %69
%73 = load i32, i32* %15
%74 = load i8*, i8** %7
%75 = load i32, i32* %15
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %74, i64 %76
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = add nsw i32 %73, %79
%81 = load i32, i32* %15
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [26 x i8], [26 x i8]* %13, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = add nsw i32 %80, %85
%87 = srem i32 %86, 26
store i32 %87, i32* %16
%88 = load i8*, i8** %7
%89 = load i32, i32* %15
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8, i8* %88, i64 %90
%92 = load i8, i8* %91
store i8 %92, i8* %14
%93 = load i8*, i8** %7
%94 = load i32, i32* %16
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8, i8* %93, i64 %95
%97 = load i8, i8* %96
%98 = load i8*, i8** %7
%99 = load i32, i32* %15
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %98, i64 %100
store i8 %97, i8* %101
%102 = load i8, i8* %14
%103 = load i8*, i8** %7
%104 = load i32, i32* %16
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds i8, i8* %103, i64 %105
store i8 %102, i8* %106
br label %107
107: ; preds = %72
%108 = load i32, i32* %15
%109 = add nsw i32 %108, 1
store i32 %109, i32* %15
br label %69
110: ; preds = %69
store i32 0, i32* %15
br label %111
111: ; preds = %125, %110
%112 = load i32, i32* %15
%113 = icmp slt i32 %112, 26
br i1 %113, label %114, label %128
114: ; preds = %111
%115 = load i32, i32* %15
%116 = trunc i32 %115 to i8
%117 = load i8*, i8** %8
%118 = load i8*, i8** %7
%119 = load i32, i32* %15
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8, i8* %118, i64 %120
%122 = load i8, i8* %121
%123 = zext i8 %122 to i64
%124 = getelementptr inbounds i8, i8* %117, i64 %123
store i8 %116, i8* %124
br label %125
125: ; preds = %114
%126 = load i32, i32* %15
%127 = add nsw i32 %126, 1
store i32 %127, i32* %15
br label %111
128: ; preds = %111
store i32 0, i32* %15
br label %129
129: ; preds = %167, %128
%130 = load i32, i32* %15
%131 = icmp slt i32 %130, 10
br i1 %131, label %132, label %170
132: ; preds = %129
%133 = load i32, i32* %15
%134 = load i8*, i8** %9
%135 = load i32, i32* %15
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i8, i8* %134, i64 %136
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = add nsw i32 %133, %139
%141 = load i32, i32* %15
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [26 x i8], [26 x i8]* %13, i64 0, i64 %142
%144 = load i8, i8* %143
%145 = zext i8 %144 to i32
%146 = add nsw i32 %140, %145
%147 = srem i32 %146, 10
store i32 %147, i32* %16
%148 = load i8*, i8** %9
%149 = load i32, i32* %15
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i8, i8* %148, i64 %150
%152 = load i8, i8* %151
store i8 %152, i8* %14
%153 = load i8*, i8** %9
%154 = load i32, i32* %16
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i8, i8* %153, i64 %155
%157 = load i8, i8* %156
%158 = load i8*, i8** %9
%159 = load i32, i32* %15
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds i8, i8* %158, i64 %160
store i8 %157, i8* %161
%162 = load i8, i8* %14
%163 = load i8*, i8** %9
%164 = load i32, i32* %16
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds i8, i8* %163, i64 %165
store i8 %162, i8* %166
br label %167
167: ; preds = %132
%168 = load i32, i32* %15
%169 = add nsw i32 %168, 1
store i32 %169, i32* %15
br label %129
170: ; preds = %129
store i32 0, i32* %15
br label %171
171: ; preds = %185, %170
%172 = load i32, i32* %15
%173 = icmp slt i32 %172, 10
br i1 %173, label %174, label %188
174: ; preds = %171
%175 = load i32, i32* %15
%176 = trunc i32 %175 to i8
%177 = load i8*, i8** %10
%178 = load i8*, i8** %9
%179 = load i32, i32* %15
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds i8, i8* %178, i64 %180
%182 = load i8, i8* %181
%183 = zext i8 %182 to i64
%184 = getelementptr inbounds i8, i8* %177, i64 %183
store i8 %176, i8* %184
br label %185
185: ; preds = %174
%186 = load i32, i32* %15
%187 = add nsw i32 %186, 1
store i32 %187, i32* %15
br label %171
188: ; preds = %171
ret void
}

LLVM IR (-O2):
define void @init_permutations(i8* nocapture %0, i8* nocapture writeonly %1, i8* nocapture %2, i8* nocapture writeonly %3, i8* nocapture %4, i32 %5) {
%7 = alloca [26 x i8]
%8 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 0
%9 = bitcast i8* %0 to <16 x i8>*
store <16 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, <16 x i8>* %9
%10 = getelementptr inbounds i8, i8* %0, i64 16
store i8 16, i8* %10
%11 = getelementptr inbounds i8, i8* %0, i64 17
store i8 17, i8* %11
%12 = getelementptr inbounds i8, i8* %0, i64 18
store i8 18, i8* %12
%13 = getelementptr inbounds i8, i8* %0, i64 19
store i8 19, i8* %13
%14 = getelementptr inbounds i8, i8* %0, i64 20
store i8 20, i8* %14
%15 = getelementptr inbounds i8, i8* %0, i64 21
store i8 21, i8* %15
%16 = getelementptr inbounds i8, i8* %0, i64 22
store i8 22, i8* %16
%17 = getelementptr inbounds i8, i8* %0, i64 23
store i8 23, i8* %17
%18 = getelementptr inbounds i8, i8* %0, i64 24
store i8 24, i8* %18
%19 = getelementptr inbounds i8, i8* %0, i64 25
store i8 25, i8* %19
store i8 0, i8* %2
%20 = getelementptr inbounds i8, i8* %2, i64 1
store i8 1, i8* %20
%21 = getelementptr inbounds i8, i8* %2, i64 2
store i8 2, i8* %21
%22 = getelementptr inbounds i8, i8* %2, i64 3
store i8 3, i8* %22
%23 = getelementptr inbounds i8, i8* %2, i64 4
store i8 4, i8* %23
%24 = getelementptr inbounds i8, i8* %2, i64 5
store i8 5, i8* %24
%25 = getelementptr inbounds i8, i8* %2, i64 6
store i8 6, i8* %25
%26 = getelementptr inbounds i8, i8* %2, i64 7
store i8 7, i8* %26
%27 = getelementptr inbounds i8, i8* %2, i64 8
store i8 8, i8* %27
%28 = getelementptr inbounds i8, i8* %2, i64 9
store i8 9, i8* %28
br label %29
29: ; preds = %6, %29
%30 = phi i64 [ 0, %6 ], [ %43, %29 ]
%31 = trunc i64 %30 to i32
%32 = srem i32 %31, %5
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %4, i64 %33
%35 = load i8, i8* %34
%36 = zext i8 %35 to i16
%37 = trunc i64 %30 to i16
%38 = mul i16 %37, 231
%39 = add i16 %38, %36
%40 = urem i16 %39, 26
%41 = trunc i16 %40 to i8
%42 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 %30
store i8 %41, i8* %42
%43 = add nuw nsw i64 %30, 1
%44 = icmp eq i64 %43, 26
br i1 %44, label %45, label %29
45: ; preds = %29, %45
%46 = phi i64 [ %60, %45 ], [ 0, %29 ]
%47 = getelementptr inbounds i8, i8* %0, i64 %46
%48 = load i8, i8* %47
%49 = zext i8 %48 to i16
%50 = trunc i64 %46 to i16
%51 = add i16 %50, %49
%52 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 %46
%53 = load i8, i8* %52
%54 = zext i8 %53 to i16
%55 = add i16 %51, %54
%56 = urem i16 %55, 26
%57 = zext i16 %56 to i64
%58 = getelementptr inbounds i8, i8* %0, i64 %57
%59 = load i8, i8* %58
store i8 %59, i8* %47
store i8 %48, i8* %58
%60 = add nuw nsw i64 %46, 1
%61 = icmp eq i64 %60, 26
br i1 %61, label %62, label %45
62: ; preds = %45
%63 = getelementptr inbounds i8, i8* %0, i64 15
%64 = getelementptr inbounds i8, i8* %0, i64 14
%65 = getelementptr inbounds i8, i8* %0, i64 13
%66 = getelementptr inbounds i8, i8* %0, i64 12
%67 = getelementptr inbounds i8, i8* %0, i64 11
%68 = getelementptr inbounds i8, i8* %0, i64 10
%69 = getelementptr inbounds i8, i8* %0, i64 9
%70 = getelementptr inbounds i8, i8* %0, i64 8
%71 = getelementptr inbounds i8, i8* %0, i64 7
%72 = getelementptr inbounds i8, i8* %0, i64 6
%73 = getelementptr inbounds i8, i8* %0, i64 5
%74 = getelementptr inbounds i8, i8* %0, i64 4
%75 = getelementptr inbounds i8, i8* %0, i64 3
%76 = getelementptr inbounds i8, i8* %0, i64 2
%77 = getelementptr inbounds i8, i8* %0, i64 1
%78 = load i8, i8* %0
%79 = zext i8 %78 to i64
%80 = getelementptr inbounds i8, i8* %1, i64 %79
store i8 0, i8* %80
%81 = load i8, i8* %77
%82 = zext i8 %81 to i64
%83 = getelementptr inbounds i8, i8* %1, i64 %82
store i8 1, i8* %83
%84 = load i8, i8* %76
%85 = zext i8 %84 to i64
%86 = getelementptr inbounds i8, i8* %1, i64 %85
store i8 2, i8* %86
%87 = load i8, i8* %75
%88 = zext i8 %87 to i64
%89 = getelementptr inbounds i8, i8* %1, i64 %88
store i8 3, i8* %89
%90 = load i8, i8* %74
%91 = zext i8 %90 to i64
%92 = getelementptr inbounds i8, i8* %1, i64 %91
store i8 4, i8* %92
%93 = load i8, i8* %73
%94 = zext i8 %93 to i64
%95 = getelementptr inbounds i8, i8* %1, i64 %94
store i8 5, i8* %95
%96 = load i8, i8* %72
%97 = zext i8 %96 to i64
%98 = getelementptr inbounds i8, i8* %1, i64 %97
store i8 6, i8* %98
%99 = load i8, i8* %71
%100 = zext i8 %99 to i64
%101 = getelementptr inbounds i8, i8* %1, i64 %100
store i8 7, i8* %101
%102 = load i8, i8* %70
%103 = zext i8 %102 to i64
%104 = getelementptr inbounds i8, i8* %1, i64 %103
store i8 8, i8* %104
%105 = load i8, i8* %69
%106 = zext i8 %105 to i64
%107 = getelementptr inbounds i8, i8* %1, i64 %106
store i8 9, i8* %107
%108 = load i8, i8* %68
%109 = zext i8 %108 to i64
%110 = getelementptr inbounds i8, i8* %1, i64 %109
store i8 10, i8* %110
%111 = load i8, i8* %67
%112 = zext i8 %111 to i64
%113 = getelementptr inbounds i8, i8* %1, i64 %112
store i8 11, i8* %113
%114 = load i8, i8* %66
%115 = zext i8 %114 to i64
%116 = getelementptr inbounds i8, i8* %1, i64 %115
store i8 12, i8* %116
%117 = load i8, i8* %65
%118 = zext i8 %117 to i64
%119 = getelementptr inbounds i8, i8* %1, i64 %118
store i8 13, i8* %119
%120 = load i8, i8* %64
%121 = zext i8 %120 to i64
%122 = getelementptr inbounds i8, i8* %1, i64 %121
store i8 14, i8* %122
%123 = load i8, i8* %63
%124 = zext i8 %123 to i64
%125 = getelementptr inbounds i8, i8* %1, i64 %124
store i8 15, i8* %125
%126 = load i8, i8* %10
%127 = zext i8 %126 to i64
%128 = getelementptr inbounds i8, i8* %1, i64 %127
store i8 16, i8* %128
%129 = load i8, i8* %11
%130 = zext i8 %129 to i64
%131 = getelementptr inbounds i8, i8* %1, i64 %130
store i8 17, i8* %131
%132 = load i8, i8* %12
%133 = zext i8 %132 to i64
%134 = getelementptr inbounds i8, i8* %1, i64 %133
store i8 18, i8* %134
%135 = load i8, i8* %13
%136 = zext i8 %135 to i64
%137 = getelementptr inbounds i8, i8* %1, i64 %136
store i8 19, i8* %137
%138 = load i8, i8* %14
%139 = zext i8 %138 to i64
%140 = getelementptr inbounds i8, i8* %1, i64 %139
store i8 20, i8* %140
%141 = load i8, i8* %15
%142 = zext i8 %141 to i64
%143 = getelementptr inbounds i8, i8* %1, i64 %142
store i8 21, i8* %143
%144 = load i8, i8* %16
%145 = zext i8 %144 to i64
%146 = getelementptr inbounds i8, i8* %1, i64 %145
store i8 22, i8* %146
%147 = load i8, i8* %17
%148 = zext i8 %147 to i64
%149 = getelementptr inbounds i8, i8* %1, i64 %148
store i8 23, i8* %149
%150 = load i8, i8* %18
%151 = zext i8 %150 to i64
%152 = getelementptr inbounds i8, i8* %1, i64 %151
store i8 24, i8* %152
%153 = load i8, i8* %19
%154 = zext i8 %153 to i64
%155 = getelementptr inbounds i8, i8* %1, i64 %154
store i8 25, i8* %155
%156 = load i8, i8* %2
%157 = zext i8 %156 to i16
%158 = load i8, i8* %8
%159 = zext i8 %158 to i16
%160 = add nuw nsw i16 %157, %159
%161 = urem i16 %160, 10
%162 = zext i16 %161 to i64
%163 = getelementptr inbounds i8, i8* %2, i64 %162
%164 = load i8, i8* %163
store i8 %164, i8* %2
store i8 %156, i8* %163
%165 = load i8, i8* %20
%166 = zext i8 %165 to i16
%167 = add nuw nsw i16 %166, 1
%168 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 1
%169 = load i8, i8* %168
%170 = zext i8 %169 to i16
%171 = add nuw nsw i16 %167, %170
%172 = urem i16 %171, 10
%173 = zext i16 %172 to i64
%174 = getelementptr inbounds i8, i8* %2, i64 %173
%175 = load i8, i8* %174
store i8 %175, i8* %20
store i8 %165, i8* %174
%176 = load i8, i8* %21
%177 = zext i8 %176 to i16
%178 = add nuw nsw i16 %177, 2
%179 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 2
%180 = load i8, i8* %179
%181 = zext i8 %180 to i16
%182 = add nuw nsw i16 %178, %181
%183 = urem i16 %182, 10
%184 = zext i16 %183 to i64
%185 = getelementptr inbounds i8, i8* %2, i64 %184
%186 = load i8, i8* %185
store i8 %186, i8* %21
store i8 %176, i8* %185
%187 = load i8, i8* %22
%188 = zext i8 %187 to i16
%189 = add nuw nsw i16 %188, 3
%190 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 3
%191 = load i8, i8* %190
%192 = zext i8 %191 to i16
%193 = add nuw nsw i16 %189, %192
%194 = urem i16 %193, 10
%195 = zext i16 %194 to i64
%196 = getelementptr inbounds i8, i8* %2, i64 %195
%197 = load i8, i8* %196
store i8 %197, i8* %22
store i8 %187, i8* %196
%198 = load i8, i8* %23
%199 = zext i8 %198 to i16
%200 = add nuw nsw i16 %199, 4
%201 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 4
%202 = load i8, i8* %201
%203 = zext i8 %202 to i16
%204 = add nuw nsw i16 %200, %203
%205 = urem i16 %204, 10
%206 = zext i16 %205 to i64
%207 = getelementptr inbounds i8, i8* %2, i64 %206
%208 = load i8, i8* %207
store i8 %208, i8* %23
store i8 %198, i8* %207
%209 = load i8, i8* %24
%210 = zext i8 %209 to i16
%211 = add nuw nsw i16 %210, 5
%212 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 5
%213 = load i8, i8* %212
%214 = zext i8 %213 to i16
%215 = add nuw nsw i16 %211, %214
%216 = urem i16 %215, 10
%217 = zext i16 %216 to i64
%218 = getelementptr inbounds i8, i8* %2, i64 %217
%219 = load i8, i8* %218
store i8 %219, i8* %24
store i8 %209, i8* %218
%220 = load i8, i8* %25
%221 = zext i8 %220 to i16
%222 = add nuw nsw i16 %221, 6
%223 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 6
%224 = load i8, i8* %223
%225 = zext i8 %224 to i16
%226 = add nuw nsw i16 %222, %225
%227 = urem i16 %226, 10
%228 = zext i16 %227 to i64
%229 = getelementptr inbounds i8, i8* %2, i64 %228
%230 = load i8, i8* %229
store i8 %230, i8* %25
store i8 %220, i8* %229
%231 = load i8, i8* %26
%232 = zext i8 %231 to i16
%233 = add nuw nsw i16 %232, 7
%234 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 7
%235 = load i8, i8* %234
%236 = zext i8 %235 to i16
%237 = add nuw nsw i16 %233, %236
%238 = urem i16 %237, 10
%239 = zext i16 %238 to i64
%240 = getelementptr inbounds i8, i8* %2, i64 %239
%241 = load i8, i8* %240
store i8 %241, i8* %26
store i8 %231, i8* %240
%242 = load i8, i8* %27
%243 = zext i8 %242 to i16
%244 = add nuw nsw i16 %243, 8
%245 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 8
%246 = load i8, i8* %245
%247 = zext i8 %246 to i16
%248 = add nuw nsw i16 %244, %247
%249 = urem i16 %248, 10
%250 = zext i16 %249 to i64
%251 = getelementptr inbounds i8, i8* %2, i64 %250
%252 = load i8, i8* %251
store i8 %252, i8* %27
store i8 %242, i8* %251
%253 = load i8, i8* %28
%254 = zext i8 %253 to i16
%255 = add nuw nsw i16 %254, 9
%256 = getelementptr inbounds [26 x i8], [26 x i8]* %7, i64 0, i64 9
%257 = load i8, i8* %256
%258 = zext i8 %257 to i16
%259 = add nuw nsw i16 %255, %258
%260 = urem i16 %259, 10
%261 = zext i16 %260 to i64
%262 = getelementptr inbounds i8, i8* %2, i64 %261
%263 = load i8, i8* %262
store i8 %263, i8* %28
store i8 %253, i8* %262
%264 = load i8, i8* %2
%265 = zext i8 %264 to i64
%266 = getelementptr inbounds i8, i8* %3, i64 %265
store i8 0, i8* %266
%267 = load i8, i8* %20
%268 = zext i8 %267 to i64
%269 = getelementptr inbounds i8, i8* %3, i64 %268
store i8 1, i8* %269
%270 = load i8, i8* %21
%271 = zext i8 %270 to i64
%272 = getelementptr inbounds i8, i8* %3, i64 %271
store i8 2, i8* %272
%273 = load i8, i8* %22
%274 = zext i8 %273 to i64
%275 = getelementptr inbounds i8, i8* %3, i64 %274
store i8 3, i8* %275
%276 = load i8, i8* %23
%277 = zext i8 %276 to i64
%278 = getelementptr inbounds i8, i8* %3, i64 %277
store i8 4, i8* %278
%279 = load i8, i8* %24
%280 = zext i8 %279 to i64
%281 = getelementptr inbounds i8, i8* %3, i64 %280
store i8 5, i8* %281
%282 = load i8, i8* %25
%283 = zext i8 %282 to i64
%284 = getelementptr inbounds i8, i8* %3, i64 %283
store i8 6, i8* %284
%285 = load i8, i8* %26
%286 = zext i8 %285 to i64
%287 = getelementptr inbounds i8, i8* %3, i64 %286
store i8 7, i8* %287
%288 = load i8, i8* %27
%289 = zext i8 %288 to i64
%290 = getelementptr inbounds i8, i8* %3, i64 %289
store i8 8, i8* %290
%291 = load i8, i8* %28
%292 = zext i8 %291 to i64
%293 = getelementptr inbounds i8, i8* %3, i64 %292
store i8 9, i8* %293
ret void
}