void UpdateWeightsOrTrans(int M, float *acc1, float *acc2, float *mixes,
                          float *oldMixes, float C) {
  int iter = 0;
  int m;
  float objective = 0, last_objective = 0, last_last_objective = 0;
  float fmax, csum;
  if (C == 0)
    return;
  {
    float sum = 0;
    for (m = 1; m <= M; m++)
      sum += acc1[m];
    if (sum < 1)
      return;
  }
  while (1) {
    iter++;
    last_last_objective = last_objective;
    last_objective = objective;
    objective = 0;
    for (m = 1; m <= M; m++)
      if (mixes[m] > 0)
        objective +=
            (acc1[m] * log(mixes[m]) -
             ((acc2 ? acc2[m] : 0) / C * exp(log(mixes[m] / oldMixes[m]) * C)));
    if (objective < last_objective && objective < last_last_objective &&
        !(last_last_objective == 0) &&
        fabs(objective - last_objective) > fabs(objective) * 0.0001)
      HError(-1, "Objective not increasing: %f<%f,<%f", objective,
             last_objective, last_last_objective);
    if (iter > 100)
      break;
    fmax = 0;
    for (m = 1; m <= M; m++) {
      if (mixes[m] > 0) {
        float f = (acc2 ? acc2[m] : 0) / (oldMixes[m]) *
                  exp(log(mixes[m] / oldMixes[m]) * (C - 1));
        if (C > 1)
          f *= C;
        fmax = ((fmax) > (f) ? (fmax) : (f));
      }
    }
    csum = 0;
    for (m = 1; m <= M; m++) {
      if (mixes[m] > 0) {
        float f = (acc2 ? acc2[m] : 0) / (oldMixes[m]) *
                  exp(log(mixes[m] / oldMixes[m]) * (C - 1));
        mixes[m] = (mixes[m] * (fmax - f)) + acc1[m];
        csum += mixes[m];
      }
    }
    for (m = 1; m <= M; m++)
      mixes[m] /= csum;
  }
  return;
}


