int main() {
  short array[1000] = {
      83, 86, 77, 15, 93, 35, 86, 92, 49, 21, 62, 27, 90, 59, 63, 26, 40, 26,
      72, 36, 11, 68, 67, 29, 82, 30, 62, 23, 67, 35, 29, 2,  22, 58, 69, 67,
      93, 56, 11, 42, 29, 73, 21, 19, 84, 37, 98, 24, 15, 70, 13, 26, 91, 80,
      56, 73, 62, 70, 96, 81, 5,  25, 84, 27, 36, 5,  46, 29, 13, 57, 24, 95,
      82, 45, 14, 67, 34, 64, 43, 50, 87, 8,  76, 78, 88, 84, 3,  51, 54, 99,
      32, 60, 76, 68, 39, 12, 26, 86, 94, 39, 95, 70, 34, 78, 67, 1,  97, 2,
      17, 92, 52, 56, 1,  80, 86, 41, 65, 89, 44, 19, 40, 29, 31, 17, 97, 71,
      81, 75, 9,  27, 67, 56, 97, 53, 86, 65, 6,  83, 19, 24, 28, 71, 32, 29,
      3,  19, 70, 68, 8,  15, 40, 49, 96, 23, 18, 45, 46, 51, 21, 55, 79, 88,
      64, 28, 41, 50, 93, 0,  34, 64, 24, 14, 87, 56, 43, 91, 27, 65, 59, 36,
      32, 51, 37, 28, 75, 7,  74, 21, 58, 95, 29, 37, 35, 93, 18, 28, 43, 11,
      28, 29, 76, 4,  43, 63, 13, 38, 6,  40, 4,  18, 28, 88, 69, 17, 17, 96,
      24, 43, 70, 83, 90, 99, 72, 25, 44, 90, 5,  39, 54, 86, 69, 82, 42, 64,
      97, 7,  55, 4,  48, 11, 22, 28, 99, 43, 46, 68, 40, 22, 11, 10, 5,  1,
      61, 30, 78, 5,  20, 36, 44, 26, 22, 65, 8,  16, 82, 58, 24, 37, 62, 24,
      0,  36, 52, 99, 79, 50, 68, 71, 73, 31, 81, 30, 33, 94, 60, 63, 99, 81,
      99, 96, 59, 73, 13, 68, 90, 95, 26, 66, 84, 40, 90, 84, 76, 42, 36, 7,
      45, 56, 79, 18, 87, 12, 48, 72, 59, 9,  36, 10, 42, 87, 6,  1,  13, 72,
      21, 55, 19, 99, 21, 4,  39, 11, 40, 67, 5,  28, 27, 50, 84, 58, 20, 24,
      22, 69, 96, 81, 30, 84, 92, 72, 72, 50, 25, 85, 22, 99, 40, 42, 98, 13,
      98, 90, 24, 90, 9,  81, 19, 36, 32, 55, 94, 4,  79, 69, 73, 76, 50, 55,
      60, 42, 79, 84, 93, 5,  21, 67, 4,  13, 61, 54, 26, 59, 44, 2,  2,  6,
      84, 21, 42, 68, 28, 89, 72, 8,  58, 98, 36, 8,  53, 48, 3,  33, 33, 48,
      90, 54, 67, 46, 68, 29, 0,  46, 88, 97, 49, 90, 3,  33, 63, 97, 53, 92,
      86, 25, 52, 96, 75, 88, 57, 29, 36, 60, 14, 21, 60, 4,  28, 27, 50, 48,
      56, 2,  94, 97, 99, 43, 39, 2,  28, 3,  0,  81, 47, 38, 59, 51, 35, 34,
      39, 92, 15, 27, 4,  29, 49, 64, 85, 29, 43, 35, 77, 0,  38, 71, 49, 89,
      67, 88, 92, 95, 43, 44, 29, 90, 82, 40, 41, 69, 26, 32, 61, 42, 60, 17,
      23, 61, 81, 9,  90, 25, 96, 67, 77, 34, 90, 26, 24, 57, 14, 68, 5,  58,
      12, 86, 0,  46, 26, 94, 16, 52, 78, 29, 46, 90, 47, 70, 51, 80, 31, 93,
      57, 27, 12, 86, 14, 55, 12, 90, 12, 79, 10, 69, 89, 74, 55, 41, 20, 33,
      87, 88, 38, 66, 70, 84, 56, 17, 6,  60, 49, 37, 5,  59, 17, 18, 45, 83,
      73, 58, 73, 37, 89, 83, 7,  78, 57, 14, 71, 29, 0,  59, 18, 38, 25, 88,
      74, 33, 57, 81, 93, 58, 70, 99, 17, 39, 69, 63, 22, 94, 73, 47, 31, 62,
      82, 90, 92, 91, 57, 15, 21, 57, 74, 91, 47, 51, 31, 21, 37, 40, 54, 30,
      98, 25, 81, 16, 16, 2,  31, 39, 96, 4,  38, 80, 18, 21, 70, 62, 12, 79,
      77, 85, 36, 4,  76, 83, 7,  59, 57, 44, 99, 11, 27, 50, 36, 60, 18, 5,
      63, 49, 44, 11, 5,  34, 91, 75, 55, 14, 89, 68, 93, 18, 5,  82, 22, 82,
      17, 30, 93, 74, 26, 93, 86, 53, 43, 74, 14, 13, 79, 77, 62, 75, 88, 19,
      10, 32, 94, 17, 46, 35, 37, 91, 53, 43, 73, 28, 25, 91, 10, 18, 17, 36,
      63, 55, 90, 58, 30, 4,  71, 61, 33, 85, 89, 73, 4,  51, 5,  50, 68, 3,
      85, 6,  95, 39, 49, 20, 67, 26, 63, 77, 96, 81, 65, 60, 36, 55, 70, 18,
      11, 42, 32, 96, 79, 21, 70, 84, 72, 27, 34, 40, 83, 72, 98, 30, 63, 47,
      50, 30, 73, 14, 59, 22, 47, 24, 82, 35, 32, 4,  54, 43, 98, 86, 40, 78,
      59, 62, 62, 83, 41, 48, 23, 24, 72, 22, 54, 35, 21, 57, 65, 47, 71, 76,
      69, 18, 1,  3,  53, 33, 7,  59, 28, 6,  97, 20, 84, 8,  34, 98, 91, 76,
      98, 15, 52, 71, 89, 59, 6,  10, 16, 24, 9,  39, 0,  78, 9,  53, 81, 14,
      38, 89, 26, 67, 47, 23, 87, 31, 32, 22, 81, 75, 50, 79, 90, 54, 50, 31,
      13, 57, 94, 81, 81, 3,  20, 33, 82, 81, 87, 15, 96, 25, 4,  22, 92, 51,
      97, 32, 34, 81, 6,  15, 57, 8,  95, 99, 62, 97, 83, 76, 54, 77, 9,  87,
      32, 82, 21, 66, 63, 60, 82, 11, 85, 86, 85, 30, 90, 83, 14, 76, 16, 20,
      92, 25, 28, 39, 25, 90, 36, 60, 18, 43, 37, 28, 82, 21, 10, 55, 88, 25,
      15, 70, 37, 53, 8,  22, 83, 50, 57, 97, 27, 26, 69, 71, 51, 49, 10, 28,
      39, 98, 88, 10, 93, 77, 90, 76, 99, 52, 31, 87, 77, 99, 57, 66, 52, 17,
      41, 35, 68, 98, 84, 95, 76, 5,  66, 28, 54, 28, 8,  93, 78, 97, 55, 72,
      74, 45, 0,  25, 97, 83, 12, 27, 82, 21};
  int t;
  for (int c = 0; c < 100; c++) {
    for (int i = 0; i < 1000; i++) {
      for (int y = 0; y < 1000 - 1; y++) {
        if (array[y + 1] < array[y]) {
          t = array[y];
          array[y] = array[y + 1];
          array[y + 1] = t;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7e0(%rbp),%rdi
lea    0xed0(%rip),%rsi
mov    $0x7d0,%edx
call   1030 <memcpy@plt>
movl   $0x0,-0x7e8(%rbp)
cmpl   $0x64,-0x7e8(%rbp)
jge    124d <main+0x13d>
movl   $0x0,-0x7ec(%rbp)
cmpl   $0x3e8,-0x7ec(%rbp)
jge    1234 <main+0x124>
movl   $0x0,-0x7f0(%rbp)
cmpl   $0x3e7,-0x7f0(%rbp)
jge    121b <main+0x10b>
mov    -0x7f0(%rbp),%eax
add    $0x1,%eax
cltq
movswl -0x7e0(%rbp,%rax,2),%eax
ff
movslq -0x7f0(%rbp),%rcx
movswl -0x7e0(%rbp,%rcx,2),%ecx
ff
cmp    %ecx,%eax
jge    1202 <main+0xf2>
movslq -0x7f0(%rbp),%rax
movswl -0x7e0(%rbp,%rax,2),%eax
ff
mov    %eax,-0x7e4(%rbp)
mov    -0x7f0(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x7e0(%rbp,%rax,2),%cx
ff
movslq -0x7f0(%rbp),%rax
mov    %cx,-0x7e0(%rbp,%rax,2)
ff
mov    -0x7e4(%rbp),%eax
mov    %ax,%cx
mov    -0x7f0(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cx,-0x7e0(%rbp,%rax,2)
ff
jmp    1207 <main+0xf7>
mov    -0x7f0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7f0(%rbp)
jmp    1175 <main+0x65>
jmp    1220 <main+0x110>
mov    -0x7ec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7ec(%rbp)
jmp    115b <main+0x4b>
jmp    1239 <main+0x129>
mov    -0x7e8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7e8(%rbp)
jmp    1144 <main+0x34>
mov    -0x4(%rbp),%eax
add    $0x7f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x7d8,%rsp
lea    0xee2(%rip),%rsi
mov    %rsp,%rdi
mov    $0x7d0,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
jmp    1138 <main+0x28>
nop
add    $0x1,%eax
cmp    $0x64,%eax
je     11b3 <main+0xa3>
xor    %ecx,%ecx
jmp    114b <main+0x3b>
nopl   0x0(%rax)
add    $0x1,%ecx
cmp    $0x3e8,%ecx
je     1130 <main+0x20>
mov    $0x2,%edx
movzwl (%rsp),%esi
jmp    1166 <main+0x56>
cs nopw 0x0(%rax,%rax,1)
mov    %edi,%esi
add    $0x2,%rdx
movzwl -0x2(%rsp,%rdx,2),%edi
cmp    %si,%di
jge    1190 <main+0x80>
mov    %di,-0x4(%rsp,%rdx,2)
mov    %si,-0x2(%rsp,%rdx,2)
cmp    $0x3e8,%rdx
jne    119b <main+0x8b>
jmp    1140 <main+0x30>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%esi
cmp    $0x3e8,%rdx
je     1140 <main+0x30>
movzwl (%rsp,%rdx,2),%edi
cmp    %si,%di
jge    1160 <main+0x50>
mov    %di,-0x2(%rsp,%rdx,2)
mov    %si,(%rsp,%rdx,2)
add    $0x2,%rdx
jmp    1166 <main+0x56>
xor    %eax,%eax
add    $0x7d8,%rsp
ret

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

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