void encrypt(char *cipher, const char *plain, int len, int key) {
  int i, tmp;
  for (i = 0; i < len; i++) {
    if ('A' <= plain[i] && plain[i] <= 'Z') {
      tmp = plain[i] - 'A';
      tmp = (tmp + key) % 26;
      cipher[i] = tmp + 'A';
    } else if ('a' <= plain[i] && plain[i] <= 'z') {
      tmp = plain[i] - 'a';
      tmp = (tmp + key) % 26;
      cipher[i] = tmp + 'a';
    } else
      cipher[i] = plain[i];
  }
  return;
}


x86 assembly (clang, -O0):
<encrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1225 <encrypt+0x125>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     118e <encrypt+0x8e>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jg     118e <encrypt+0x8e>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x41,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    -0x18(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x41,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1212 <encrypt+0x112>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     11f7 <encrypt+0xf7>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jg     11f7 <encrypt+0xf7>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x61,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    -0x18(%rbp),%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x61,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    120d <encrypt+0x10d>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1212 <encrypt+0x112>
jmp    1217 <encrypt+0x117>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1119 <encrypt+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<encrypt>:
test   %edx,%edx
jle    191a <encrypt+0x81a>
mov    %edx,%r8d
cmp    $0x8,%edx
jae    1118 <encrypt+0x18>
xor    %r9d,%r9d
jmp    195b <encrypt+0x85b>
lea    (%rsi,%r8,1),%rax
cmp    %rdi,%rax
jbe    1132 <encrypt+0x32>
lea    (%rdi,%r8,1),%rax
cmp    %rsi,%rax
jbe    1132 <encrypt+0x32>
xor    %r9d,%r9d
jmp    195b <encrypt+0x85b>
movd   %ecx,%xmm0
cmp    $0x10,%edx
jae    1143 <encrypt+0x43>
xor    %r9d,%r9d
jmp    1632 <encrypt+0x532>
mov    %r8d,%r9d
and    $0xfffffff0,%r9d
movdqa %xmm0,-0x28(%rsp)
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,-0x18(%rsp)
xor    %eax,%eax
movdqa 0xedb(%rip),%xmm6
movdqa 0xee3(%rip),%xmm7
movdqa 0xeeb(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
movdqu (%rsi,%rax,1),%xmm2
punpckhbw %xmm2,%xmm3
punpckhwd %xmm3,%xmm15
psrad  $0x18,%xmm15
punpcklwd %xmm3,%xmm13
psrad  $0x18,%xmm13
punpcklbw %xmm2,%xmm3
punpckhwd %xmm3,%xmm14
psrad  $0x18,%xmm14
punpcklwd %xmm3,%xmm3
psrad  $0x18,%xmm3
movdqa %xmm2,%xmm4
paddb  0xe3d(%rip),%xmm4
movdqa %xmm4,%xmm5
movdqa 0xe41(%rip),%xmm1
pminub %xmm1,%xmm5
pcmpeqb %xmm4,%xmm5
movdqa %xmm2,%xmm4
paddb  0xe3d(%rip),%xmm4
movdqa %xmm4,%xmm8
pminub %xmm1,%xmm8
pcmpeqb %xmm4,%xmm8
pand   %xmm5,%xmm8
movdqa -0x18(%rsp),%xmm1
paddd  %xmm1,%xmm3
paddd  %xmm1,%xmm14
paddd  %xmm1,%xmm13
paddd  %xmm1,%xmm15
movdqa %xmm15,%xmm10
movdqa 0xe13(%rip),%xmm1
paddd  %xmm1,%xmm10
movdqa %xmm13,%xmm9
paddd  %xmm1,%xmm9
movdqa %xmm14,%xmm11
paddd  %xmm1,%xmm11
movdqa %xmm3,%xmm12
paddd  %xmm1,%xmm12
movdqa %xmm12,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm12,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm12,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm12
movdqa %xmm11,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm11,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm11,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm11
movdqa %xmm9,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm9,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm9,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm9
movdqa %xmm10,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm10,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm10,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm10
pand   %xmm0,%xmm10
pand   %xmm0,%xmm9
packuswb %xmm10,%xmm9
pand   %xmm0,%xmm11
pand   %xmm0,%xmm12
packuswb %xmm11,%xmm12
packuswb %xmm9,%xmm12
movdqa 0xc85(%rip),%xmm1
paddd  %xmm1,%xmm15
paddd  %xmm1,%xmm13
paddd  %xmm1,%xmm14
paddd  %xmm1,%xmm3
movdqa %xmm3,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm3,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm3,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm3
movdqa %xmm14,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm14,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm14,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm14
movdqa %xmm13,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm13,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm13,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm13
movdqa %xmm15,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm15,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm15,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm15
pand   %xmm0,%xmm15
pand   %xmm0,%xmm13
packuswb %xmm15,%xmm13
pand   %xmm0,%xmm14
pand   %xmm0,%xmm3
packuswb %xmm14,%xmm3
packuswb %xmm13,%xmm3
movdqa %xmm2,%xmm4
paddb  0xad8(%rip),%xmm4
movdqa %xmm4,%xmm5
pminub 0xadc(%rip),%xmm5
pcmpeqb %xmm4,%xmm5
paddb  0xa8f(%rip),%xmm12
paddb  0xaa7(%rip),%xmm3
pand   %xmm5,%xmm12
pandn  %xmm3,%xmm5
por    %xmm12,%xmm5
pand   %xmm8,%xmm2
pandn  %xmm5,%xmm8
por    %xmm2,%xmm8
movdqu %xmm8,(%rdi,%rax,1)
add    $0x10,%rax
cmp    %rax,%r9
jne    1180 <encrypt+0x80>
cmp    %r8,%r9
movdqa -0x28(%rsp),%xmm0
je     191a <encrypt+0x81a>
test   $0x8,%r8b
je     195b <encrypt+0x85b>
mov    %r9,%rax
mov    %r8d,%r9d
and    $0xfffffff8,%r9d
pshufd $0x0,%xmm0,%xmm0
movdqa 0xa86(%rip),%xmm15
movdqa 0x9dd(%rip),%xmm12
movdqa 0x9e5(%rip),%xmm6
movdqa 0x9ed(%rip),%xmm7
movdqa 0x9f5(%rip),%xmm1
movdqa 0xa0c(%rip),%xmm13
movdqa 0xaa3(%rip),%xmm14
nopl   (%rax)
movq   (%rsi,%rax,1),%xmm3
punpcklbw %xmm3,%xmm2
punpckhwd %xmm2,%xmm11
psrad  $0x18,%xmm11
punpcklwd %xmm2,%xmm8
psrad  $0x18,%xmm8
movdqa %xmm3,%xmm5
paddb  0xa15(%rip),%xmm5
movdqa %xmm5,%xmm2
pmaxub %xmm15,%xmm2
pcmpeqb %xmm5,%xmm2
movdqa %xmm3,%xmm4
paddb  0xa1c(%rip),%xmm4
movdqa %xmm4,%xmm5
pmaxub %xmm15,%xmm5
pcmpeqb %xmm4,%xmm5
pxor   0xa57(%rip),%xmm5
pandn  %xmm5,%xmm2
paddd  %xmm0,%xmm8
paddd  %xmm0,%xmm11
movdqa %xmm11,%xmm9
paddd  %xmm12,%xmm9
movdqa %xmm8,%xmm10
paddd  %xmm12,%xmm10
movdqa %xmm10,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm10,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm10,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm10
movdqa %xmm9,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm9,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm9,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm9
pand   %xmm1,%xmm9
pand   %xmm1,%xmm10
packuswb %xmm9,%xmm10
paddd  %xmm13,%xmm11
paddd  %xmm13,%xmm8
movdqa %xmm8,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm8,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm8,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm8
movdqa %xmm11,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xed,%xmm4,%xmm4
pshufd $0xf5,%xmm11,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xed,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
pxor   %xmm5,%xmm5
pcmpgtd %xmm11,%xmm5
pand   %xmm6,%xmm5
psubd  %xmm5,%xmm4
movdqa %xmm4,%xmm5
psrld  $0x1f,%xmm5
psrld  $0x3,%xmm4
paddd  %xmm5,%xmm4
pshufd $0xf5,%xmm4,%xmm5
pmuludq %xmm7,%xmm4
pshufd $0xe8,%xmm4,%xmm4
pmuludq %xmm7,%xmm5
pshufd $0xe8,%xmm5,%xmm5
punpckldq %xmm5,%xmm4
psubd  %xmm4,%xmm11
pand   %xmm1,%xmm11
pand   %xmm1,%xmm8
packuswb %xmm11,%xmm8
movdqa %xmm3,%xmm4
paddb  0x851(%rip),%xmm4
movdqa %xmm4,%xmm5
pmaxub %xmm14,%xmm5
pcmpeqb %xmm4,%xmm5
packuswb %xmm10,%xmm10
paddb  0x816(%rip),%xmm10
packuswb %xmm8,%xmm8
paddb  0x818(%rip),%xmm8
pand   %xmm5,%xmm8
pandn  %xmm10,%xmm5
por    %xmm8,%xmm5
pand   %xmm2,%xmm3
pandn  %xmm5,%xmm2
por    %xmm3,%xmm2
movq   %xmm2,(%rdi,%rax,1)
add    $0x8,%rax
cmp    %rax,%r9
jne    1680 <encrypt+0x580>
cmp    %r8,%r9
jne    195b <encrypt+0x85b>
ret
nopl   0x0(%rax,%rax,1)
lea    (%r10,%rcx,1),%eax
add    $0xffffffbf,%eax
movslq %eax,%r11
imul   $0x4ec4ec4f,%r11,%rdx
mov    %rdx,%r10
shr    $0x3f,%r10
shr    $0x23,%rdx
add    %r10d,%edx
lea    (%rdx,%rdx,4),%eax
lea    (%rax,%rax,4),%eax
add    %edx,%eax
sub    %eax,%r11d
add    $0x41,%r11b
mov    %r11b,(%rdi,%r9,1)
add    $0x1,%r9
cmp    %r9,%r8
je     191a <encrypt+0x81a>
movzbl (%rsi,%r9,1),%r11d
movsbl %r11b,%r10d
lea    -0x41(%r10),%edx
cmp    $0x19,%dl
jbe    1920 <encrypt+0x820>
lea    -0x61(%r11),%eax
cmp    $0x19,%al
ja     194e <encrypt+0x84e>
lea    (%r10,%rcx,1),%eax
add    $0xffffff9f,%eax
movslq %eax,%r11
imul   $0x4ec4ec4f,%r11,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
shr    $0x23,%rax
add    %edx,%eax
lea    (%rax,%rax,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %eax,%edx
sub    %edx,%r11d
add    $0x61,%r11b
jmp    194e <encrypt+0x84e>

LLVM IR (-O0):
define void @encrypt(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
br label %11
11: ; preds = %97, %4
%12 = load i32, i32* %9
%13 = load i32, i32* %7
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %100
15: ; preds = %11
%16 = load i8*, i8** %6
%17 = load i32, i32* %9
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp sle i32 65, %21
br i1 %22, label %23, label %50
23: ; preds = %15
%24 = load i8*, i8** %6
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp sle i32 %29, 90
br i1 %30, label %31, label %50
31: ; preds = %23
%32 = load i8*, i8** %6
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %32, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = sub nsw i32 %37, 65
store i32 %38, i32* %10
%39 = load i32, i32* %10
%40 = load i32, i32* %8
%41 = add nsw i32 %39, %40
%42 = srem i32 %41, 26
store i32 %42, i32* %10
%43 = load i32, i32* %10
%44 = add nsw i32 %43, 65
%45 = trunc i32 %44 to i8
%46 = load i8*, i8** %5
%47 = load i32, i32* %9
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8, i8* %46, i64 %48
store i8 %45, i8* %49
br label %96
50: ; preds = %23, %15
%51 = load i8*, i8** %6
%52 = load i32, i32* %9
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp sle i32 97, %56
br i1 %57, label %58, label %85
58: ; preds = %50
%59 = load i8*, i8** %6
%60 = load i32, i32* %9
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8, i8* %59, i64 %61
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = icmp sle i32 %64, 122
br i1 %65, label %66, label %85
66: ; preds = %58
%67 = load i8*, i8** %6
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %67, i64 %69
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = sub nsw i32 %72, 97
store i32 %73, i32* %10
%74 = load i32, i32* %10
%75 = load i32, i32* %8
%76 = add nsw i32 %74, %75
%77 = srem i32 %76, 26
store i32 %77, i32* %10
%78 = load i32, i32* %10
%79 = add nsw i32 %78, 97
%80 = trunc i32 %79 to i8
%81 = load i8*, i8** %5
%82 = load i32, i32* %9
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %81, i64 %83
store i8 %80, i8* %84
br label %95
85: ; preds = %58, %50
%86 = load i8*, i8** %6
%87 = load i32, i32* %9
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %86, i64 %88
%90 = load i8, i8* %89
%91 = load i8*, i8** %5
%92 = load i32, i32* %9
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i8, i8* %91, i64 %93
store i8 %90, i8* %94
br label %95
95: ; preds = %85, %66
br label %96
96: ; preds = %95, %31
br label %97
97: ; preds = %96
%98 = load i32, i32* %9
%99 = add nsw i32 %98, 1
store i32 %99, i32* %9
br label %11
100: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @encrypt(i8* nocapture writeonly %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %120
6: ; preds = %4
%7 = zext i32 %2 to i64
%8 = icmp ult i32 %2, 8
br i1 %8, label %91, label %9
9: ; preds = %6
%10 = getelementptr i8, i8* %0, i64 %7
%11 = getelementptr i8, i8* %1, i64 %7
%12 = icmp ugt i8* %11, %0
%13 = icmp ugt i8* %10, %1
%14 = and i1 %12, %13
br i1 %14, label %91, label %15
15: ; preds = %9
%16 = icmp ult i32 %2, 16
br i1 %16, label %55, label %17
17: ; preds = %15
%18 = and i64 %7, 4294967280
%19 = insertelement <16 x i32> poison, i32 %3, i64 0
%20 = shufflevector <16 x i32> %19, <16 x i32> poison, <16 x i32> zeroinitializer
br label %21
21: ; preds = %21, %17
%22 = phi i64 [ 0, %17 ], [ %48, %21 ]
%23 = getelementptr inbounds i8, i8* %1, i64 %22
%24 = bitcast i8* %23 to <16 x i8>*
%25 = load <16 x i8>, <16 x i8>* %24
%26 = sext <16 x i8> %25 to <16 x i32>
%27 = add <16 x i8> %25, <i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91>
%28 = icmp ult <16 x i8> %27, <i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26>
%29 = add <16 x i8> %25, <i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123>
%30 = icmp ult <16 x i8> %29, <i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26>
%31 = add <16 x i32> %20, %26
%32 = add <16 x i32> %31, <i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97>
%33 = srem <16 x i32> %32, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
%34 = trunc <16 x i32> %33 to <16 x i8>
%35 = add nsw <16 x i8> %34, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
%36 = add <16 x i32> %20, %26
%37 = add <16 x i32> %36, <i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65>
%38 = srem <16 x i32> %37, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
%39 = trunc <16 x i32> %38 to <16 x i8>
%40 = add nsw <16 x i8> %39, <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>
%41 = add <16 x i8> %25, <i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97>
%42 = icmp ult <16 x i8> %41, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
%43 = and <16 x i1> %28, %30
%44 = select <16 x i1> %42, <16 x i8> %35, <16 x i8> %40
%45 = select <16 x i1> %43, <16 x i8> %25, <16 x i8> %44
%46 = getelementptr inbounds i8, i8* %0, i64 %22
%47 = bitcast i8* %46 to <16 x i8>*
store <16 x i8> %45, <16 x i8>* %47
%48 = add nuw i64 %22, 16
%49 = icmp eq i64 %48, %18
br i1 %49, label %50, label %21
50: ; preds = %21
%51 = icmp eq i64 %18, %7
br i1 %51, label %120, label %52
52: ; preds = %50
%53 = and i64 %7, 8
%54 = icmp eq i64 %53, 0
br i1 %54, label %91, label %55
55: ; preds = %15, %52
%56 = phi i64 [ %18, %52 ], [ 0, %15 ]
%57 = and i64 %7, 4294967288
%58 = insertelement <8 x i32> poison, i32 %3, i64 0
%59 = shufflevector <8 x i32> %58, <8 x i32> poison, <8 x i32> zeroinitializer
br label %60
60: ; preds = %60, %55
%61 = phi i64 [ %56, %55 ], [ %87, %60 ]
%62 = getelementptr inbounds i8, i8* %1, i64 %61
%63 = bitcast i8* %62 to <8 x i8>*
%64 = load <8 x i8>, <8 x i8>* %63
%65 = sext <8 x i8> %64 to <8 x i32>
%66 = add <8 x i8> %64, <i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91, i8 -91>
%67 = icmp ult <8 x i8> %66, <i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26>
%68 = add <8 x i8> %64, <i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123, i8 -123>
%69 = icmp ult <8 x i8> %68, <i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26, i8 -26>
%70 = add <8 x i32> %59, %65
%71 = add <8 x i32> %70, <i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97>
%72 = srem <8 x i32> %71, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
%73 = trunc <8 x i32> %72 to <8 x i8>
%74 = add nsw <8 x i8> %73, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97>
%75 = add <8 x i32> %59, %65
%76 = add <8 x i32> %75, <i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65, i32 -65>
%77 = srem <8 x i32> %76, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
%78 = trunc <8 x i32> %77 to <8 x i8>
%79 = add nsw <8 x i8> %78, <i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65, i8 65>
%80 = add <8 x i8> %64, <i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97, i8 -97>
%81 = icmp ult <8 x i8> %80, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
%82 = and <8 x i1> %67, %69
%83 = select <8 x i1> %81, <8 x i8> %74, <8 x i8> %79
%84 = select <8 x i1> %82, <8 x i8> %64, <8 x i8> %83
%85 = getelementptr inbounds i8, i8* %0, i64 %61
%86 = bitcast i8* %85 to <8 x i8>*
store <8 x i8> %84, <8 x i8>* %86
%87 = add nuw i64 %61, 8
%88 = icmp eq i64 %87, %57
br i1 %88, label %89, label %60
89: ; preds = %60
%90 = icmp eq i64 %57, %7
br i1 %90, label %120, label %91
91: ; preds = %9, %6, %52, %89
%92 = phi i64 [ 0, %6 ], [ 0, %9 ], [ %18, %52 ], [ %57, %89 ]
br label %93
93: ; preds = %91, %115
%94 = phi i64 [ %118, %115 ], [ %92, %91 ]
%95 = getelementptr inbounds i8, i8* %1, i64 %94
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = add i8 %96, -65
%99 = icmp ult i8 %98, 26
br i1 %99, label %100, label %106
100: ; preds = %93
%101 = add i32 %97, %3
%102 = add i32 %101, -65
%103 = srem i32 %102, 26
%104 = trunc i32 %103 to i8
%105 = add nsw i8 %104, 65
br label %115
106: ; preds = %93
%107 = add i8 %96, -97
%108 = icmp ult i8 %107, 26
br i1 %108, label %109, label %115
109: ; preds = %106
%110 = add i32 %97, %3
%111 = add i32 %110, -97
%112 = srem i32 %111, 26
%113 = trunc i32 %112 to i8
%114 = add nsw i8 %113, 97
br label %115
115: ; preds = %106, %100, %109
%116 = phi i8 [ %105, %100 ], [ %114, %109 ], [ %96, %106 ]
%117 = getelementptr inbounds i8, i8* %0, i64 %94
store i8 %116, i8* %117
%118 = add nuw nsw i64 %94, 1
%119 = icmp eq i64 %118, %7
br i1 %119, label %120, label %93
120: ; preds = %115, %50, %89, %4
ret void
}