#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 cost(int *, int **, int, double *, int *, int);
double exp(double);
int integerrng(int, int);
int /*<<< orphan*/ self_adj_index_search(int *, double, double *, int);
double uniformrng();
void Mutation_DoubleSkeletalChange(int *z, int **zmat, double *fz,
                                   double *fz_cond, int N_node,
                                   int *changelength, int *changelist,
                                   double *theta, double *grid_points,
                                   int grid_size, double temp,
                                   double *accpr_pop, int *z_new,
                                   int **zmat_new, double *fz_cond_new) {
  int k_old;
  int k_new;
  int j;
  int i;
  int nodeA1;
  int nodeA2;
  int nodeB1;
  int nodeB2;
  double fz_new;
  double rat;
  double un;
  self_adj_index_search(&k_old, *fz, grid_points, grid_size);
  for (i = 1; i <= N_node; i++) {
    z_new[i] = z[i];
    fz_cond_new[i] = fz_cond[i];
    for (j = 1; j <= N_node; j++)
      zmat_new[i][j] = zmat[i][j];
  }
  nodeA1 = 0;
  nodeA2 = 0;
  nodeB1 = 0;
  nodeB2 = 0;
  while (nodeA1 == nodeB1 && nodeA2 == nodeB2) {
    nodeA1 = integerrng(1, N_node);
    nodeA2 = integerrng(1, N_node - 1);
    if (nodeA2 >= nodeA1)
      nodeA2++;
    if (nodeA1 > nodeA2) {
      i = nodeA1;
      nodeA1 = nodeA2;
      nodeA2 = i;
    }
    nodeB1 = integerrng(1, N_node);
    nodeB2 = integerrng(1, N_node - 1);
    if (nodeB2 >= nodeB1)
      nodeB2++;
    if (nodeB1 > nodeB2) {
      i = nodeB1;
      nodeB1 = nodeB2;
      nodeB2 = i;
    }
  }
  zmat_new[nodeA1][nodeA2] = 1 - zmat_new[nodeA1][nodeA2];
  zmat_new[nodeB1][nodeB2] = 1 - zmat_new[nodeB1][nodeB2];
  if (nodeA2 == nodeB2) {
    *changelength = 1;
    changelist[1] = nodeA2;
  } else {
    *changelength = 2;
    changelist[1] = nodeA2;
    changelist[2] = nodeB2;
  }
  fz_new =
      cost(z_new, zmat_new, N_node, fz_cond_new, changelist, *changelength);
  self_adj_index_search(&k_new, fz_new, grid_points, grid_size);
  rat = -theta[k_new] - fz_new / temp + theta[k_old] + *fz / temp;
  *accpr_pop = exp((((0.0) < (rat)) ? (0.0) : (rat)));
  un = uniformrng();
  if (*accpr_pop > un) {
    *fz = fz_new;
    for (i = 1; i <= N_node; i++) {
      z[i] = z_new[i];
      fz_cond[i] = fz_cond_new[i];
      for (j = 1; j <= N_node; j++)
        zmat[i][j] = zmat_new[i][j];
    }
  }
}


