#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double exp(double);
double log(double);
void CO_select_backward_2(double *prob, int n1, int n2, double *fx,
                          int N_population, double temp) {
  int i;
  double fx_min;
  double fx_sum;
  double prob1;
  double prob2;
  double prob11;
  double prob12;
  double prob21;
  double prob22;
  fx_min = fx[1];
  for (i = 1; i <= N_population; i++)
    if (fx[i] < fx_min)
      fx_min = fx[i];
  fx_sum = 0.0;
  for (i = 1; i <= N_population; i++)
    fx_sum += exp((-fx[i] + fx_min) / temp);
  if (fx_sum != 0.0)
    prob11 = (-fx[n1] + fx_min) / temp - log(fx_sum);
  else
    prob11 = -log((double)N_population);
  if (fx_sum != 0.0)
    prob22 = (-fx[n2] + fx_min) / temp - log(fx_sum);
  else
    prob22 = -log((double)N_population);
  fx_min = ((n1 == 1) ? fx[2] : fx[1]);
  for (i = 1; i <= N_population; i++)
    if (i != n1 && fx[i] < fx_min)
      fx_min = fx[i];
  fx_sum = 0.0;
  for (i = 1; i <= N_population; i++)
    if (i != n1)
      fx_sum += exp((-fx[i] + fx_min) / temp);
  if (fx_sum != 0.0)
    prob12 = (-fx[n2] + fx_min) / temp - log(fx_sum);
  else
    prob12 = -log((double)(N_population - 1));
  fx_min = ((n2 == 1) ? fx[2] : fx[1]);
  for (i = 1; i <= N_population; i++)
    if (i != n2 && fx[i] < fx_min)
      fx_min = fx[i];
  fx_sum = 0.0;
  for (i = 1; i <= N_population; i++)
    if (i != n2)
      fx_sum += exp((-fx[i] + fx_min) / temp);
  if (fx_sum != 0.0)
    prob21 = (-fx[n1] + fx_min) / temp - log(fx_sum);
  else
    prob21 = -log((double)(N_population - 1));
  prob1 = prob11 + prob12;
  prob2 = prob21 + prob22;
  if (prob1 > prob2)
    *prob = prob1 + log(1.0 + exp(prob2 - prob1));
  else
    *prob = prob2 + log(1.0 + exp(prob1 - prob2));
}


