void Viterbi(int output_u_int[], int out0[], int state0[], int out1[],
             int state1[], float input_c[], int KK, int nn, int LL) {
  int i, t, state, mm, states;
  int number_symbols;
  float metric;
  float *prev_section, *next_section;
  int *prev_bit;
  int *prev_state;
  float *metric_c;
  float *rec_array;
  float max_val;
  mm = KK - 1;
  states = 1 << mm;
  number_symbols = 1 << nn;
  prev_section = calloc(states, sizeof(float));
  next_section = calloc(states, sizeof(float));
  prev_bit = calloc(states * (LL + mm), sizeof(int));
  prev_state = calloc(states * (LL + mm), sizeof(int));
  rec_array = calloc(nn, sizeof(float));
  metric_c = calloc(number_symbols, sizeof(float));
  for (state = 0; state < states; state++) {
    prev_section[state] = -1e7;
    next_section[state] = -1e7;
  }
  prev_section[0] = 0;
  for (t = 0; t < LL + mm; t++) {
    for (i = 0; i < nn; i++)
      rec_array[i] = input_c[nn * t + i];
    for (i = 0; i < number_symbols; i++)
      metric_c[i] = Gamma(rec_array, i, nn);
    for (state = 0; state < states; state++) {
      metric = prev_section[state] + metric_c[out0[state]];
      if (metric > next_section[state0[state]]) {
        next_section[state0[state]] = metric;
        prev_state[t * states + state0[state]] = state;
        prev_bit[t * states + state0[state]] = 0;
      }
      metric = prev_section[state] + metric_c[out1[state]];
      if (metric > next_section[state1[state]]) {
        next_section[state1[state]] = metric;
        prev_state[t * states + state1[state]] = state;
        prev_bit[t * states + state1[state]] = 1;
      }
    }
    max_val = 0;
    for (state = 0; state < states; state++) {
      if (next_section[state] > max_val) {
        max_val = next_section[state];
      }
    }
    for (state = 0; state < states; state++) {
      prev_section[state] = next_section[state] - max_val;
      next_section[state] = -1e7;
    }
  }
  state = 0;
  for (t = LL + mm - 1; t >= LL; t--) {
    state = prev_state[t * states + state];
  }
  for (t = LL - 1; t >= 0; t--) {
    output_u_int[t] = prev_bit[t * states + state];
    state = prev_state[t * states + state];
  }
  free(prev_section);
  free(next_section);
  free(prev_bit);
  free(prev_state);
  free(rec_array);
  free(metric_c);
}