x86 assembly (clang, -O0):
<Mutation_DoubleSkeletalChange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x20(%rbp),%rsi
mov    0x28(%rbp),%edx
lea    -0x3c(%rbp),%rdi
call   1050 <self_adj_index_search@plt>
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     124c <Mutation_DoubleSkeletalChange+0xfc>
mov    -0x8(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x38(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x48(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1239 <Mutation_DoubleSkeletalChange+0xe9>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x40(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11f9 <Mutation_DoubleSkeletalChange+0xa9>
jmp    123e <Mutation_DoubleSkeletalChange+0xee>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11b6 <Mutation_DoubleSkeletalChange+0x66>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x4c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x54(%rbp),%ecx
mov    %al,-0x71(%rbp)
jne    1285 <Mutation_DoubleSkeletalChange+0x135>
mov    -0x50(%rbp),%eax
cmp    -0x58(%rbp),%eax
sete   %al
mov    %al,-0x71(%rbp)
mov    -0x71(%rbp),%al
test   $0x1,%al
jne    1295 <Mutation_DoubleSkeletalChange+0x145>
jmp    1346 <Mutation_DoubleSkeletalChange+0x1f6>
mov    -0x24(%rbp),%esi
mov    $0x1,%edi
call   1060 <integerrng@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x24(%rbp),%esi
sub    $0x1,%esi
mov    $0x1,%edi
call   1060 <integerrng@plt>
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jl     12cd <Mutation_DoubleSkeletalChange+0x17d>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jle    12eb <Mutation_DoubleSkeletalChange+0x19b>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x24(%rbp),%esi
mov    $0x1,%edi
call   1060 <integerrng@plt>
mov    %eax,-0x54(%rbp)
mov    -0x24(%rbp),%esi
sub    $0x1,%esi
mov    $0x1,%edi
call   1060 <integerrng@plt>
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x54(%rbp),%eax
jl     1323 <Mutation_DoubleSkeletalChange+0x1d3>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x58(%rbp),%eax
jle    1341 <Mutation_DoubleSkeletalChange+0x1f1>
mov    -0x54(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x58(%rbp)
jmp    1268 <Mutation_DoubleSkeletalChange+0x118>
mov    0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    $0x1,%edx
sub    (%rax,%rcx,4),%edx
mov    0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
mov    $0x1,%edx
sub    (%rax,%rcx,4),%edx
mov    0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x50(%rbp),%eax
cmp    -0x58(%rbp),%eax
jne    13c1 <Mutation_DoubleSkeletalChange+0x271>
mov    -0x30(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x50(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
jmp    13df <Mutation_DoubleSkeletalChange+0x28f>
mov    -0x30(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x50(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x58(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    0x38(%rbp),%rdi
mov    0x40(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    0x48(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    -0x30(%rbp),%rax
mov    (%rax),%r9d
call   1040 <cost@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    0x20(%rbp),%rsi
mov    0x28(%rbp),%edx
lea    -0x40(%rbp),%rdi
call   1050 <self_adj_index_search@plt>
mov    0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x60(%rbp),%xmm1
divsd  -0x38(%rbp),%xmm1
subsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
divsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    148c <Mutation_DoubleSkeletalChange+0x33c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    1496 <Mutation_DoubleSkeletalChange+0x346>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1070 <exp@plt>
mov    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    $0x0,%al
call   1030 <uniformrng@plt>
movsd  %xmm0,-0x70(%rbp)
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    1576 <Mutation_DoubleSkeletalChange+0x426>
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1571 <Mutation_DoubleSkeletalChange+0x421>
mov    0x38(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x48(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     155e <Mutation_DoubleSkeletalChange+0x40e>
mov    0x40(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    151e <Mutation_DoubleSkeletalChange+0x3ce>
jmp    1563 <Mutation_DoubleSkeletalChange+0x413>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    14db <Mutation_DoubleSkeletalChange+0x38b>
jmp    1576 <Mutation_DoubleSkeletalChange+0x426>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mutation_DoubleSkeletalChange>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movsd  %xmm0,0x30(%rsp)
mov    %r9,0x10(%rsp)
mov    %r8d,%r12d
mov    %rcx,0x28(%rsp)
mov    %rsi,0x20(%rsp)
mov    %rdi,0x18(%rsp)
mov    0x88(%rsp),%eax
mov    0x80(%rsp),%rsi
mov    %rdx,(%rsp)
movsd  (%rdx),%xmm0
lea    0xc(%rsp),%rdi
mov    %eax,%edx
call   1050 <self_adj_index_search@plt>
test   %r12d,%r12d
jle    139c <Mutation_DoubleSkeletalChange+0x24c>
mov    %r12d,%r15d
lea    0x1(%r15),%rax
lea    -0x8(%r15),%r9
mov    %r9,%r10
shr    $0x3,%r10
add    $0x1,%r10
mov    %r15d,%r11d
and    $0xfffffff8,%r11d
lea    0x1(%r11),%r8
mov    %r10d,%r14d
and    $0x3,%r14d
and    $0xfffffffffffffffc,%r10
mov    $0x1,%r13d
jmp    11ed <Mutation_DoubleSkeletalChange+0x9d>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13
cmp    %rax,%r13
je     139c <Mutation_DoubleSkeletalChange+0x24c>
mov    0x18(%rsp),%rcx
mov    (%rcx,%r13,4),%ecx
mov    0x98(%rsp),%rdx
mov    %ecx,(%rdx,%r13,4)
mov    0x28(%rsp),%rcx
movsd  (%rcx,%r13,8),%xmm0
mov    0xa8(%rsp),%rcx
movsd  %xmm0,(%rcx,%r13,8)
mov    0x20(%rsp),%rcx
mov    (%rcx,%r13,8),%rbx
mov    0xa0(%rsp),%rcx
mov    (%rcx,%r13,8),%rdx
mov    $0x1,%edi
cmp    $0x8,%r15d
jb     1330 <Mutation_DoubleSkeletalChange+0x1e0>
lea    0x4(%rdx),%rcx
lea    (%rbx,%rax,4),%rsi
cmp    %rsi,%rcx
jae    1262 <Mutation_DoubleSkeletalChange+0x112>
lea    (%rdx,%rax,4),%rcx
lea    0x4(%rbx),%rsi
mov    $0x1,%edi
cmp    %rcx,%rsi
jb     1330 <Mutation_DoubleSkeletalChange+0x1e0>
cmp    $0x18,%r9
jae    126c <Mutation_DoubleSkeletalChange+0x11c>
xor    %edi,%edi
jmp    12da <Mutation_DoubleSkeletalChange+0x18a>
mov    %r10,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups 0x4(%rbx,%rdi,4),%xmm0
movups 0x14(%rbx,%rdi,4),%xmm1
movups %xmm0,0x4(%rdx,%rdi,4)
movups %xmm1,0x14(%rdx,%rdi,4)
movups 0x24(%rbx,%rdi,4),%xmm0
movups 0x34(%rbx,%rdi,4),%xmm1
movups %xmm0,0x24(%rdx,%rdi,4)
movups %xmm1,0x34(%rdx,%rdi,4)
movups 0x44(%rbx,%rdi,4),%xmm0
movups 0x54(%rbx,%rdi,4),%xmm1
movups %xmm0,0x44(%rdx,%rdi,4)
movups %xmm1,0x54(%rdx,%rdi,4)
movups 0x64(%rbx,%rdi,4),%xmm0
movups 0x74(%rbx,%rdi,4),%xmm1
movups %xmm0,0x64(%rdx,%rdi,4)
movups %xmm1,0x74(%rdx,%rdi,4)
add    $0x20,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1280 <Mutation_DoubleSkeletalChange+0x130>
test   %r14,%r14
je     1318 <Mutation_DoubleSkeletalChange+0x1c8>
mov    %r14,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x0(,%rdi,4),%rsi
or     $0x4,%rsi
movups (%rbx,%rsi,1),%xmm0
movups 0x10(%rbx,%rsi,1),%xmm1
movups %xmm0,(%rdx,%rsi,1)
movups %xmm1,0x10(%rdx,%rsi,1)
add    $0x8,%rdi
add    $0xffffffffffffffff,%rcx
jne    12f0 <Mutation_DoubleSkeletalChange+0x1a0>
mov    %r8,%rdi
cmp    %r11,%r15
je     11e0 <Mutation_DoubleSkeletalChange+0x90>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%ecx
sub    %edi,%ecx
mov    %rdi,%rsi
not    %rsi
add    %rax,%rsi
and    $0x3,%rcx
je     1360 <Mutation_DoubleSkeletalChange+0x210>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx,%rdi,4),%ebp
mov    %ebp,(%rdx,%rdi,4)
add    $0x1,%rdi
add    $0xffffffffffffffff,%rcx
jne    1350 <Mutation_DoubleSkeletalChange+0x200>
cmp    $0x3,%rsi
jb     11e0 <Mutation_DoubleSkeletalChange+0x90>
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rdi,4),%ecx
mov    %ecx,(%rdx,%rdi,4)
mov    0x4(%rbx,%rdi,4),%ecx
mov    %ecx,0x4(%rdx,%rdi,4)
mov    0x8(%rbx,%rdi,4),%ecx
mov    %ecx,0x8(%rdx,%rdi,4)
mov    0xc(%rbx,%rdi,4),%ecx
mov    %ecx,0xc(%rdx,%rdi,4)
add    $0x4,%rdi
cmp    %rdi,%rax
jne    1370 <Mutation_DoubleSkeletalChange+0x220>
jmp    11e0 <Mutation_DoubleSkeletalChange+0x90>
lea    -0x1(%r12),%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %r12d,%esi
call   1060 <integerrng@plt>
mov    %eax,%r13d
mov    $0x1,%edi
mov    %ebp,%esi
call   1060 <integerrng@plt>
xor    %r15d,%r15d
cmp    %r13d,%eax
setge  %r15b
add    %eax,%r15d
cmp    %r15d,%r13d
mov    %r15d,%r14d
cmovg  %r13d,%r14d
cmovle %r13d,%r15d
mov    $0x1,%edi
mov    %r12d,%esi
call   1060 <integerrng@plt>
mov    %eax,%ebx
mov    $0x1,%edi
mov    %ebp,%esi
call   1060 <integerrng@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setge  %cl
add    %eax,%ecx
cmp    %ecx,%ebx
mov    %ebx,%eax
cmovg  %ecx,%eax
cmovg  %ebx,%ecx
cmp    %eax,%r15d
jne    141f <Mutation_DoubleSkeletalChange+0x2cf>
cmp    %ecx,%r14d
je     13b0 <Mutation_DoubleSkeletalChange+0x260>
movslq %r15d,%rdx
mov    0xa0(%rsp),%rbx
mov    (%rbx,%rdx,8),%rdx
movslq %r14d,%rsi
mov    $0x1,%edi
mov    $0x1,%ebp
sub    (%rdx,%rsi,4),%ebp
mov    %ebp,(%rdx,%rsi,4)
cltq
mov    (%rbx,%rax,8),%rax
movslq %ecx,%rdx
sub    (%rax,%rdx,4),%edi
mov    %edi,(%rax,%rdx,4)
cmp    %ecx,%r14d
jne    1482 <Mutation_DoubleSkeletalChange+0x332>
mov    0x10(%rsp),%rax
movl   $0x1,(%rax)
mov    (%rsp),%r15
mov    0x88(%rsp),%ebp
mov    0x80(%rsp),%rbx
mov    0x90(%rsp),%r13
mov    0x70(%rsp),%r8
jmp    14b1 <Mutation_DoubleSkeletalChange+0x361>
mov    0x10(%rsp),%rax
movl   $0x2,(%rax)
mov    0x70(%rsp),%r8
mov    %ecx,0x8(%r8)
mov    (%rsp),%r15
mov    0x88(%rsp),%ebp
mov    0x80(%rsp),%rbx
mov    0x90(%rsp),%r13
mov    %r14d,0x4(%r8)
mov    (%rax),%r9d
mov    0x98(%rsp),%rdi
mov    0xa0(%rsp),%rsi
mov    %r12d,%edx
mov    0xa8(%rsp),%rcx
call   1040 <cost@plt>
movsd  %xmm0,(%rsp)
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1050 <self_adj_index_search@plt>
movslq 0x8(%rsp),%rax
mov    0x78(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
xorpd  0xafd(%rip),%xmm0
movsd  (%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movslq 0xc(%rsp),%rax
addsd  (%rcx,%rax,8),%xmm0
movsd  (%r15),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
minsd  %xmm1,%xmm0
call   1070 <exp@plt>
movsd  %xmm0,0x0(%r13)
xor    %eax,%eax
call   1030 <uniformrng@plt>
movsd  0x0(%r13),%xmm1
ucomisd %xmm0,%xmm1
jbe    175c <Mutation_DoubleSkeletalChange+0x60c>
movsd  (%rsp),%xmm0
movsd  %xmm0,(%r15)
test   %r12d,%r12d
jle    175c <Mutation_DoubleSkeletalChange+0x60c>
mov    %r12d,%r15d
lea    0x1(%r15),%rax
lea    -0x8(%r15),%r9
mov    %r9,%r10
shr    $0x3,%r10
add    $0x1,%r10
mov    %r15d,%r11d
and    $0xfffffff8,%r11d
lea    0x1(%r11),%r8
mov    %r10d,%r14d
and    $0x3,%r14d
and    $0xfffffffffffffffc,%r10
mov    $0x1,%r12d
jmp    15ad <Mutation_DoubleSkeletalChange+0x45d>
xchg   %ax,%ax
add    $0x1,%r12
cmp    %rax,%r12
je     175c <Mutation_DoubleSkeletalChange+0x60c>
mov    0x98(%rsp),%rcx
mov    (%rcx,%r12,4),%ecx
mov    0x18(%rsp),%rdx
mov    %ecx,(%rdx,%r12,4)
mov    0xa8(%rsp),%rcx
movsd  (%rcx,%r12,8),%xmm0
mov    0x28(%rsp),%rcx
movsd  %xmm0,(%rcx,%r12,8)
mov    0xa0(%rsp),%rcx
mov    (%rcx,%r12,8),%rbx
mov    0x20(%rsp),%rcx
mov    (%rcx,%r12,8),%rdx
mov    $0x1,%edi
cmp    $0x8,%r15d
jb     16f0 <Mutation_DoubleSkeletalChange+0x5a0>
lea    0x4(%rdx),%rcx
lea    (%rbx,%rax,4),%rsi
cmp    %rsi,%rcx
jae    1622 <Mutation_DoubleSkeletalChange+0x4d2>
lea    (%rdx,%rax,4),%rcx
lea    0x4(%rbx),%rsi
mov    $0x1,%edi
cmp    %rcx,%rsi
jb     16f0 <Mutation_DoubleSkeletalChange+0x5a0>
cmp    $0x18,%r9
jae    162c <Mutation_DoubleSkeletalChange+0x4dc>
xor    %edi,%edi
jmp    169e <Mutation_DoubleSkeletalChange+0x54e>
mov    %r10,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups 0x4(%rbx,%rdi,4),%xmm0
movups 0x14(%rbx,%rdi,4),%xmm1
movups %xmm0,0x4(%rdx,%rdi,4)
movups %xmm1,0x14(%rdx,%rdi,4)
movups 0x24(%rbx,%rdi,4),%xmm0
movups 0x34(%rbx,%rdi,4),%xmm1
movups %xmm0,0x24(%rdx,%rdi,4)
movups %xmm1,0x34(%rdx,%rdi,4)
movups 0x44(%rbx,%rdi,4),%xmm0
movups 0x54(%rbx,%rdi,4),%xmm1
movups %xmm0,0x44(%rdx,%rdi,4)
movups %xmm1,0x54(%rdx,%rdi,4)
movupd 0x64(%rbx,%rdi,4),%xmm0
movupd 0x74(%rbx,%rdi,4),%xmm1
movupd %xmm0,0x64(%rdx,%rdi,4)
movupd %xmm1,0x74(%rdx,%rdi,4)
add    $0x20,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1640 <Mutation_DoubleSkeletalChange+0x4f0>
test   %r14,%r14
je     16dc <Mutation_DoubleSkeletalChange+0x58c>
mov    %r14,%rcx
cs nopw 0x0(%rax,%rax,1)
lea    0x0(,%rdi,4),%rsi
or     $0x4,%rsi
movupd (%rbx,%rsi,1),%xmm0
movupd 0x10(%rbx,%rsi,1),%xmm1
movupd %xmm0,(%rdx,%rsi,1)
movupd %xmm1,0x10(%rdx,%rsi,1)
add    $0x8,%rdi
add    $0xffffffffffffffff,%rcx
jne    16b0 <Mutation_DoubleSkeletalChange+0x560>
mov    %r8,%rdi
cmp    %r11,%r15
je     15a0 <Mutation_DoubleSkeletalChange+0x450>
nopl   0x0(%rax,%rax,1)
mov    %eax,%ecx
sub    %edi,%ecx
mov    %rdi,%rsi
not    %rsi
add    %rax,%rsi
and    $0x3,%rcx
je     1720 <Mutation_DoubleSkeletalChange+0x5d0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx,%rdi,4),%ebp
mov    %ebp,(%rdx,%rdi,4)
add    $0x1,%rdi
add    $0xffffffffffffffff,%rcx
jne    1710 <Mutation_DoubleSkeletalChange+0x5c0>
cmp    $0x3,%rsi
jb     15a0 <Mutation_DoubleSkeletalChange+0x450>
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rdi,4),%ecx
mov    %ecx,(%rdx,%rdi,4)
mov    0x4(%rbx,%rdi,4),%ecx
mov    %ecx,0x4(%rdx,%rdi,4)
mov    0x8(%rbx,%rdi,4),%ecx
mov    %ecx,0x8(%rdx,%rdi,4)
mov    0xc(%rbx,%rdi,4),%ecx
mov    %ecx,0xc(%rdx,%rdi,4)
add    $0x4,%rdi
cmp    %rdi,%rax
jne    1730 <Mutation_DoubleSkeletalChange+0x5e0>
jmp    15a0 <Mutation_DoubleSkeletalChange+0x450>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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