x86 assembly (clang, -O0):
<CO_select_backward_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11a4 <CO_select_backward_2+0x84>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1191 <CO_select_backward_2+0x71>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1196 <CO_select_backward_2+0x76>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1157 <CO_select_backward_2+0x37>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     120a <CO_select_backward_2+0xea>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <exp@plt>
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11b3 <CO_select_backward_2+0x93>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1227 <CO_select_backward_2+0x107>
jp     1227 <CO_select_backward_2+0x107>
jmp    127a <CO_select_backward_2+0x15a>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    12a0 <CO_select_backward_2+0x180>
cvtsi2sdl -0x1c(%rbp),%xmm0
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12bd <CO_select_backward_2+0x19d>
jp     12bd <CO_select_backward_2+0x19d>
jmp    1310 <CO_select_backward_2+0x1f0>
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    1336 <CO_select_backward_2+0x216>
cvtsi2sdl -0x1c(%rbp),%xmm0
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1356 <CO_select_backward_2+0x236>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    1367 <CO_select_backward_2+0x247>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     13d4 <CO_select_backward_2+0x2b4>
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     13c1 <CO_select_backward_2+0x2a1>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13c1 <CO_select_backward_2+0x2a1>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    13c6 <CO_select_backward_2+0x2a6>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    137b <CO_select_backward_2+0x25b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     144b <CO_select_backward_2+0x32b>
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1438 <CO_select_backward_2+0x318>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <exp@plt>
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    143d <CO_select_backward_2+0x31d>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13e3 <CO_select_backward_2+0x2c3>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1468 <CO_select_backward_2+0x348>
jp     1468 <CO_select_backward_2+0x348>
jmp    14c1 <CO_select_backward_2+0x3a1>
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    14ec <CO_select_backward_2+0x3cc>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    150c <CO_select_backward_2+0x3ec>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    151d <CO_select_backward_2+0x3fd>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     158a <CO_select_backward_2+0x46a>
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1577 <CO_select_backward_2+0x457>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1577 <CO_select_backward_2+0x457>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    157c <CO_select_backward_2+0x45c>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1531 <CO_select_backward_2+0x411>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1601 <CO_select_backward_2+0x4e1>
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     15ee <CO_select_backward_2+0x4ce>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <exp@plt>
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    15f3 <CO_select_backward_2+0x4d3>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1599 <CO_select_backward_2+0x479>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    161e <CO_select_backward_2+0x4fe>
jp     161e <CO_select_backward_2+0x4fe>
jmp    1677 <CO_select_backward_2+0x557>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    16a2 <CO_select_backward_2+0x582>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x68(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    171c <CO_select_backward_2+0x5fc>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0x909(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1763 <CO_select_backward_2+0x643>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0x8bd(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CO_select_backward_2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movapd %xmm0,0x40(%rsp)
mov    %r8d,%r15d
mov    %rcx,%r12
mov    %edx,%ebx
mov    %esi,0xc(%rsp)
mov    %rdi,0x60(%rsp)
test   %r8d,%r8d
jle    1311 <CO_select_backward_2+0x1f1>
movsd  0x8(%r12),%xmm1
lea    0x1(%r15),%ebp
movapd %xmm1,%xmm2
cmp    $0x2,%ebp
je     1206 <CO_select_backward_2+0xe6>
lea    -0x2(%rbp),%rdx
lea    -0x3(%rbp),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    1184 <CO_select_backward_2+0x64>
mov    $0x2,%ecx
movapd %xmm1,%xmm0
jmp    11dd <CO_select_backward_2+0xbd>
and    $0xfffffffffffffffc,%rdx
neg    %rdx
mov    $0x2,%ecx
movapd %xmm1,%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r12,%rcx,8),%xmm2
minsd  %xmm0,%xmm2
movsd  0x8(%r12,%rcx,8),%xmm0
minsd  %xmm2,%xmm0
movsd  0x10(%r12,%rcx,8),%xmm2
minsd  %xmm0,%xmm2
movsd  0x18(%r12,%rcx,8),%xmm0
minsd  %xmm2,%xmm0
lea    (%rdx,%rcx,1),%rsi
add    $0x4,%rsi
add    $0x4,%rcx
cmp    $0x2,%rsi
jne    11a0 <CO_select_backward_2+0x80>
movapd %xmm0,%xmm2
test   %rax,%rax
je     1206 <CO_select_backward_2+0xe6>
lea    (%r12,%rcx,8),%rcx
xor    %edx,%edx
nopl   0x0(%rax)
movsd  (%rcx,%rdx,8),%xmm2
minsd  %xmm0,%xmm2
add    $0x1,%rdx
movapd %xmm2,%xmm0
cmp    %rdx,%rax
jne    11f0 <CO_select_backward_2+0xd0>
test   %r15d,%r15d
jle    1311 <CO_select_backward_2+0x1f1>
mov    %ebx,%r14d
movapd %xmm2,0x10(%rsp)
movapd %xmm2,%xmm0
subsd  %xmm1,%xmm0
divsd  0x40(%rsp),%xmm0
call   1030 <exp@plt>
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
cmp    $0x1,%r15d
je     1278 <CO_select_backward_2+0x158>
mov    $0x2,%ebx
xchg   %ax,%ax
movsd  %xmm0,(%rsp)
movapd 0x10(%rsp),%xmm0
subsd  (%r12,%rbx,8),%xmm0
divsd  0x40(%rsp),%xmm0
call   1030 <exp@plt>
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1240 <CO_select_backward_2+0x120>
ucomisd 0xd98(%rip),%xmm0
mov    %r14d,%ebx
jne    128b <CO_select_backward_2+0x16b>
jnp    1311 <CO_select_backward_2+0x1f1>
movslq 0xc(%rsp),%rax
movsd  (%r12,%rax,8),%xmm1
movaps %xmm1,0x20(%rsp)
movsd  %xmm0,(%rsp)
call   1040 <log@plt>
movapd %xmm0,0x30(%rsp)
movslq %ebx,%rax
movapd 0x20(%rsp),%xmm1
movhpd (%r12,%rax,8),%xmm1
movaps 0x10(%rsp),%xmm0
movlhps %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movapd 0x10(%rsp),%xmm0
subpd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
movapd 0x40(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
movapd 0x10(%rsp),%xmm1
divpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1040 <log@plt>
movapd 0x10(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
subpd  %xmm2,%xmm1
jmp    1345 <CO_select_backward_2+0x225>
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movsd  %xmm0,(%rsp)
call   1040 <log@plt>
movapd %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1040 <log@plt>
movapd 0x10(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
xorpd  0xcbb(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
lea    0x8(%r12),%r14
lea    0x10(%r12),%rax
mov    %rax,0x20(%rsp)
mov    %r15d,%ebp
test   %r15d,%r15d
movapd 0x40(%rsp),%xmm1
jle    14ba <CO_select_backward_2+0x39a>
mov    0xc(%rsp),%ecx
cmp    $0x1,%ecx
mov    %r14,%rax
cmove  0x20(%rsp),%rax
movsd  (%rax),%xmm2
mov    %ecx,%r13d
cmp    $0x1,%r15d
jne    1396 <CO_select_backward_2+0x276>
mov    $0x1,%eax
test   $0x1,%bpl
jne    13f7 <CO_select_backward_2+0x2d7>
jmp    140c <CO_select_backward_2+0x2ec>
mov    %ebp,%ecx
and    $0xfffffffe,%ecx
mov    $0x1,%esi
jmp    13b9 <CO_select_backward_2+0x299>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rdx),%rsi
cmp    %rcx,%rdx
je     13ed <CO_select_backward_2+0x2cd>
mov    %rsi,%rax
cmp    %rsi,%r13
je     13d1 <CO_select_backward_2+0x2b1>
movsd  (%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm2
jbe    13d1 <CO_select_backward_2+0x2b1>
movapd %xmm0,%xmm2
lea    0x1(%rax),%rdx
cmp    %r13,%rdx
je     13b0 <CO_select_backward_2+0x290>
movsd  0x8(%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm2
jbe    13b0 <CO_select_backward_2+0x290>
movapd %xmm0,%xmm2
jmp    13b0 <CO_select_backward_2+0x290>
add    $0x2,%rax
test   $0x1,%bpl
je     140c <CO_select_backward_2+0x2ec>
cmp    %r13,%rax
je     140c <CO_select_backward_2+0x2ec>
movsd  (%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm2
jbe    140c <CO_select_backward_2+0x2ec>
movapd %xmm0,%xmm2
test   %r15d,%r15d
jle    14ba <CO_select_backward_2+0x39a>
mov    %rbp,0x58(%rsp)
mov    %ebx,0x54(%rsp)
lea    0x1(%r15),%ebp
xorpd  %xmm3,%xmm3
mov    $0x1,%ebx
movapd %xmm2,0x30(%rsp)
jmp    1449 <CO_select_backward_2+0x329>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%rbp
je     147d <CO_select_backward_2+0x35d>
cmp    %rbx,%r13
je     1440 <CO_select_backward_2+0x320>
movapd %xmm2,%xmm0
subsd  (%r12,%rbx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm3,(%rsp)
call   1030 <exp@plt>
movsd  (%rsp),%xmm3
movapd 0x30(%rsp),%xmm2
movapd 0x40(%rsp),%xmm1
addsd  %xmm0,%xmm3
jmp    1440 <CO_select_backward_2+0x320>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
mov    0x54(%rsp),%ebx
mov    0x58(%rsp),%rbp
jne    1492 <CO_select_backward_2+0x372>
jnp    14ba <CO_select_backward_2+0x39a>
movslq %ebx,%rax
subsd  (%r12,%rax,8),%xmm2
divsd  %xmm1,%xmm2
movapd %xmm2,0x30(%rsp)
movapd %xmm3,%xmm0
call   1040 <log@plt>
movapd 0x30(%rsp),%xmm1
subsd  %xmm0,%xmm1
jmp    14d6 <CO_select_backward_2+0x3b6>
lea    -0x1(%r15),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm1
xorpd  0xb2a(%rip),%xmm1
movapd %xmm1,0x30(%rsp)
test   %r15d,%r15d
movapd 0x40(%rsp),%xmm1
jle    1613 <CO_select_backward_2+0x4f3>
mov    %rbp,%rdi
cmp    $0x1,%ebx
cmove  0x20(%rsp),%r14
movsd  (%r14),%xmm2
mov    %ebx,%ebp
cmp    $0x1,%r15d
jne    1511 <CO_select_backward_2+0x3f1>
mov    $0x1,%eax
test   $0x1,%dil
jne    1567 <CO_select_backward_2+0x447>
jmp    157c <CO_select_backward_2+0x45c>
mov    %edi,%ecx
and    $0xfffffffe,%ecx
mov    $0x1,%esi
jmp    1529 <CO_select_backward_2+0x409>
nopl   (%rax)
lea    0x1(%rdx),%rsi
cmp    %rcx,%rdx
je     155d <CO_select_backward_2+0x43d>
mov    %rsi,%rax
cmp    %rsi,%rbp
je     1541 <CO_select_backward_2+0x421>
movsd  (%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm2
jbe    1541 <CO_select_backward_2+0x421>
movapd %xmm0,%xmm2
lea    0x1(%rax),%rdx
cmp    %rbp,%rdx
je     1520 <CO_select_backward_2+0x400>
movsd  0x8(%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm2
jbe    1520 <CO_select_backward_2+0x400>
movapd %xmm0,%xmm2
jmp    1520 <CO_select_backward_2+0x400>
add    $0x2,%rax
test   $0x1,%dil
je     157c <CO_select_backward_2+0x45c>
cmp    %rbp,%rax
je     157c <CO_select_backward_2+0x45c>
movsd  (%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm2
jbe    157c <CO_select_backward_2+0x45c>
movapd %xmm0,%xmm2
test   %r15d,%r15d
jle    1613 <CO_select_backward_2+0x4f3>
lea    0x1(%r15),%r14d
xorpd  %xmm3,%xmm3
mov    $0x1,%ebx
movapd %xmm2,0x20(%rsp)
jmp    15a9 <CO_select_backward_2+0x489>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r14
je     15dd <CO_select_backward_2+0x4bd>
cmp    %rbx,%rbp
je     15a0 <CO_select_backward_2+0x480>
movapd %xmm2,%xmm0
subsd  (%r12,%rbx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm3,(%rsp)
call   1030 <exp@plt>
movsd  (%rsp),%xmm3
movapd 0x20(%rsp),%xmm2
movapd 0x40(%rsp),%xmm1
addsd  %xmm0,%xmm3
jmp    15a0 <CO_select_backward_2+0x480>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
jne    15e9 <CO_select_backward_2+0x4c9>
jnp    1613 <CO_select_backward_2+0x4f3>
movslq 0xc(%rsp),%rax
subsd  (%r12,%rax,8),%xmm2
divsd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
movapd %xmm3,%xmm0
call   1040 <log@plt>
movapd 0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
jmp    1630 <CO_select_backward_2+0x510>
add    $0xffffffff,%r15d
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
call   1040 <log@plt>
movapd %xmm0,%xmm1
xorpd  0x9d0(%rip),%xmm1
movapd 0x30(%rsp),%xmm0
unpcklpd %xmm1,%xmm0
movapd 0x10(%rsp),%xmm4
addpd  %xmm0,%xmm4
movapd %xmm4,%xmm1
unpckhpd %xmm4,%xmm1
movapd %xmm4,%xmm2
subsd  %xmm1,%xmm2
movapd %xmm1,%xmm3
subsd  %xmm4,%xmm3
movapd %xmm1,%xmm0
cmpltsd %xmm4,%xmm0
andpd  %xmm0,%xmm3
andnpd %xmm2,%xmm0
orpd   %xmm3,%xmm0
maxsd  %xmm1,%xmm4
movapd %xmm4,0x10(%rsp)
call   1030 <exp@plt>
addsd  0x988(%rip),%xmm0
call   1040 <log@plt>
addsd  0x10(%rsp),%xmm0
mov    0x60(%rsp),%rax
movsd  %xmm0,(%rax)
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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