x86 assembly (clang, -O0):
<UpdateWeightsOrTrans>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movss  %xmm0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x2c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    118e <UpdateWeightsOrTrans+0x5e>
jp     118e <UpdateWeightsOrTrans+0x5e>
jmp    16dc <UpdateWeightsOrTrans+0x5ac>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     11ce <UpdateWeightsOrTrans+0x9e>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    119d <UpdateWeightsOrTrans+0x6d>
movss  0xe2a(%rip),%xmm0
ucomiss -0x4c(%rbp),%xmm0
jbe    11e5 <UpdateWeightsOrTrans+0xb5>
jmp    16dc <UpdateWeightsOrTrans+0x5ac>
jmp    11ea <UpdateWeightsOrTrans+0xba>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1341 <UpdateWeightsOrTrans+0x211>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    132e <UpdateWeightsOrTrans+0x1fe>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x60(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     128e <UpdateWeightsOrTrans+0x15e>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x6c(%rbp)
jmp    129b <UpdateWeightsOrTrans+0x16b>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
jmp    129b <UpdateWeightsOrTrans+0x16b>
movss  -0x6c(%rbp),%xmm0
divss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
divss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
movss  -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm3,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x38(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    1333 <UpdateWeightsOrTrans+0x203>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1216 <UpdateWeightsOrTrans+0xe6>
movss  -0x38(%rbp),%xmm1
movss  -0x3c(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    13f4 <UpdateWeightsOrTrans+0x2c4>
movss  -0x38(%rbp),%xmm1
movss  -0x40(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    13f4 <UpdateWeightsOrTrans+0x2c4>
movss  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1383 <UpdateWeightsOrTrans+0x253>
jp     1383 <UpdateWeightsOrTrans+0x253>
jmp    13f4 <UpdateWeightsOrTrans+0x2c4>
movss  -0x38(%rbp),%xmm0
subss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xc78(%rip),%xmm1
pand   %xmm1,%xmm0
movss  -0x38(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movaps 0xc64(%rip),%xmm2
pand   %xmm2,%xmm1
movsd  0xc50(%rip),%xmm2
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    13f4 <UpdateWeightsOrTrans+0x2c4>
movss  -0x38(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x3c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x40(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0xffffffff,%edi
lea    0xc33(%rip),%rsi
mov    $0x3,%al
call   1030 <HError@plt>
cmpl   $0x64,-0x30(%rbp)
jle    1403 <UpdateWeightsOrTrans+0x2d3>
jmp    16d7 <UpdateWeightsOrTrans+0x5a7>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1550 <UpdateWeightsOrTrans+0x420>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    153d <UpdateWeightsOrTrans+0x40d>
cmpq   $0x0,-0x18(%rbp)
je     1459 <UpdateWeightsOrTrans+0x329>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x7c(%rbp)
jmp    1466 <UpdateWeightsOrTrans+0x336>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x7c(%rbp)
jmp    1466 <UpdateWeightsOrTrans+0x336>
movss  -0x7c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
divss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
divss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
movss  -0x2c(%rbp),%xmm1
movss  0xb4c(%rip),%xmm2
subss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  0xb16(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1502 <UpdateWeightsOrTrans+0x3d2>
movss  -0x2c(%rbp),%xmm0
mulss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x44(%rbp),%xmm0
ucomiss -0x50(%rbp),%xmm0
jbe    1523 <UpdateWeightsOrTrans+0x3f3>
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
jmp    1530 <UpdateWeightsOrTrans+0x400>
movss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x8c(%rbp),%xmm0
ff
movss  %xmm0,-0x44(%rbp)
jmp    1542 <UpdateWeightsOrTrans+0x412>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1412 <UpdateWeightsOrTrans+0x2e2>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1696 <UpdateWeightsOrTrans+0x566>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1683 <UpdateWeightsOrTrans+0x553>
cmpq   $0x0,-0x18(%rbp)
je     15a9 <UpdateWeightsOrTrans+0x479>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
jmp    15b9 <UpdateWeightsOrTrans+0x489>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x90(%rbp)
ff
jmp    15b9 <UpdateWeightsOrTrans+0x489>
movss  -0x90(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
divss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
divss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
movss  -0x2c(%rbp),%xmm1
movss  0x9f6(%rip),%xmm2
subss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  -0x44(%rbp),%xmm2
subss  -0x54(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
addss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
jmp    1688 <UpdateWeightsOrTrans+0x558>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    155f <UpdateWeightsOrTrans+0x42f>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     16d2 <UpdateWeightsOrTrans+0x5a2>
movss  -0x48(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    169d <UpdateWeightsOrTrans+0x56d>
jmp    11ea <UpdateWeightsOrTrans+0xba>
jmp    16dc <UpdateWeightsOrTrans+0x5ac>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpdateWeightsOrTrans>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r8,0x40(%rsp)
mov    %rdi,0x10(%rsp)
xorps  %xmm1,%xmm1
movss  %xmm0,0x2c(%rsp)
ucomiss %xmm1,%xmm0
jne    116d <UpdateWeightsOrTrans+0x3d>
jp     116d <UpdateWeightsOrTrans+0x3d>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmpl   $0x0,0x10(%rsp)
jle    115b <UpdateWeightsOrTrans+0x2b>
mov    %rcx,%rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    0x10(%rsp),%esi
lea    -0x1(%rsi),%rcx
mov    %esi,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jae    119f <UpdateWeightsOrTrans+0x6f>
xorps  %xmm0,%xmm0
mov    $0x1,%ecx
test   %rax,%rax
jne    11fa <UpdateWeightsOrTrans+0xca>
jmp    120e <UpdateWeightsOrTrans+0xde>
mov    %esi,%edx
and    $0xfffffff8,%edx
xorps  %xmm0,%xmm0
xor    %ecx,%ecx
nopl   0x0(%rax)
addss  0x4(%r14,%rcx,4),%xmm0
addss  0x8(%r14,%rcx,4),%xmm0
addss  0xc(%r14,%rcx,4),%xmm0
addss  0x10(%r14,%rcx,4),%xmm0
addss  0x14(%r14,%rcx,4),%xmm0
addss  0x18(%r14,%rcx,4),%xmm0
addss  0x1c(%r14,%rcx,4),%xmm0
addss  0x20(%r14,%rcx,4),%xmm0
add    $0x8,%rcx
cmp    %rcx,%rdx
jne    11b0 <UpdateWeightsOrTrans+0x80>
add    $0x1,%rcx
test   %rax,%rax
je     120e <UpdateWeightsOrTrans+0xde>
lea    (%r14,%rcx,4),%rcx
xor    %edx,%edx
addss  (%rcx,%rdx,4),%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1200 <UpdateWeightsOrTrans+0xd0>
movss  0xdea(%rip),%xmm1
ucomiss %xmm0,%xmm1
ja     115b <UpdateWeightsOrTrans+0x2b>
add    $0x1,%rsi
movss  0x2c(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0xa0(%rsp)
movss  0xdc3(%rip),%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x68(%rsp)
maxss  0xda9(%rip),%xmm1
movss  %xmm1,0x54(%rsp)
mov    0x10(%rsp),%rax
lea    0x1(%rax),%r12d
lea    -0x1(%rsi),%rax
add    $0xfffffffffffffffb,%rsi
mov    %rsi,0x90(%rsp)
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %rax,0x58(%rsp)
and    $0xfffffffffffffffc,%rax
mov    %rax,0x80(%rsp)
add    $0x1,%rax
mov    %rax,0x78(%rsp)
mov    %rsi,%rax
mov    %rsi,0x88(%rsp)
and    $0xfffffffffffffffe,%rsi
mov    %rsi,0x70(%rsp)
mov    %r12,%rax
neg    %rax
mov    %rax,0x98(%rsp)
xor    %eax,%eax
mov    %rax,0x60(%rsp)
xorps  %xmm3,%xmm3
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rsp)
movss  0xc(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
xorps  %xmm1,%xmm1
cmpl   $0x0,0x10(%rsp)
jle    13d0 <UpdateWeightsOrTrans+0x2a0>
xorps  %xmm1,%xmm1
mov    $0x1,%r13d
jmp    1385 <UpdateWeightsOrTrans+0x255>
xchg   %ax,%ax
movss  (%r15,%r13,4),%xmm0
movss  0x30(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x30(%rsp)
divss  0x2c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x48(%rsp)
movss  (%rbx,%r13,4),%xmm0
mov    0x40(%rsp),%rax
divss  (%rax,%r13,4),%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
mulsd  0xa0(%rsp),%xmm0
call   1040 <exp@plt>
mulsd  0x48(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
xorps  %xmm3,%xmm3
add    $0x1,%r13
cmp    %r13,%r12
je     13d0 <UpdateWeightsOrTrans+0x2a0>
movss  (%rbx,%r13,4),%xmm0
ucomiss %xmm3,%xmm0
jbe    137c <UpdateWeightsOrTrans+0x24c>
movss  %xmm1,0xc(%rsp)
movss  (%r14,%r13,4),%xmm1
movss  %xmm1,0x30(%rsp)
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
test   %r15,%r15
movsd  %xmm0,0x20(%rsp)
jne    1300 <UpdateWeightsOrTrans+0x1d0>
xorps  %xmm0,%xmm0
jmp    1306 <UpdateWeightsOrTrans+0x1d6>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  0x8(%rsp),%xmm0
ucomiss %xmm1,%xmm0
mov    0x60(%rsp),%rbp
movss  %xmm1,0xc(%rsp)
jbe    1470 <UpdateWeightsOrTrans+0x340>
movss  0x1c(%rsp),%xmm0
ucomiss %xmm3,%xmm0
jne    13f7 <UpdateWeightsOrTrans+0x2c7>
jnp    1470 <UpdateWeightsOrTrans+0x340>
movss  0x1c(%rsp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1470 <UpdateWeightsOrTrans+0x340>
movaps %xmm1,%xmm0
subss  0x8(%rsp),%xmm0
andps  0xbfe(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm2
andps  0xbf3(%rip),%xmm2
mulsd  0xbfb(%rip),%xmm2
ucomisd %xmm2,%xmm1
jbe    1470 <UpdateWeightsOrTrans+0x340>
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x1c(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0xffffffff,%edi
lea    0xbdd(%rip),%rsi
mov    $0x3,%al
call   1030 <HError@plt>
xorps  %xmm3,%xmm3
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x64,%ebp
je     115b <UpdateWeightsOrTrans+0x2b>
add    $0x1,%ebp
mov    %rbp,0x60(%rsp)
movss  0x8(%rsp),%xmm0
cmpl   $0x0,0x10(%rsp)
jle    12d0 <UpdateWeightsOrTrans+0x1a0>
mov    %r14,%r13
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rsp)
mov    $0x1,%ebp
mov    0x40(%rsp),%r14
jmp    150e <UpdateWeightsOrTrans+0x3de>
nopw   0x0(%rax,%rax,1)
movss  (%r15,%rbp,4),%xmm1
movss  (%r14,%rbp,4),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x30(%rsp)
divss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
mulsd  0x68(%rsp),%xmm0
call   1040 <exp@plt>
mulsd  0x30(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
mulss  0x54(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
maxss  %xmm0,%xmm1
movss  %xmm1,0x20(%rsp)
xorps  %xmm3,%xmm3
add    $0x1,%rbp
cmp    %rbp,%r12
je     1530 <UpdateWeightsOrTrans+0x400>
movss  (%rbx,%rbp,4),%xmm0
ucomiss %xmm3,%xmm0
jbe    1505 <UpdateWeightsOrTrans+0x3d5>
test   %r15,%r15
jne    14b0 <UpdateWeightsOrTrans+0x380>
xorps  %xmm1,%xmm1
jmp    14b6 <UpdateWeightsOrTrans+0x386>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  0x8(%rsp),%xmm0
cmpl   $0x0,0x10(%rsp)
mov    %r13,%r14
jle    12d0 <UpdateWeightsOrTrans+0x1a0>
xorps  %xmm4,%xmm4
mov    $0x1,%ebp
mov    0x40(%rsp),%r14
jmp    15bc <UpdateWeightsOrTrans+0x48c>
xorps  %xmm1,%xmm1
movss  (%r14,%rbp,4),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x48(%rsp)
divss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
call   1050 <log@plt>
mulsd  0x68(%rsp),%xmm0
call   1040 <exp@plt>
mulsd  0x48(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0x20(%rsp),%xmm1
subss  %xmm0,%xmm1
mulss  (%rbx,%rbp,4),%xmm1
addss  0x0(%r13,%rbp,4),%xmm1
movss  %xmm1,(%rbx,%rbp,4)
movaps 0x30(%rsp),%xmm4
addss  %xmm1,%xmm4
xorps  %xmm3,%xmm3
add    $0x1,%rbp
cmp    %rbp,%r12
je     15e0 <UpdateWeightsOrTrans+0x4b0>
movss  (%rbx,%rbp,4),%xmm0
ucomiss %xmm3,%xmm0
jbe    15b3 <UpdateWeightsOrTrans+0x483>
test   %r15,%r15
movaps %xmm4,0x30(%rsp)
je     1553 <UpdateWeightsOrTrans+0x423>
movss  (%r15,%rbp,4),%xmm1
jmp    1556 <UpdateWeightsOrTrans+0x426>
nopl   0x0(%rax,%rax,1)
movss  0x8(%rsp),%xmm0
cmpl   $0x0,0x10(%rsp)
mov    %r13,%r14
jle    12d0 <UpdateWeightsOrTrans+0x1a0>
mov    $0x1,%ecx
cmpq   $0x4,0x58(%rsp)
jb     167f <UpdateWeightsOrTrans+0x54f>
movaps %xmm4,%xmm0
shufps $0x0,%xmm4,%xmm0
cmpq   $0x4,0x90(%rsp)
jae    1617 <UpdateWeightsOrTrans+0x4e7>
xor    %eax,%eax
jmp    1644 <UpdateWeightsOrTrans+0x514>
mov    0x70(%rsp),%rcx
xor    %eax,%eax
xchg   %ax,%ax
movups 0x4(%rbx,%rax,4),%xmm1
movups 0x14(%rbx,%rax,4),%xmm2
divps  %xmm0,%xmm1
movups %xmm1,0x4(%rbx,%rax,4)
divps  %xmm0,%xmm2
movups %xmm2,0x14(%rbx,%rax,4)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1620 <UpdateWeightsOrTrans+0x4f0>
testb  $0x1,0x88(%rsp)
01
je     1661 <UpdateWeightsOrTrans+0x531>
shl    $0x2,%rax
or     $0x4,%rax
movups (%rbx,%rax,1),%xmm1
divps  %xmm0,%xmm1
movups %xmm1,(%rbx,%rax,1)
movss  0x8(%rsp),%xmm0
mov    0x78(%rsp),%rcx
mov    0x80(%rsp),%rax
cmp    %rax,0x58(%rsp)
je     12d0 <UpdateWeightsOrTrans+0x1a0>
mov    %rcx,%rax
test   $0x1,%r12b
jne    169a <UpdateWeightsOrTrans+0x56a>
movss  (%rbx,%rcx,4),%xmm0
divss  %xmm4,%xmm0
movss  %xmm0,(%rbx,%rcx,4)
lea    0x1(%rcx),%rax
not    %rcx
movss  0x8(%rsp),%xmm0
cmp    0x98(%rsp),%rcx
je     12d0 <UpdateWeightsOrTrans+0x1a0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  (%rbx,%rax,4),%xmm0
movss  0x4(%rbx,%rax,4),%xmm1
divss  %xmm4,%xmm0
movss  %xmm0,(%rbx,%rax,4)
divss  %xmm4,%xmm1
movss  %xmm1,0x4(%rbx,%rax,4)
add    $0x2,%rax
cmp    %rax,%r12
jne    16c0 <UpdateWeightsOrTrans+0x590>
movss  0x8(%rsp),%xmm0
jmp    12d0 <UpdateWeightsOrTrans+0x1a0>

LLVM IR (-O0):
@.str = [36 x i8] c"Objective not increasing: %f<%f,<%f\00"
define void @UpdateWeightsOrTrans(i32 %0, float* %1, float* %2, float* %3, float* %4, float %5) {
%7 = alloca i32
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
store i32 %0, i32* %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float %5, float* %12
store i32 0, i32* %13
store float 0.000000e+00, float* %15
store float 0.000000e+00, float* %16
store float 0.000000e+00, float* %17
%23 = load float, float* %12
%24 = fcmp oeq float %23, 0.000000e+00
br i1 %24, label %25, label %26
25: ; preds = %6
br label %322
26: ; preds = %6
store float 0.000000e+00, float* %20
store i32 1, i32* %14
br label %27
27: ; preds = %39, %26
%28 = load i32, i32* %14
%29 = load i32, i32* %7
%30 = icmp sle i32 %28, %29
br i1 %30, label %31, label %42
31: ; preds = %27
%32 = load float*, float** %8
%33 = load i32, i32* %14
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds float, float* %32, i64 %34
%36 = load float, float* %35
%37 = load float, float* %20
%38 = fadd float %37, %36
store float %38, float* %20
br label %39
39: ; preds = %31
%40 = load i32, i32* %14
%41 = add nsw i32 %40, 1
store i32 %41, i32* %14
br label %27
42: ; preds = %27
%43 = load float, float* %20
%44 = fcmp olt float %43, 1.000000e+00
br i1 %44, label %45, label %46
45: ; preds = %42
br label %322
46: ; preds = %42
br label %47
47: ; preds = %46, %320
%48 = load i32, i32* %13
%49 = add nsw i32 %48, 1
store i32 %49, i32* %13
%50 = load float, float* %16
store float %50, float* %17
%51 = load float, float* %15
store float %51, float* %16
store float 0.000000e+00, float* %15
store i32 1, i32* %14
br label %52
52: ; preds = %116, %47
%53 = load i32, i32* %14
%54 = load i32, i32* %7
%55 = icmp sle i32 %53, %54
br i1 %55, label %56, label %119
56: ; preds = %52
%57 = load float*, float** %10
%58 = load i32, i32* %14
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds float, float* %57, i64 %59
%61 = load float, float* %60
%62 = fcmp ogt float %61, 0.000000e+00
br i1 %62, label %63, label %115
63: ; preds = %56
%64 = load float*, float** %8
%65 = load i32, i32* %14
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds float, float* %64, i64 %66
%68 = load float, float* %67
%69 = fpext float %68 to double
%70 = load float*, float** %10
%71 = load i32, i32* %14
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds float, float* %70, i64 %72
%74 = load float, float* %73
%75 = fpext float %74 to double
%76 = call double @log(double %75)
%77 = load float*, float** %9
%78 = icmp ne float* %77, null
br i1 %78, label %79, label %85
79: ; preds = %63
%80 = load float*, float** %9
%81 = load i32, i32* %14
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds float, float* %80, i64 %82
%84 = load float, float* %83
br label %86
85: ; preds = %63
br label %86
86: ; preds = %85, %79
%87 = phi float [ %84, %79 ], [ 0.000000e+00, %85 ]
%88 = load float, float* %12
%89 = fdiv float %87, %88
%90 = fpext float %89 to double
%91 = load float*, float** %10
%92 = load i32, i32* %14
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds float, float* %91, i64 %93
%95 = load float, float* %94
%96 = load float*, float** %11
%97 = load i32, i32* %14
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds float, float* %96, i64 %98
%100 = load float, float* %99
%101 = fdiv float %95, %100
%102 = fpext float %101 to double
%103 = call double @log(double %102)
%104 = load float, float* %12
%105 = fpext float %104 to double
%106 = fmul double %103, %105
%107 = call double @exp(double %106)
%108 = fmul double %90, %107
%109 = fneg double %108
%110 = call double @llvm.fmuladd.f64(double %69, double %76, double %109)
%111 = load float, float* %15
%112 = fpext float %111 to double
%113 = fadd double %112, %110
%114 = fptrunc double %113 to float
store float %114, float* %15
br label %115
115: ; preds = %86, %56
br label %116
116: ; preds = %115
%117 = load i32, i32* %14
%118 = add nsw i32 %117, 1
store i32 %118, i32* %14
br label %52
119: ; preds = %52
%120 = load float, float* %15
%121 = load float, float* %16
%122 = fcmp olt float %120, %121
br i1 %122, label %123, label %149
123: ; preds = %119
%124 = load float, float* %15
%125 = load float, float* %17
%126 = fcmp olt float %124, %125
br i1 %126, label %127, label %149
127: ; preds = %123
%128 = load float, float* %17
%129 = fcmp oeq float %128, 0.000000e+00
br i1 %129, label %149, label %130
130: ; preds = %127
%131 = load float, float* %15
%132 = load float, float* %16
%133 = fsub float %131, %132
%134 = fpext float %133 to double
%135 = call double @llvm.fabs.f64(double %134)
%136 = load float, float* %15
%137 = fpext float %136 to double
%138 = call double @llvm.fabs.f64(double %137)
%139 = fmul double %138, 1.000000e-04
%140 = fcmp ogt double %135, %139
br i1 %140, label %141, label %149
141: ; preds = %130
%142 = load float, float* %15
%143 = fpext float %142 to double
%144 = load float, float* %16
%145 = fpext float %144 to double
%146 = load float, float* %17
%147 = fpext float %146 to double
%148 = call i32 (i32, i8*, double, double, double, ...) bitcast (i32 (...)* @HError to i32 (i32, i8*, double, double, double, ...)*)(i32 -1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %143, double %145, double %147)
br label %149
149: ; preds = %141, %130, %127, %123, %119
%150 = load i32, i32* %13
%151 = icmp sgt i32 %150, 100
br i1 %151, label %152, label %153
152: ; preds = %149
br label %321
153: ; preds = %149
store float 0.000000e+00, float* %18
store i32 1, i32* %14
br label %154
154: ; preds = %221, %153
%155 = load i32, i32* %14
%156 = load i32, i32* %7
%157 = icmp sle i32 %155, %156
br i1 %157, label %158, label %224
158: ; preds = %154
%159 = load float*, float** %10
%160 = load i32, i32* %14
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds float, float* %159, i64 %161
%163 = load float, float* %162
%164 = fcmp ogt float %163, 0.000000e+00
br i1 %164, label %165, label %220
165: ; preds = %158
%166 = load float*, float** %9
%167 = icmp ne float* %166, null
br i1 %167, label %168, label %174
168: ; preds = %165
%169 = load float*, float** %9
%170 = load i32, i32* %14
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds float, float* %169, i64 %171
%173 = load float, float* %172
br label %175
174: ; preds = %165
br label %175
175: ; preds = %174, %168
%176 = phi float [ %173, %168 ], [ 0.000000e+00, %174 ]
%177 = load float*, float** %11
%178 = load i32, i32* %14
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds float, float* %177, i64 %179
%181 = load float, float* %180
%182 = fdiv float %176, %181
%183 = fpext float %182 to double
%184 = load float*, float** %10
%185 = load i32, i32* %14
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds float, float* %184, i64 %186
%188 = load float, float* %187
%189 = load float*, float** %11
%190 = load i32, i32* %14
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds float, float* %189, i64 %191
%193 = load float, float* %192
%194 = fdiv float %188, %193
%195 = fpext float %194 to double
%196 = call double @log(double %195)
%197 = load float, float* %12
%198 = fsub float %197, 1.000000e+00
%199 = fpext float %198 to double
%200 = fmul double %196, %199
%201 = call double @exp(double %200)
%202 = fmul double %183, %201
%203 = fptrunc double %202 to float
store float %203, float* %21
%204 = load float, float* %12
%205 = fcmp ogt float %204, 1.000000e+00
br i1 %205, label %206, label %210
206: ; preds = %175
%207 = load float, float* %12
%208 = load float, float* %21
%209 = fmul float %208, %207
store float %209, float* %21
br label %210
210: ; preds = %206, %175
%211 = load float, float* %18
%212 = load float, float* %21
%213 = fcmp ogt float %211, %212
br i1 %213, label %214, label %216
214: ; preds = %210
%215 = load float, float* %18
br label %218
216: ; preds = %210
%217 = load float, float* %21
br label %218
218: ; preds = %216, %214
%219 = phi float [ %215, %214 ], [ %217, %216 ]
store float %219, float* %18
br label %220
220: ; preds = %218, %158
br label %221
221: ; preds = %220
%222 = load i32, i32* %14
%223 = add nsw i32 %222, 1
store i32 %223, i32* %14
br label %154
224: ; preds = %154
store float 0.000000e+00, float* %19
store i32 1, i32* %14
br label %225
225: ; preds = %301, %224
%226 = load i32, i32* %14
%227 = load i32, i32* %7
%228 = icmp sle i32 %226, %227
br i1 %228, label %229, label %304
229: ; preds = %225
%230 = load float*, float** %10
%231 = load i32, i32* %14
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds float, float* %230, i64 %232
%234 = load float, float* %233
%235 = fcmp ogt float %234, 0.000000e+00
br i1 %235, label %236, label %300
236: ; preds = %229
%237 = load float*, float** %9
%238 = icmp ne float* %237, null
br i1 %238, label %239, label %245
239: ; preds = %236
%240 = load float*, float** %9
%241 = load i32, i32* %14
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds float, float* %240, i64 %242
%244 = load float, float* %243
br label %246
245: ; preds = %236
br label %246
246: ; preds = %245, %239
%247 = phi float [ %244, %239 ], [ 0.000000e+00, %245 ]
%248 = load float*, float** %11
%249 = load i32, i32* %14
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds float, float* %248, i64 %250
%252 = load float, float* %251
%253 = fdiv float %247, %252
%254 = fpext float %253 to double
%255 = load float*, float** %10
%256 = load i32, i32* %14
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds float, float* %255, i64 %257
%259 = load float, float* %258
%260 = load float*, float** %11
%261 = load i32, i32* %14
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds float, float* %260, i64 %262
%264 = load float, float* %263
%265 = fdiv float %259, %264
%266 = fpext float %265 to double
%267 = call double @log(double %266)
%268 = load float, float* %12
%269 = fsub float %268, 1.000000e+00
%270 = fpext float %269 to double
%271 = fmul double %267, %270
%272 = call double @exp(double %271)
%273 = fmul double %254, %272
%274 = fptrunc double %273 to float
store float %274, float* %22
%275 = load float*, float** %10
%276 = load i32, i32* %14
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds float, float* %275, i64 %277
%279 = load float, float* %278
%280 = load float, float* %18
%281 = load float, float* %22
%282 = fsub float %280, %281
%283 = load float*, float** %8
%284 = load i32, i32* %14
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds float, float* %283, i64 %285
%287 = load float, float* %286
%288 = call float @llvm.fmuladd.f32(float %279, float %282, float %287)
%289 = load float*, float** %10
%290 = load i32, i32* %14
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds float, float* %289, i64 %291
store float %288, float* %292
%293 = load float*, float** %10
%294 = load i32, i32* %14
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds float, float* %293, i64 %295
%297 = load float, float* %296
%298 = load float, float* %19
%299 = fadd float %298, %297
store float %299, float* %19
br label %300
300: ; preds = %246, %229
br label %301
301: ; preds = %300
%302 = load i32, i32* %14
%303 = add nsw i32 %302, 1
store i32 %303, i32* %14
br label %225
304: ; preds = %225
store i32 1, i32* %14
br label %305
305: ; preds = %317, %304
%306 = load i32, i32* %14
%307 = load i32, i32* %7
%308 = icmp sle i32 %306, %307
br i1 %308, label %309, label %320
309: ; preds = %305
%310 = load float, float* %19
%311 = load float*, float** %10
%312 = load i32, i32* %14
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds float, float* %311, i64 %313
%315 = load float, float* %314
%316 = fdiv float %315, %310
store float %316, float* %314
br label %317
317: ; preds = %309
%318 = load i32, i32* %14
%319 = add nsw i32 %318, 1
store i32 %319, i32* %14
br label %305
320: ; preds = %305
br label %47
321: ; preds = %152
br label %322
322: ; preds = %321, %45, %25
ret void
}

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