x86 assembly (clang, -O0):
<Viterbi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x44(%rbp)
mov    0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x48(%rbp)
movslq -0x44(%rbp),%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x58(%rbp)
movslq -0x44(%rbp),%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x44(%rbp),%eax
mov    0x20(%rbp),%ecx
add    -0x40(%rbp),%ecx
imul   %ecx,%eax
movslq %eax,%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x44(%rbp),%eax
mov    0x20(%rbp),%ecx
add    -0x40(%rbp),%ecx
imul   %ecx,%eax
movslq %eax,%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x70(%rbp)
movslq 0x18(%rbp),%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0x48(%rbp),%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    124c <Viterbi+0x11c>
mov    -0x58(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  0xddc(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  0xdc7(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1208 <Viterbi+0xd8>
mov    -0x58(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    0x20(%rbp),%ecx
add    -0x40(%rbp),%ecx
cmp    %ecx,%eax
jge    1525 <Viterbi+0x3f5>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    12b3 <Viterbi+0x183>
mov    -0x30(%rbp),%rax
mov    0x18(%rbp),%ecx
imul   -0x38(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x80(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1276 <Viterbi+0x146>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    12f6 <Viterbi+0x1c6>
mov    -0x80(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    0x18(%rbp),%edx
mov    $0x0,%al
call   1030 <Gamma@plt>
cvtsi2ss %eax,%xmm0
mov    -0x78(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12ba <Viterbi+0x18a>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    145a <Viterbi+0x32a>
mov    -0x58(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x4c(%rbp),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
ucomiss (%rax,%rcx,4),%xmm0
jbe    13a8 <Viterbi+0x278>
movss  -0x4c(%rbp),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x18(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x3c(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    -0x18(%rbp),%rsi
movslq -0x3c(%rbp),%rdi
add    (%rsi,%rdi,4),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x68(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    -0x18(%rbp),%rdx
movslq -0x3c(%rbp),%rsi
add    (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x4c(%rbp),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x28(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
ucomiss (%rax,%rcx,4),%xmm0
jbe    1447 <Viterbi+0x317>
movss  -0x4c(%rbp),%xmm0
mov    -0x60(%rbp),%rax
mov    -0x28(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x3c(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    -0x28(%rbp),%rsi
movslq -0x3c(%rbp),%rdi
add    (%rsi,%rdi,4),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x68(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x44(%rbp),%ecx
mov    -0x28(%rbp),%rdx
movslq -0x3c(%rbp),%rsi
add    (%rdx,%rsi,4),%ecx
movslq %ecx,%rcx
movl   $0x1,(%rax,%rcx,4)
jmp    144c <Viterbi+0x31c>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12fd <Viterbi+0x1cd>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    14ba <Viterbi+0x38a>
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
ucomiss -0x84(%rbp),%xmm0
jbe    14a7 <Viterbi+0x377>
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
jmp    14ac <Viterbi+0x37c>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    146c <Viterbi+0x33c>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1512 <Viterbi+0x3e2>
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x84(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  0xb01(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    14c1 <Viterbi+0x391>
jmp    1517 <Viterbi+0x3e7>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    125e <Viterbi+0x12e>
movl   $0x0,-0x3c(%rbp)
mov    0x20(%rbp),%eax
add    -0x40(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x20(%rbp),%eax
jl     1569 <Viterbi+0x439>
mov    -0x70(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
jmp    1538 <Viterbi+0x408>
mov    0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
jl     15c0 <Viterbi+0x490>
mov    -0x68(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x70(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x44(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
jmp    1572 <Viterbi+0x442>
mov    -0x58(%rbp),%rdi
call   1040 <free@plt>
mov    -0x60(%rbp),%rdi
call   1040 <free@plt>
mov    -0x68(%rbp),%rdi
call   1040 <free@plt>
mov    -0x70(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
mov    -0x78(%rbp),%rdi
call   1040 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Viterbi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9,0x98(%rsp)
mov    %r8,0xc0(%rsp)
mov    %rcx,0xb8(%rsp)
mov    %rdx,0xb0(%rsp)
mov    %rsi,0xa8(%rsp)
mov    %rdi,0x78(%rsp)
mov    0x110(%rsp),%r15d
mov    0x108(%rsp),%r12d
mov    0x100(%rsp),%ebx
lea    -0x1(%rbx),%ecx
mov    %ecx,0x14(%rsp)
mov    $0x1,%r14d
mov    $0x1,%eax
shl    %cl,%eax
mov    $0x1,%r13d
mov    %r12d,%ecx
shl    %cl,%r13d
mov    %eax,(%rsp)
movslq %eax,%rbp
mov    $0x4,%esi
mov    %rbp,%rdi
call   1050 <calloc@plt>
mov    %rax,0x28(%rsp)
mov    $0x4,%esi
mov    %rbp,%rdi
mov    %r12d,%ebp
call   1050 <calloc@plt>
mov    %rax,%r12
mov    %r15,0x70(%rsp)
mov    %rbx,0x68(%rsp)
lea    (%rbx,%r15,1),%eax
add    $0xffffffff,%eax
mov    %eax,0x8(%rsp)
mov    0x14(%rsp),%ebx
mov    %ebx,%ecx
shl    %cl,%eax
movslq %eax,%r15
mov    $0x4,%esi
mov    %r15,%rdi
call   1050 <calloc@plt>
mov    %rax,0x40(%rsp)
mov    $0x4,%esi
mov    %r15,%rdi
call   1050 <calloc@plt>
mov    %rax,0x38(%rsp)
movslq %ebp,%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,0x30(%rsp)
mov    %r13,0x18(%rsp)
movslq %r13d,%rdi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %ebp,%r11d
mov    0x28(%rsp),%rdi
mov    %ebx,%ecx
mov    %rax,%r15
cmp    $0x1f,%ebx
je     1388 <Viterbi+0x248>
mov    (%rsp),%eax
cmp    $0x2,%eax
cmovge %eax,%r14d
cmp    $0x8,%r14d
jae    1275 <Viterbi+0x135>
xor    %eax,%eax
jmp    1370 <Viterbi+0x230>
mov    %r14d,%eax
and    $0x7ffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%r8d
and    $0x3,%r8d
mov    %r11d,%r9d
cmp    $0x18,%rsi
jae    12a0 <Viterbi+0x160>
xor    %esi,%esi
jmp    1310 <Viterbi+0x1d0>
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
movaps 0xd53(%rip),%xmm0
nopl   (%rax)
movups %xmm0,(%rdi,%rsi,4)
movups %xmm0,0x10(%rdi,%rsi,4)
movups %xmm0,(%r12,%rsi,4)
movups %xmm0,0x10(%r12,%rsi,4)
movups %xmm0,0x20(%rdi,%rsi,4)
movups %xmm0,0x30(%rdi,%rsi,4)
movups %xmm0,0x20(%r12,%rsi,4)
movups %xmm0,0x30(%r12,%rsi,4)
movups %xmm0,0x40(%rdi,%rsi,4)
movups %xmm0,0x50(%rdi,%rsi,4)
movups %xmm0,0x40(%r12,%rsi,4)
movups %xmm0,0x50(%r12,%rsi,4)
movups %xmm0,0x60(%rdi,%rsi,4)
movups %xmm0,0x70(%rdi,%rsi,4)
movups %xmm0,0x60(%r12,%rsi,4)
movups %xmm0,0x70(%r12,%rsi,4)
add    $0x20,%rsi
add    $0xfffffffffffffffc,%rdx
jne    12b0 <Viterbi+0x170>
test   %r8,%r8
je     135b <Viterbi+0x21b>
lea    (%r12,%rsi,4),%rdx
add    $0x10,%rdx
lea    (%rdi,%rsi,4),%rsi
add    $0x10,%rsi
shl    $0x5,%r8
xor    %ebp,%ebp
movaps 0xcce(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups %xmm0,-0x10(%rsi,%rbp,1)
movups %xmm0,(%rsi,%rbp,1)
movups %xmm0,-0x10(%rdx,%rbp,1)
movups %xmm0,(%rdx,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r8
jne    1340 <Viterbi+0x200>
cmp    %r14,%rax
mov    %r9d,%r11d
je     1388 <Viterbi+0x248>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movl   $0xcb189680,(%rdi,%rax,4)
movl   $0xcb189680,(%r12,%rax,4)
cb
add    $0x1,%rax
cmp    %rax,%r14
jne    1370 <Viterbi+0x230>
movl   $0x0,(%rdi)
mov    0x8(%rsp),%ebp
test   %ebp,%ebp
mov    0x40(%rsp),%r14
mov    0x38(%rsp),%r13
mov    0x18(%rsp),%rsi
jle    1771 <Viterbi+0x631>
mov    %r11d,%eax
shl    $0x2,%rax
mov    %rax,0x90(%rsp)
cmp    $0x2,%esi
mov    $0x1,%eax
cmovl  %eax,%esi
mov    (%rsp),%edx
cmp    $0x2,%edx
cmovge %edx,%eax
mov    %ebp,%edx
mov    %rdx,0xa0(%rsp)
lea    -0x1(%rax),%rdx
mov    %rdx,0x88(%rsp)
mov    %eax,%edx
and    $0x7ffffff8,%edx
mov    %rdx,0x60(%rsp)
add    $0xfffffffffffffff8,%rdx
mov    %rdx,0x58(%rsp)
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %eax,%ebp
and    $0x3,%ebp
mov    %rbp,0x20(%rsp)
mov    %rax,(%rsp)
and    $0x7ffffffc,%eax
mov    %rax,0x80(%rsp)
movabs $0x3ffffffffffffffc,%rbp
ff ff 3f
or     $0x2,%rbp
mov    %rdx,%rax
mov    %rdx,0x50(%rsp)
and    %rdx,%rbp
mov    %rbp,0x48(%rsp)
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    %rsi,0x18(%rsp)
jmp    146f <Viterbi+0x32f>
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rdx
add    $0x1,%rdx
mov    %rdx,%rax
mov    %rdx,0x8(%rsp)
cmp    0xa0(%rsp),%rdx
je     1771 <Viterbi+0x631>
test   %r11d,%r11d
mov    0x30(%rsp),%rbx
mov    %r11d,%r14d
jle    14a6 <Viterbi+0x366>
mov    0x8(%rsp),%rax
imul   %r11d,%eax
cltq
mov    0x98(%rsp),%rcx
lea    (%rcx,%rax,4),%rsi
mov    %rbx,%rdi
mov    0x90(%rsp),%rdx
call   1060 <memcpy@plt>
mov    %r14d,%r11d
cmp    $0x1f,%r11d
mov    0x18(%rsp),%rbp
je     14e9 <Viterbi+0x3a9>
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r11d,%edx
xor    %eax,%eax
call   1030 <Gamma@plt>
mov    %r14d,%r11d
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,(%r15,%r13,4)
add    $0x1,%r13
cmp    %r13,%rbp
jne    14c0 <Viterbi+0x380>
mov    0x14(%rsp),%ecx
cmp    $0x1f,%ecx
mov    0x40(%rsp),%r14
mov    0x38(%rsp),%r13
mov    0xc0(%rsp),%r8
mov    0x28(%rsp),%rdi
mov    0xb8(%rsp),%r9
mov    0xb0(%rsp),%r10
mov    0xa8(%rsp),%rbx
movaps 0xada(%rip),%xmm4
je     1450 <Viterbi+0x310>
mov    0x8(%rsp),%rax
shl    %cl,%eax
xor    %ebp,%ebp
jmp    154a <Viterbi+0x40a>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,(%rsp)
je     15c0 <Viterbi+0x480>
movss  (%rdi,%rbp,4),%xmm0
movslq (%rbx,%rbp,4),%rdx
movss  (%r15,%rdx,4),%xmm1
addss  %xmm0,%xmm1
movslq (%r10,%rbp,4),%rdx
ucomiss (%r12,%rdx,4),%xmm1
jbe    1581 <Viterbi+0x441>
movss  %xmm1,(%r12,%rdx,4)
movslq %eax,%rsi
add    %rdx,%rsi
mov    %ebp,0x0(%r13,%rsi,4)
movl   $0x0,(%r14,%rsi,4)
movslq (%r9,%rbp,4),%rdx
addss  (%r15,%rdx,4),%xmm0
movslq (%r8,%rbp,4),%rdx
ucomiss (%r12,%rdx,4),%xmm0
jbe    1540 <Viterbi+0x400>
movss  %xmm0,(%r12,%rdx,4)
movslq %eax,%rsi
add    %rdx,%rsi
mov    %ebp,0x0(%r13,%rsi,4)
movl   $0x1,(%r14,%rsi,4)
jmp    1540 <Viterbi+0x400>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x1f,%ecx
je     1450 <Viterbi+0x310>
cmpq   $0x3,0x88(%rsp)
jae    15e0 <Viterbi+0x4a0>
xorps  %xmm1,%xmm1
xor    %eax,%eax
mov    0x20(%rsp),%rbp
jmp    1634 <Viterbi+0x4f4>
xorps  %xmm1,%xmm1
xor    %eax,%eax
mov    0x20(%rsp),%rbp
mov    0x80(%rsp),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%r12,%rax,4),%xmm0
maxss  %xmm1,%xmm0
movss  0x4(%r12,%rax,4),%xmm1
maxss  %xmm0,%xmm1
movss  0x8(%r12,%rax,4),%xmm0
maxss  %xmm1,%xmm0
movss  0xc(%r12,%rax,4),%xmm1
maxss  %xmm0,%xmm1
add    $0x4,%rax
cmp    %rax,%rdx
jne    1600 <Viterbi+0x4c0>
movaps %xmm1,%xmm0
test   %rbp,%rbp
je     1665 <Viterbi+0x525>
lea    (%r12,%rax,4),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%rax,%rdx,4),%xmm0
maxss  %xmm1,%xmm0
add    $0x1,%rdx
movaps %xmm0,%xmm1
cmp    %rdx,%rbp
jne    1650 <Viterbi+0x510>
cmp    $0x1f,%ecx
je     1450 <Viterbi+0x310>
cmpl   $0x8,(%rsp)
jae    167b <Viterbi+0x53b>
xor    %eax,%eax
jmp    1740 <Viterbi+0x600>
movaps %xmm0,%xmm1
shufps $0x0,%xmm0,%xmm1
cmpq   $0x0,0x58(%rsp)
je     1766 <Viterbi+0x626>
mov    0x48(%rsp),%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movups (%r12,%rax,4),%xmm2
movups 0x10(%r12,%rax,4),%xmm3
subps  %xmm1,%xmm2
subps  %xmm1,%xmm3
movups %xmm2,(%rdi,%rax,4)
movups %xmm3,0x10(%rdi,%rax,4)
movups %xmm4,(%r12,%rax,4)
movups %xmm4,0x10(%r12,%rax,4)
movups 0x20(%r12,%rax,4),%xmm2
movups 0x30(%r12,%rax,4),%xmm3
subps  %xmm1,%xmm2
subps  %xmm1,%xmm3
movups %xmm2,0x20(%rdi,%rax,4)
movups %xmm3,0x30(%rdi,%rax,4)
movups %xmm4,0x20(%r12,%rax,4)
movups %xmm4,0x30(%r12,%rax,4)
add    $0x10,%rax
add    $0xfffffffffffffffe,%rdx
jne    16a0 <Viterbi+0x560>
testb  $0x1,0x50(%rsp)
je     1723 <Viterbi+0x5e3>
movups (%r12,%rax,4),%xmm2
movups 0x10(%r12,%rax,4),%xmm3
subps  %xmm1,%xmm2
subps  %xmm1,%xmm3
movups %xmm2,(%rdi,%rax,4)
movups %xmm3,0x10(%rdi,%rax,4)
movups %xmm4,(%r12,%rax,4)
movups %xmm4,0x10(%r12,%rax,4)
mov    0x60(%rsp),%rdx
mov    %rdx,%rax
cmp    (%rsp),%rdx
je     1450 <Viterbi+0x310>
cs nopw 0x0(%rax,%rax,1)
nop
movss  (%r12,%rax,4),%xmm1
subss  %xmm0,%xmm1
movss  %xmm1,(%rdi,%rax,4)
movl   $0xcb189680,(%r12,%rax,4)
cb
add    $0x1,%rax
cmp    %rax,(%rsp)
jne    1740 <Viterbi+0x600>
jmp    1450 <Viterbi+0x310>
xor    %eax,%eax
testb  $0x1,0x50(%rsp)
jne    16fe <Viterbi+0x5be>
jmp    1723 <Viterbi+0x5e3>
xor    %eax,%eax
mov    0x68(%rsp),%rdx
cmp    $0x2,%edx
mov    0x70(%rsp),%r8
jl     17a8 <Viterbi+0x668>
add    %r8d,%edx
add    $0xfffffffe,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    %edx,%esi
shl    %cl,%esi
add    %eax,%esi
movslq %esi,%rax
mov    0x0(%r13,%rax,4),%eax
lea    -0x1(%rdx),%esi
cmp    %r8d,%edx
mov    %esi,%edx
jg     1790 <Viterbi+0x650>
test   %r8d,%r8d
mov    0x78(%rsp),%r9
jle    1821 <Viterbi+0x6e1>
mov    %r8d,%edx
test   $0x1,%dl
je     17d6 <Viterbi+0x696>
add    $0xffffffffffffffff,%rdx
mov    %edx,%esi
mov    %edx,%ebp
shl    %cl,%ebp
add    %eax,%ebp
movslq %ebp,%rax
mov    (%r14,%rax,4),%ebp
mov    %ebp,(%r9,%rsi,4)
mov    0x0(%r13,%rax,4),%eax
cmp    $0x1,%r8d
je     1821 <Viterbi+0x6e1>
nopl   0x0(%rax)
lea    -0x1(%rdx),%rsi
mov    %esi,%r8d
mov    %esi,%ebp
shl    %cl,%ebp
add    %eax,%ebp
movslq %ebp,%rax
mov    (%r14,%rax,4),%ebp
mov    %ebp,(%r9,%r8,4)
add    $0xfffffffffffffffe,%rdx
mov    %edx,%ebp
shl    %cl,%ebp
movslq 0x0(%r13,%rax,4),%rax
mov    %edx,%r8d
movslq %ebp,%rbp
add    %rax,%rbp
mov    (%r14,%rbp,4),%eax
mov    %eax,(%r9,%r8,4)
mov    0x0(%r13,%rbp,4),%eax
cmp    $0x1,%rsi
ja     17e0 <Viterbi+0x6a0>
call   1040 <free@plt>
mov    %r12,%rdi
call   1040 <free@plt>
mov    %r14,%rdi
call   1040 <free@plt>
mov    %r13,%rdi
call   1040 <free@plt>
mov    0x30(%rsp),%rdi
call   1040 <free@plt>
mov    %r15,%rdi
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <free@plt>

LLVM IR (-O0):
define void @Viterbi(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, float* %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca float*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca float
%26 = alloca float*
%27 = alloca float*
%28 = alloca i32*
%29 = alloca i32*
%30 = alloca float*
%31 = alloca float*
%32 = alloca float
store i32* %0, i32** %10
store i32* %1, i32** %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store float* %5, float** %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%33 = load i32, i32* %16
%34 = sub nsw i32 %33, 1
store i32 %34, i32* %22
%35 = load i32, i32* %22
%36 = shl i32 1, %35
store i32 %36, i32* %23
%37 = load i32, i32* %17
%38 = shl i32 1, %37
store i32 %38, i32* %24
%39 = load i32, i32* %23
%40 = sext i32 %39 to i64
%41 = call i8* @calloc(i64 %40, i64 4)
%42 = bitcast i8* %41 to float*
store float* %42, float** %26
%43 = load i32, i32* %23
%44 = sext i32 %43 to i64
%45 = call i8* @calloc(i64 %44, i64 4)
%46 = bitcast i8* %45 to float*
store float* %46, float** %27
%47 = load i32, i32* %23
%48 = load i32, i32* %18
%49 = load i32, i32* %22
%50 = add nsw i32 %48, %49
%51 = mul nsw i32 %47, %50
%52 = sext i32 %51 to i64
%53 = call i8* @calloc(i64 %52, i64 4)
%54 = bitcast i8* %53 to i32*
store i32* %54, i32** %28
%55 = load i32, i32* %23
%56 = load i32, i32* %18
%57 = load i32, i32* %22
%58 = add nsw i32 %56, %57
%59 = mul nsw i32 %55, %58
%60 = sext i32 %59 to i64
%61 = call i8* @calloc(i64 %60, i64 4)
%62 = bitcast i8* %61 to i32*
store i32* %62, i32** %29
%63 = load i32, i32* %17
%64 = sext i32 %63 to i64
%65 = call i8* @calloc(i64 %64, i64 4)
%66 = bitcast i8* %65 to float*
store float* %66, float** %31
%67 = load i32, i32* %24
%68 = sext i32 %67 to i64
%69 = call i8* @calloc(i64 %68, i64 4)
%70 = bitcast i8* %69 to float*
store float* %70, float** %30
store i32 0, i32* %21
br label %71
71: ; preds = %84, %9
%72 = load i32, i32* %21
%73 = load i32, i32* %23
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %87
75: ; preds = %71
%76 = load float*, float** %26
%77 = load i32, i32* %21
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds float, float* %76, i64 %78
store float -1.000000e+07, float* %79
%80 = load float*, float** %27
%81 = load i32, i32* %21
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds float, float* %80, i64 %82
store float -1.000000e+07, float* %83
br label %84
84: ; preds = %75
%85 = load i32, i32* %21
%86 = add nsw i32 %85, 1
store i32 %86, i32* %21
br label %71
87: ; preds = %71
%88 = load float*, float** %26
%89 = getelementptr inbounds float, float* %88, i64 0
store float 0.000000e+00, float* %89
store i32 0, i32* %20
br label %90
90: ; preds = %317, %87
%91 = load i32, i32* %20
%92 = load i32, i32* %18
%93 = load i32, i32* %22
%94 = add nsw i32 %92, %93
%95 = icmp slt i32 %91, %94
br i1 %95, label %96, label %320
96: ; preds = %90
store i32 0, i32* %19
br label %97
97: ; preds = %115, %96
%98 = load i32, i32* %19
%99 = load i32, i32* %17
%100 = icmp slt i32 %98, %99
br i1 %100, label %101, label %118
101: ; preds = %97
%102 = load float*, float** %15
%103 = load i32, i32* %17
%104 = load i32, i32* %20
%105 = mul nsw i32 %103, %104
%106 = load i32, i32* %19
%107 = add nsw i32 %105, %106
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds float, float* %102, i64 %108
%110 = load float, float* %109
%111 = load float*, float** %31
%112 = load i32, i32* %19
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds float, float* %111, i64 %113
store float %110, float* %114
br label %115
115: ; preds = %101
%116 = load i32, i32* %19
%117 = add nsw i32 %116, 1
store i32 %117, i32* %19
br label %97
118: ; preds = %97
store i32 0, i32* %19
br label %119
119: ; preds = %133, %118
%120 = load i32, i32* %19
%121 = load i32, i32* %24
%122 = icmp slt i32 %120, %121
br i1 %122, label %123, label %136
123: ; preds = %119
%124 = load float*, float** %31
%125 = load i32, i32* %19
%126 = load i32, i32* %17
%127 = call i32 (float*, i32, i32, ...) bitcast (i32 (...)* @Gamma to i32 (float*, i32, i32, ...)*)(float* %124, i32 %125, i32 %126)
%128 = sitofp i32 %127 to float
%129 = load float*, float** %30
%130 = load i32, i32* %19
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds float, float* %129, i64 %131
store float %128, float* %132
br label %133
133: ; preds = %123
%134 = load i32, i32* %19
%135 = add nsw i32 %134, 1
store i32 %135, i32* %19
br label %119
136: ; preds = %119
store i32 0, i32* %21
br label %137
137: ; preds = %266, %136
%138 = load i32, i32* %21
%139 = load i32, i32* %23
%140 = icmp slt i32 %138, %139
br i1 %140, label %141, label %269
141: ; preds = %137
%142 = load float*, float** %26
%143 = load i32, i32* %21
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds float, float* %142, i64 %144
%146 = load float, float* %145
%147 = load float*, float** %30
%148 = load i32*, i32** %11
%149 = load i32, i32* %21
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %148, i64 %150
%152 = load i32, i32* %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds float, float* %147, i64 %153
%155 = load float, float* %154
%156 = fadd float %146, %155
store float %156, float* %25
%157 = load float, float* %25
%158 = load float*, float** %27
%159 = load i32*, i32** %12
%160 = load i32, i32* %21
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds i32, i32* %159, i64 %161
%163 = load i32, i32* %162
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds float, float* %158, i64 %164
%166 = load float, float* %165
%167 = fcmp ogt float %157, %166
br i1 %167, label %168, label %203
168: ; preds = %141
%169 = load float, float* %25
%170 = load float*, float** %27
%171 = load i32*, i32** %12
%172 = load i32, i32* %21
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds i32, i32* %171, i64 %173
%175 = load i32, i32* %174
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds float, float* %170, i64 %176
store float %169, float* %177
%178 = load i32, i32* %21
%179 = load i32*, i32** %29
%180 = load i32, i32* %20
%181 = load i32, i32* %23
%182 = mul nsw i32 %180, %181
%183 = load i32*, i32** %12
%184 = load i32, i32* %21
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds i32, i32* %183, i64 %185
%187 = load i32, i32* %186
%188 = add nsw i32 %182, %187
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i32, i32* %179, i64 %189
store i32 %178, i32* %190
%191 = load i32*, i32** %28
%192 = load i32, i32* %20
%193 = load i32, i32* %23
%194 = mul nsw i32 %192, %193
%195 = load i32*, i32** %12
%196 = load i32, i32* %21
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds i32, i32* %195, i64 %197
%199 = load i32, i32* %198
%200 = add nsw i32 %194, %199
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i32, i32* %191, i64 %201
store i32 0, i32* %202
br label %203
203: ; preds = %168, %141
%204 = load float*, float** %26
%205 = load i32, i32* %21
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds float, float* %204, i64 %206
%208 = load float, float* %207
%209 = load float*, float** %30
%210 = load i32*, i32** %13
%211 = load i32, i32* %21
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds i32, i32* %210, i64 %212
%214 = load i32, i32* %213
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds float, float* %209, i64 %215
%217 = load float, float* %216
%218 = fadd float %208, %217
store float %218, float* %25
%219 = load float, float* %25
%220 = load float*, float** %27
%221 = load i32*, i32** %14
%222 = load i32, i32* %21
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds i32, i32* %221, i64 %223
%225 = load i32, i32* %224
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds float, float* %220, i64 %226
%228 = load float, float* %227
%229 = fcmp ogt float %219, %228
br i1 %229, label %230, label %265
230: ; preds = %203
%231 = load float, float* %25
%232 = load float*, float** %27
%233 = load i32*, i32** %14
%234 = load i32, i32* %21
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds i32, i32* %233, i64 %235
%237 = load i32, i32* %236
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds float, float* %232, i64 %238
store float %231, float* %239
%240 = load i32, i32* %21
%241 = load i32*, i32** %29
%242 = load i32, i32* %20
%243 = load i32, i32* %23
%244 = mul nsw i32 %242, %243
%245 = load i32*, i32** %14
%246 = load i32, i32* %21
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds i32, i32* %245, i64 %247
%249 = load i32, i32* %248
%250 = add nsw i32 %244, %249
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds i32, i32* %241, i64 %251
store i32 %240, i32* %252
%253 = load i32*, i32** %28
%254 = load i32, i32* %20
%255 = load i32, i32* %23
%256 = mul nsw i32 %254, %255
%257 = load i32*, i32** %14
%258 = load i32, i32* %21
%259 = sext i32 %258 to i64
%260 = getelementptr inbounds i32, i32* %257, i64 %259
%261 = load i32, i32* %260
%262 = add nsw i32 %256, %261
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds i32, i32* %253, i64 %263
store i32 1, i32* %264
br label %265
265: ; preds = %230, %203
br label %266
266: ; preds = %265
%267 = load i32, i32* %21
%268 = add nsw i32 %267, 1
store i32 %268, i32* %21
br label %137
269: ; preds = %137
store float 0.000000e+00, float* %32
store i32 0, i32* %21
br label %270
270: ; preds = %289, %269
%271 = load i32, i32* %21
%272 = load i32, i32* %23
%273 = icmp slt i32 %271, %272
br i1 %273, label %274, label %292
274: ; preds = %270
%275 = load float*, float** %27
%276 = load i32, i32* %21
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds float, float* %275, i64 %277
%279 = load float, float* %278
%280 = load float, float* %32
%281 = fcmp ogt float %279, %280
br i1 %281, label %282, label %288
282: ; preds = %274
%283 = load float*, float** %27
%284 = load i32, i32* %21
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds float, float* %283, i64 %285
%287 = load float, float* %286
store float %287, float* %32
br label %288
288: ; preds = %282, %274
br label %289
289: ; preds = %288
%290 = load i32, i32* %21
%291 = add nsw i32 %290, 1
store i32 %291, i32* %21
br label %270
292: ; preds = %270
store i32 0, i32* %21
br label %293
293: ; preds = %313, %292
%294 = load i32, i32* %21
%295 = load i32, i32* %23
%296 = icmp slt i32 %294, %295
br i1 %296, label %297, label %316
297: ; preds = %293
%298 = load float*, float** %27
%299 = load i32, i32* %21
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds float, float* %298, i64 %300
%302 = load float, float* %301
%303 = load float, float* %32
%304 = fsub float %302, %303
%305 = load float*, float** %26
%306 = load i32, i32* %21
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds float, float* %305, i64 %307
store float %304, float* %308
%309 = load float*, float** %27
%310 = load i32, i32* %21
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds float, float* %309, i64 %311
store float -1.000000e+07, float* %312
br label %313
313: ; preds = %297
%314 = load i32, i32* %21
%315 = add nsw i32 %314, 1
store i32 %315, i32* %21
br label %293
316: ; preds = %293
br label %317
317: ; preds = %316
%318 = load i32, i32* %20
%319 = add nsw i32 %318, 1
store i32 %319, i32* %20
br label %90
320: ; preds = %90
store i32 0, i32* %21
%321 = load i32, i32* %18
%322 = load i32, i32* %22
%323 = add nsw i32 %321, %322
%324 = sub nsw i32 %323, 1
store i32 %324, i32* %20
br label %325
325: ; preds = %339, %320
%326 = load i32, i32* %20
%327 = load i32, i32* %18
%328 = icmp sge i32 %326, %327
br i1 %328, label %329, label %342
329: ; preds = %325
%330 = load i32*, i32** %29
%331 = load i32, i32* %20
%332 = load i32, i32* %23
%333 = mul nsw i32 %331, %332
%334 = load i32, i32* %21
%335 = add nsw i32 %333, %334
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds i32, i32* %330, i64 %336
%338 = load i32, i32* %337
store i32 %338, i32* %21
br label %339
339: ; preds = %329
%340 = load i32, i32* %20
%341 = add nsw i32 %340, -1
store i32 %341, i32* %20
br label %325
342: ; preds = %325
%343 = load i32, i32* %18
%344 = sub nsw i32 %343, 1
store i32 %344, i32* %20
br label %345
345: ; preds = %371, %342
%346 = load i32, i32* %20
%347 = icmp sge i32 %346, 0
br i1 %347, label %348, label %374
348: ; preds = %345
%349 = load i32*, i32** %28
%350 = load i32, i32* %20
%351 = load i32, i32* %23
%352 = mul nsw i32 %350, %351
%353 = load i32, i32* %21
%354 = add nsw i32 %352, %353
%355 = sext i32 %354 to i64
%356 = getelementptr inbounds i32, i32* %349, i64 %355
%357 = load i32, i32* %356
%358 = load i32*, i32** %10
%359 = load i32, i32* %20
%360 = sext i32 %359 to i64
%361 = getelementptr inbounds i32, i32* %358, i64 %360
store i32 %357, i32* %361
%362 = load i32*, i32** %29
%363 = load i32, i32* %20
%364 = load i32, i32* %23
%365 = mul nsw i32 %363, %364
%366 = load i32, i32* %21
%367 = add nsw i32 %365, %366
%368 = sext i32 %367 to i64
%369 = getelementptr inbounds i32, i32* %362, i64 %368
%370 = load i32, i32* %369
store i32 %370, i32* %21
br label %371
371: ; preds = %348
%372 = load i32, i32* %20
%373 = add nsw i32 %372, -1
store i32 %373, i32* %20
br label %345
374: ; preds = %345
%375 = load float*, float** %26
%376 = bitcast float* %375 to i8*
%377 = load float*, float** %27
%378 = bitcast float* %377 to i8*
%379 = load i32*, i32** %28
%380 = bitcast i32* %379 to i8*
%381 = load i32*, i32** %29
%382 = bitcast i32* %381 to i8*
%383 = load float*, float** %31
%384 = bitcast float* %383 to i8*
%385 = load float*, float** %30
%386 = bitcast float* %385 to i8*
ret void
}

LLVM IR (-O2):
define void @Viterbi(i32* nocapture writeonly %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, float* nocapture %5, i32 %6, i32 %7, i32 %8) {
%10 = add nsw i32 %6, -1
%11 = shl nuw i32 1, %10
%12 = shl nuw i32 1, %7
%13 = sext i32 %11 to i64
%14 = tail call i8* @calloc(i64 %13, i64 4)
%15 = bitcast i8* %14 to float*
%16 = tail call i8* @calloc(i64 %13, i64 4)
%17 = bitcast i8* %16 to float*
%18 = add nsw i32 %10, %8
%19 = shl i32 %18, %10
%20 = sext i32 %19 to i64
%21 = tail call i8* @calloc(i64 %20, i64 4)
%22 = bitcast i8* %21 to i32*
%23 = tail call i8* @calloc(i64 %20, i64 4)
%24 = bitcast i8* %23 to i32*
%25 = sext i32 %7 to i64
%26 = tail call i8* @calloc(i64 %25, i64 4)
%27 = bitcast i8* %26 to float*
%28 = sext i32 %12 to i64
%29 = tail call i8* @calloc(i64 %28, i64 4)
%30 = bitcast i8* %29 to float*
%31 = icmp eq i32 %10, 31
br i1 %31, label %113, label %32
32: ; preds = %9
%33 = call i32 @llvm.smax.i32(i32 %11, i32 1)
%34 = zext i32 %33 to i64
%35 = icmp ult i32 %33, 8
br i1 %35, label %105, label %36
36: ; preds = %32
%37 = and i64 %34, 2147483640
%38 = add nsw i64 %37, -8
%39 = lshr exact i64 %38, 3
%40 = add nuw nsw i64 %39, 1
%41 = and i64 %40, 3
%42 = icmp ult i64 %38, 24
br i1 %42, label %86, label %43
43: ; preds = %36
%44 = and i64 %40, 4611686018427387900
br label %45
45: ; preds = %45, %43
%46 = phi i64 [ 0, %43 ], [ %83, %45 ]
%47 = phi i64 [ 0, %43 ], [ %84, %45 ]
%48 = getelementptr inbounds float, float* %15, i64 %46
%49 = bitcast float* %48 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %49
%50 = getelementptr inbounds float, float* %48, i64 4
%51 = bitcast float* %50 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %51
%52 = getelementptr inbounds float, float* %17, i64 %46
%53 = bitcast float* %52 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %53
%54 = getelementptr inbounds float, float* %52, i64 4
%55 = bitcast float* %54 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %55
%56 = or i64 %46, 8
%57 = getelementptr inbounds float, float* %15, i64 %56
%58 = bitcast float* %57 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %58
%59 = getelementptr inbounds float, float* %57, i64 4
%60 = bitcast float* %59 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %60
%61 = getelementptr inbounds float, float* %17, i64 %56
%62 = bitcast float* %61 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %62
%63 = getelementptr inbounds float, float* %61, i64 4
%64 = bitcast float* %63 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %64
%65 = or i64 %46, 16
%66 = getelementptr inbounds float, float* %15, i64 %65
%67 = bitcast float* %66 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %67
%68 = getelementptr inbounds float, float* %66, i64 4
%69 = bitcast float* %68 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %69
%70 = getelementptr inbounds float, float* %17, i64 %65
%71 = bitcast float* %70 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %71
%72 = getelementptr inbounds float, float* %70, i64 4
%73 = bitcast float* %72 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %73
%74 = or i64 %46, 24
%75 = getelementptr inbounds float, float* %15, i64 %74
%76 = bitcast float* %75 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %76
%77 = getelementptr inbounds float, float* %75, i64 4
%78 = bitcast float* %77 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %78
%79 = getelementptr inbounds float, float* %17, i64 %74
%80 = bitcast float* %79 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %80
%81 = getelementptr inbounds float, float* %79, i64 4
%82 = bitcast float* %81 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %82
%83 = add nuw i64 %46, 32
%84 = add i64 %47, 4
%85 = icmp eq i64 %84, %44
br i1 %85, label %86, label %45
86: ; preds = %45, %36
%87 = phi i64 [ 0, %36 ], [ %83, %45 ]
%88 = icmp eq i64 %41, 0
br i1 %88, label %103, label %89
89: ; preds = %86, %89
%90 = phi i64 [ %100, %89 ], [ %87, %86 ]
%91 = phi i64 [ %101, %89 ], [ 0, %86 ]
%92 = getelementptr inbounds float, float* %15, i64 %90
%93 = bitcast float* %92 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %93
%94 = getelementptr inbounds float, float* %92, i64 4
%95 = bitcast float* %94 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %95
%96 = getelementptr inbounds float, float* %17, i64 %90
%97 = bitcast float* %96 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %97
%98 = getelementptr inbounds float, float* %96, i64 4
%99 = bitcast float* %98 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %99
%100 = add nuw i64 %90, 8
%101 = add i64 %91, 1
%102 = icmp eq i64 %101, %41
br i1 %102, label %103, label %89
103: ; preds = %89, %86
%104 = icmp eq i64 %37, %34
br i1 %104, label %113, label %105
105: ; preds = %32, %103
%106 = phi i64 [ 0, %32 ], [ %37, %103 ]
br label %107
107: ; preds = %105, %107
%108 = phi i64 [ %111, %107 ], [ %106, %105 ]
%109 = getelementptr inbounds float, float* %15, i64 %108
store float -1.000000e+07, float* %109
%110 = getelementptr inbounds float, float* %17, i64 %108
store float -1.000000e+07, float* %110
%111 = add nuw nsw i64 %108, 1
%112 = icmp eq i64 %111, %34
br i1 %112, label %113, label %107
113: ; preds = %107, %103, %9
store float 0.000000e+00, float* %15
%114 = icmp sgt i32 %18, 0
br i1 %114, label %115, label %150
115: ; preds = %113
%116 = icmp sgt i32 %7, 0
%117 = icmp eq i32 %7, 31
%118 = zext i32 %7 to i64
%119 = shl nuw nsw i64 %118, 2
%120 = call i32 @llvm.smax.i32(i32 %12, i32 1)
%121 = call i32 @llvm.smax.i32(i32 %11, i32 1)
%122 = zext i32 %18 to i64
%123 = zext i32 %120 to i64
%124 = zext i32 %121 to i64
%125 = zext i32 %121 to i64
%126 = add nsw i64 %124, -1
%127 = and i64 %124, 2147483640
%128 = add nsw i64 %127, -8
%129 = lshr exact i64 %128, 3
%130 = add nuw nsw i64 %129, 1
%131 = and i64 %124, 3
%132 = icmp ult i64 %126, 3
%133 = and i64 %124, 2147483644
%134 = icmp eq i64 %131, 0
%135 = icmp ult i32 %121, 8
%136 = and i64 %124, 2147483640
%137 = and i64 %130, 1
%138 = icmp eq i64 %128, 0
%139 = and i64 %130, 4611686018427387902
%140 = icmp eq i64 %137, 0
%141 = icmp eq i64 %136, %124
br label %142
142: ; preds = %115, %322
%143 = phi i64 [ 0, %115 ], [ %323, %322 ]
%144 = trunc i64 %143 to i32
br i1 %116, label %145, label %152
145: ; preds = %142
%146 = mul i32 %144, %7
%147 = sext i32 %146 to i64
%148 = getelementptr float, float* %5, i64 %147
%149 = bitcast float* %148 to i8*
br label %152
150: ; preds = %322, %113
%151 = icmp sgt i32 %6, 1
br i1 %151, label %348, label %325
152: ; preds = %145, %142
br i1 %117, label %153, label %156
153: ; preds = %156, %152
br i1 %31, label %322, label %154
154: ; preds = %153
%155 = shl i32 %144, %10
br label %166
156: ; preds = %152, %156
%157 = phi i64 [ %162, %156 ], [ 0, %152 ]
%158 = trunc i64 %157 to i32
%159 = tail call i32 (float*, i32, i32, ...) bitcast (i32 (...)* @Gamma to i32 (float*, i32, i32, ...)*)(float* %27, i32 %158, i32 %7)
%160 = sitofp i32 %159 to float
%161 = getelementptr inbounds float, float* %30, i64 %157
store float %160, float* %161
%162 = add nuw nsw i64 %157, 1
%163 = icmp eq i64 %162, %123
br i1 %163, label %153, label %156
164: ; preds = %207
br i1 %31, label %322, label %165
165: ; preds = %164
br i1 %132, label %210, label %288
166: ; preds = %154, %207
%167 = phi i64 [ 0, %154 ], [ %208, %207 ]
%168 = getelementptr inbounds float, float* %15, i64 %167
%169 = load float, float* %168
%170 = getelementptr inbounds i32, i32* %1, i64 %167
%171 = load i32, i32* %170
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds float, float* %30, i64 %172
%174 = load float, float* %173
%175 = fadd float %169, %174
%176 = getelementptr inbounds i32, i32* %2, i64 %167
%177 = load i32, i32* %176
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds float, float* %17, i64 %178
%180 = load float, float* %179
%181 = fcmp ogt float %175, %180
br i1 %181, label %182, label %188
182: ; preds = %166
store float %175, float* %179
%183 = add nsw i32 %177, %155
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i32, i32* %24, i64 %184
%186 = trunc i64 %167 to i32
store i32 %186, i32* %185
%187 = getelementptr inbounds i32, i32* %22, i64 %184
store i32 0, i32* %187
br label %188
188: ; preds = %182, %166
%189 = getelementptr inbounds i32, i32* %3, i64 %167
%190 = load i32, i32* %189
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds float, float* %30, i64 %191
%193 = load float, float* %192
%194 = fadd float %169, %193
%195 = getelementptr inbounds i32, i32* %4, i64 %167
%196 = load i32, i32* %195
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds float, float* %17, i64 %197
%199 = load float, float* %198
%200 = fcmp ogt float %194, %199
br i1 %200, label %201, label %207
201: ; preds = %188
store float %194, float* %198
%202 = add nsw i32 %196, %155
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds i32, i32* %24, i64 %203
%205 = trunc i64 %167 to i32
store i32 %205, i32* %204
%206 = getelementptr inbounds i32, i32* %22, i64 %203
store i32 1, i32* %206
br label %207
207: ; preds = %188, %201
%208 = add nuw nsw i64 %167, 1
%209 = icmp eq i64 %208, %124
br i1 %209, label %164, label %166
210: ; preds = %288, %165
%211 = phi float [ undef, %165 ], [ %310, %288 ]
%212 = phi i64 [ 0, %165 ], [ %311, %288 ]
%213 = phi float [ 0.000000e+00, %165 ], [ %310, %288 ]
br i1 %134, label %225, label %214
214: ; preds = %210, %214
%215 = phi i64 [ %222, %214 ], [ %212, %210 ]
%216 = phi float [ %221, %214 ], [ %213, %210 ]
%217 = phi i64 [ %223, %214 ], [ 0, %210 ]
%218 = getelementptr inbounds float, float* %17, i64 %215
%219 = load float, float* %218
%220 = fcmp ogt float %219, %216
%221 = select i1 %220, float %219, float %216
%222 = add nuw nsw i64 %215, 1
%223 = add i64 %217, 1
%224 = icmp eq i64 %223, %131
br i1 %224, label %225, label %214
225: ; preds = %214, %210
%226 = phi float [ %211, %210 ], [ %221, %214 ]
br i1 %31, label %322, label %227
227: ; preds = %225
br i1 %135, label %286, label %228
228: ; preds = %227
%229 = insertelement <4 x float> poison, float %226, i64 0
%230 = shufflevector <4 x float> %229, <4 x float> poison, <4 x i32> zeroinitializer
%231 = insertelement <4 x float> poison, float %226, i64 0
%232 = shufflevector <4 x float> %231, <4 x float> poison, <4 x i32> zeroinitializer
br i1 %138, label %268, label %233
233: ; preds = %228, %233
%234 = phi i64 [ %265, %233 ], [ 0, %228 ]
%235 = phi i64 [ %266, %233 ], [ 0, %228 ]
%236 = getelementptr inbounds float, float* %17, i64 %234
%237 = bitcast float* %236 to <4 x float>*
%238 = load <4 x float>, <4 x float>* %237
%239 = getelementptr inbounds float, float* %236, i64 4
%240 = bitcast float* %239 to <4 x float>*
%241 = load <4 x float>, <4 x float>* %240
%242 = fsub <4 x float> %238, %230
%243 = fsub <4 x float> %241, %232
%244 = getelementptr inbounds float, float* %15, i64 %234
%245 = bitcast float* %244 to <4 x float>*
store <4 x float> %242, <4 x float>* %245
%246 = getelementptr inbounds float, float* %244, i64 4
%247 = bitcast float* %246 to <4 x float>*
store <4 x float> %243, <4 x float>* %247
%248 = bitcast float* %236 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %248
%249 = bitcast float* %239 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %249
%250 = or i64 %234, 8
%251 = getelementptr inbounds float, float* %17, i64 %250
%252 = bitcast float* %251 to <4 x float>*
%253 = load <4 x float>, <4 x float>* %252
%254 = getelementptr inbounds float, float* %251, i64 4
%255 = bitcast float* %254 to <4 x float>*
%256 = load <4 x float>, <4 x float>* %255
%257 = fsub <4 x float> %253, %230
%258 = fsub <4 x float> %256, %232
%259 = getelementptr inbounds float, float* %15, i64 %250
%260 = bitcast float* %259 to <4 x float>*
store <4 x float> %257, <4 x float>* %260
%261 = getelementptr inbounds float, float* %259, i64 4
%262 = bitcast float* %261 to <4 x float>*
store <4 x float> %258, <4 x float>* %262
%263 = bitcast float* %251 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %263
%264 = bitcast float* %254 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %264
%265 = add nuw i64 %234, 16
%266 = add i64 %235, 2
%267 = icmp eq i64 %266, %139
br i1 %267, label %268, label %233
268: ; preds = %233, %228
%269 = phi i64 [ 0, %228 ], [ %265, %233 ]
br i1 %140, label %285, label %270
270: ; preds = %268
%271 = getelementptr inbounds float, float* %17, i64 %269
%272 = bitcast float* %271 to <4 x float>*
%273 = load <4 x float>, <4 x float>* %272
%274 = getelementptr inbounds float, float* %271, i64 4
%275 = bitcast float* %274 to <4 x float>*
%276 = load <4 x float>, <4 x float>* %275
%277 = fsub <4 x float> %273, %230
%278 = fsub <4 x float> %276, %232
%279 = getelementptr inbounds float, float* %15, i64 %269
%280 = bitcast float* %279 to <4 x float>*
store <4 x float> %277, <4 x float>* %280
%281 = getelementptr inbounds float, float* %279, i64 4
%282 = bitcast float* %281 to <4 x float>*
store <4 x float> %278, <4 x float>* %282
%283 = bitcast float* %271 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %283
%284 = bitcast float* %274 to <4 x float>*
store <4 x float> <float -1.000000e+07, float -1.000000e+07, float -1.000000e+07, float -1.000000e+07>, <4 x float>* %284
br label %285
285: ; preds = %268, %270
br i1 %141, label %322, label %286
286: ; preds = %227, %285
%287 = phi i64 [ 0, %227 ], [ %136, %285 ]
br label %314
288: ; preds = %165, %288
%289 = phi i64 [ %311, %288 ], [ 0, %165 ]
%290 = phi float [ %310, %288 ], [ 0.000000e+00, %165 ]
%291 = phi i64 [ %312, %288 ], [ 0, %165 ]
%292 = getelementptr inbounds float, float* %17, i64 %289
%293 = load float, float* %292
%294 = fcmp ogt float %293, %290
%295 = select i1 %294, float %293, float %290
%296 = or i64 %289, 1
%297 = getelementptr inbounds float, float* %17, i64 %296
%298 = load float, float* %297
%299 = fcmp ogt float %298, %295
%300 = select i1 %299, float %298, float %295
%301 = or i64 %289, 2
%302 = getelementptr inbounds float, float* %17, i64 %301
%303 = load float, float* %302
%304 = fcmp ogt float %303, %300
%305 = select i1 %304, float %303, float %300
%306 = or i64 %289, 3
%307 = getelementptr inbounds float, float* %17, i64 %306
%308 = load float, float* %307
%309 = fcmp ogt float %308, %305
%310 = select i1 %309, float %308, float %305
%311 = add nuw nsw i64 %289, 4
%312 = add i64 %291, 4
%313 = icmp eq i64 %312, %133
br i1 %313, label %210, label %288
314: ; preds = %286, %314
%315 = phi i64 [ %320, %314 ], [ %287, %286 ]
%316 = getelementptr inbounds float, float* %17, i64 %315
%317 = load float, float* %316
%318 = fsub float %317, %226
%319 = getelementptr inbounds float, float* %15, i64 %315
store float %318, float* %319
store float -1.000000e+07, float* %316
%320 = add nuw nsw i64 %315, 1
%321 = icmp eq i64 %320, %125
br i1 %321, label %322, label %314
322: ; preds = %314, %285, %153, %164, %225
%323 = add nuw nsw i64 %143, 1
%324 = icmp eq i64 %323, %122
br i1 %324, label %150, label %142
325: ; preds = %348, %150
%326 = phi i32 [ 0, %150 ], [ %356, %348 ]
%327 = icmp sgt i32 %8, 0
br i1 %327, label %328, label %384
328: ; preds = %325
%329 = zext i32 %8 to i64
%330 = and i64 %329, 1
%331 = icmp eq i64 %330, 0
br i1 %331, label %344, label %332
332: ; preds = %328
%333 = add nsw i64 %329, -1
%334 = trunc i64 %333 to i32
%335 = shl i32 %334, %10
%336 = add nsw i32 %335, %326
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds i32, i32* %22, i64 %337
%339 = load i32, i32* %338
%340 = and i64 %333, 4294967295
%341 = getelementptr inbounds i32, i32* %0, i64 %340
store i32 %339, i32* %341
%342 = getelementptr inbounds i32, i32* %24, i64 %337
%343 = load i32, i32* %342
br label %344
344: ; preds = %332, %328
%345 = phi i64 [ %329, %328 ], [ %333, %332 ]
%346 = phi i32 [ %326, %328 ], [ %343, %332 ]
%347 = icmp eq i32 %8, 1
br i1 %347, label %384, label %358
348: ; preds = %150, %348
%349 = phi i32 [ %351, %348 ], [ %18, %150 ]
%350 = phi i32 [ %356, %348 ], [ 0, %150 ]
%351 = add nsw i32 %349, -1
%352 = shl i32 %351, %10
%353 = add nsw i32 %352, %350
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds i32, i32* %24, i64 %354
%356 = load i32, i32* %355
%357 = icmp sgt i32 %351, %8
br i1 %357, label %348, label %325
358: ; preds = %344, %358
%359 = phi i64 [ %372, %358 ], [ %345, %344 ]
%360 = phi i32 [ %382, %358 ], [ %346, %344 ]
%361 = add nsw i64 %359, -1
%362 = trunc i64 %361 to i32
%363 = shl i32 %362, %10
%364 = add nsw i32 %363, %360
%365 = sext i32 %364 to i64
%366 = getelementptr inbounds i32, i32* %22, i64 %365
%367 = load i32, i32* %366
%368 = and i64 %361, 4294967295
%369 = getelementptr inbounds i32, i32* %0, i64 %368
store i32 %367, i32* %369
%370 = getelementptr inbounds i32, i32* %24, i64 %365
%371 = load i32, i32* %370
%372 = add nsw i64 %359, -2
%373 = trunc i64 %372 to i32
%374 = shl i32 %373, %10
%375 = add nsw i32 %374, %371
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds i32, i32* %22, i64 %376
%378 = load i32, i32* %377
%379 = and i64 %372, 4294967295
%380 = getelementptr inbounds i32, i32* %0, i64 %379
store i32 %378, i32* %380
%381 = getelementptr inbounds i32, i32* %24, i64 %376
%382 = load i32, i32* %381
%383 = icmp ugt i64 %361, 1
br i1 %383, label %358, label %384
384: ; preds = %344, %358, %325
tail call void @free(i8* %14)
tail call void @free(i8* %16)
tail call void @free(i8* %21)
tail call void @free(i8* %23)
tail call void @free(i8* %26)
tail call void @free(i8* %29)
ret void
}