#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_TemporalOrderChange(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 node;
  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];
  }
  node = integerrng(1, N_node - 1);
  z_new[node] = z[node + 1];
  z_new[node + 1] = z[node];
  *changelength = 2;
  changelist[1] = node;
  changelist[2] = node + 1;
  for (j = node + 2; j <= N_node; j++) {
    if (zmat_new[node][j] == 1 || zmat_new[node + 1][j] == 1) {
      (*changelength)++;
      changelist[*changelength] = j;
    }
  }
  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_TemporalOrderChange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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     1249 <Mutation_TemporalOrderChange+0xf9>
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     1236 <Mutation_TemporalOrderChange+0xe6>
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    11f6 <Mutation_TemporalOrderChange+0xa6>
jmp    123b <Mutation_TemporalOrderChange+0xeb>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11b3 <Mutation_TemporalOrderChange+0x63>
mov    -0x24(%rbp),%esi
sub    $0x1,%esi
mov    $0x1,%edi
call   1060 <integerrng@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x4c(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x4c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1330 <Mutation_TemporalOrderChange+0x1e0>
mov    0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
je     1301 <Mutation_TemporalOrderChange+0x1b1>
mov    0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    131d <Mutation_TemporalOrderChange+0x1cd>
mov    -0x30(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x44(%rbp),%edx
mov    0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
movslq (%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1322 <Mutation_TemporalOrderChange+0x1d2>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12bc <Mutation_TemporalOrderChange+0x16c>
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,-0x58(%rbp)
movsd  -0x58(%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  -0x58(%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,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13dd <Mutation_TemporalOrderChange+0x28d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    13e7 <Mutation_TemporalOrderChange+0x297>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1070 <exp@plt>
mov    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    $0x0,%al
call   1030 <uniformrng@plt>
movsd  %xmm0,-0x68(%rbp)
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    14c7 <Mutation_TemporalOrderChange+0x377>
movsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     14c2 <Mutation_TemporalOrderChange+0x372>
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     14af <Mutation_TemporalOrderChange+0x35f>
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    146f <Mutation_TemporalOrderChange+0x31f>
jmp    14b4 <Mutation_TemporalOrderChange+0x364>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    142c <Mutation_TemporalOrderChange+0x2dc>
jmp    14c7 <Mutation_TemporalOrderChange+0x377>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mutation_TemporalOrderChange>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movsd  %xmm0,0x20(%rsp)
mov    %r9,%r12
mov    %r8d,%ebx
mov    %rcx,%r14
mov    %rsi,%r15
mov    %rdi,%r13
mov    0x88(%rsp),%eax
mov    0x80(%rsp),%rsi
mov    %rdx,0x28(%rsp)
movsd  (%rdx),%xmm0
lea    0x1c(%rsp),%rdi
mov    %eax,%edx
call   1050 <self_adj_index_search@plt>
mov    %rbx,0x8(%rsp)
test   %ebx,%ebx
jle    13a4 <Mutation_TemporalOrderChange+0x254>
mov    0x8(%rsp),%r11d
lea    0x1(%r11),%rcx
lea    -0x8(%r11),%rax
mov    %rax,(%rsp)
shr    $0x3,%rax
add    $0x1,%rax
mov    %r11d,%r9d
and    $0xfffffff8,%r9d
lea    0x1(%r9),%rdx
mov    %rdx,0x10(%rsp)
mov    %eax,%r10d
and    $0x3,%r10d
and    $0xfffffffffffffffc,%rax
mov    %rax,0x30(%rsp)
mov    $0x1,%ebp
jmp    11fd <Mutation_TemporalOrderChange+0xad>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbp
cmp    %rcx,%rbp
je     13a4 <Mutation_TemporalOrderChange+0x254>
mov    0x0(%r13,%rbp,4),%edx
mov    0x98(%rsp),%rax
mov    %edx,(%rax,%rbp,4)
movsd  (%r14,%rbp,8),%xmm0
mov    0xa8(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
mov    (%r15,%rbp,8),%rdx
mov    0xa0(%rsp),%rax
mov    (%rax,%rbp,8),%rdi
mov    $0x1,%r8d
cmp    $0x8,%r11d
jb     1330 <Mutation_TemporalOrderChange+0x1e0>
lea    0x4(%rdi),%rsi
lea    (%rdx,%rcx,4),%rbx
cmp    %rbx,%rsi
jae    1264 <Mutation_TemporalOrderChange+0x114>
lea    (%rdi,%rcx,4),%rsi
lea    0x4(%rdx),%rbx
mov    $0x1,%r8d
cmp    %rsi,%rbx
jb     1330 <Mutation_TemporalOrderChange+0x1e0>
cmpq   $0x18,(%rsp)
jae    126f <Mutation_TemporalOrderChange+0x11f>
xor    %esi,%esi
jmp    12da <Mutation_TemporalOrderChange+0x18a>
mov    0x30(%rsp),%rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movups 0x4(%rdx,%rsi,4),%xmm0
movups 0x14(%rdx,%rsi,4),%xmm1
movups %xmm0,0x4(%rdi,%rsi,4)
movups %xmm1,0x14(%rdi,%rsi,4)
movups 0x24(%rdx,%rsi,4),%xmm0
movups 0x34(%rdx,%rsi,4),%xmm1
movups %xmm0,0x24(%rdi,%rsi,4)
movups %xmm1,0x34(%rdi,%rsi,4)
movups 0x44(%rdx,%rsi,4),%xmm0
movups 0x54(%rdx,%rsi,4),%xmm1
movups %xmm0,0x44(%rdi,%rsi,4)
movups %xmm1,0x54(%rdi,%rsi,4)
movups 0x64(%rdx,%rsi,4),%xmm0
movups 0x74(%rdx,%rsi,4),%xmm1
movups %xmm0,0x64(%rdi,%rsi,4)
movups %xmm1,0x74(%rdi,%rsi,4)
add    $0x20,%rsi
add    $0xfffffffffffffffc,%rbx
jne    1280 <Mutation_TemporalOrderChange+0x130>
test   %r10,%r10
je     1318 <Mutation_TemporalOrderChange+0x1c8>
mov    %r10,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x0(,%rsi,4),%rax
or     $0x4,%rax
movups (%rdx,%rax,1),%xmm0
movups 0x10(%rdx,%rax,1),%xmm1
movups %xmm0,(%rdi,%rax,1)
movups %xmm1,0x10(%rdi,%rax,1)
add    $0x8,%rsi
add    $0xffffffffffffffff,%rbx
jne    12f0 <Mutation_TemporalOrderChange+0x1a0>
mov    0x10(%rsp),%r8
cmp    %r9,%r11
je     11f0 <Mutation_TemporalOrderChange+0xa0>
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%ebx
sub    %r8d,%ebx
mov    %r8,%rsi
not    %rsi
add    %rcx,%rsi
and    $0x3,%rbx
je     1362 <Mutation_TemporalOrderChange+0x212>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rdx,%r8,4),%eax
mov    %eax,(%rdi,%r8,4)
add    $0x1,%r8
add    $0xffffffffffffffff,%rbx
jne    1350 <Mutation_TemporalOrderChange+0x200>
cmp    $0x3,%rsi
jb     11f0 <Mutation_TemporalOrderChange+0xa0>
nopl   0x0(%rax)
mov    (%rdx,%r8,4),%eax
mov    %eax,(%rdi,%r8,4)
mov    0x4(%rdx,%r8,4),%eax
mov    %eax,0x4(%rdi,%r8,4)
mov    0x8(%rdx,%r8,4),%eax
mov    %eax,0x8(%rdi,%r8,4)
mov    0xc(%rdx,%r8,4),%eax
mov    %eax,0xc(%rdi,%r8,4)
add    $0x4,%r8
cmp    %r8,%rcx
jne    1370 <Mutation_TemporalOrderChange+0x220>
jmp    11f0 <Mutation_TemporalOrderChange+0xa0>
mov    0x78(%rsp),%rbp
mov    0x8(%rsp),%rbx
lea    -0x1(%rbx),%esi
mov    $0x1,%edi
call   1060 <integerrng@plt>
cltq
lea    0x1(%rax),%ecx
mov    0x4(%r13,%rax,4),%edx
mov    0x98(%rsp),%rsi
mov    %edx,(%rsi,%rax,4)
mov    0x0(%r13,%rax,4),%edx
mov    %edx,0x4(%rsi,%rax,4)
movl   $0x2,(%r12)
mov    0x70(%rsp),%r8
mov    %eax,0x4(%r8)
mov    %ecx,0x8(%r8)
lea    0x2(%rax),%edx
cmp    %ebx,%edx
jle    16bb <Mutation_TemporalOrderChange+0x56b>
mov    (%r12),%r9d
mov    0x98(%rsp),%rdi
mov    0xa0(%rsp),%rsi
mov    0x8(%rsp),%r12
mov    %r12d,%edx
mov    0xa8(%rsp),%rcx
call   1040 <cost@plt>
movsd  %xmm0,(%rsp)
lea    0x18(%rsp),%rdi
mov    0x80(%rsp),%rsi
mov    0x88(%rsp),%edx
call   1050 <self_adj_index_search@plt>
movslq 0x18(%rsp),%rax
movsd  0x0(%rbp,%rax,8),%xmm0
xorpd  0xbad(%rip),%xmm0
movsd  (%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movslq 0x1c(%rsp),%rax
addsd  0x0(%rbp,%rax,8),%xmm0
mov    0x28(%rsp),%rbp
movsd  0x0(%rbp),%xmm1
divsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
minsd  %xmm1,%xmm0
call   1070 <exp@plt>
mov    0x90(%rsp),%rbx
movsd  %xmm0,(%rbx)
xor    %eax,%eax
call   1030 <uniformrng@plt>
movsd  (%rbx),%xmm1
ucomisd %xmm0,%xmm1
jbe    16ac <Mutation_TemporalOrderChange+0x55c>
movsd  (%rsp),%xmm0
movsd  %xmm0,0x0(%rbp)
test   %r12d,%r12d
jle    16ac <Mutation_TemporalOrderChange+0x55c>
mov    %r12d,%eax
lea    0x1(%rax),%r8
lea    -0x8(%rax),%r10
mov    %r10,(%rsp)
shr    $0x3,%r10
add    $0x1,%r10
mov    %eax,%r11d
and    $0xfffffff8,%r11d
lea    0x1(%r11),%rcx
mov    %rcx,0x10(%rsp)
mov    %r10d,%r12d
and    $0x3,%r12d
and    $0xfffffffffffffffc,%r10
mov    $0x1,%ebp
jmp    150d <Mutation_TemporalOrderChange+0x3bd>
nopl   (%rax)
add    $0x1,%rbp
cmp    %r8,%rbp
je     16ac <Mutation_TemporalOrderChange+0x55c>
mov    0x98(%rsp),%rcx
mov    (%rcx,%rbp,4),%ecx
mov    %ecx,0x0(%r13,%rbp,4)
mov    0xa8(%rsp),%rcx
movsd  (%rcx,%rbp,8),%xmm0
movsd  %xmm0,(%r14,%rbp,8)
mov    0xa0(%rsp),%rcx
mov    (%rcx,%rbp,8),%rdx
mov    (%r15,%rbp,8),%rdi
mov    $0x1,%esi
cmp    $0x8,%eax
jb     1640 <Mutation_TemporalOrderChange+0x4f0>
lea    0x4(%rdi),%rcx
lea    (%rdx,%r8,4),%rsi
cmp    %rsi,%rcx
jae    1571 <Mutation_TemporalOrderChange+0x421>
lea    (%rdi,%r8,4),%rcx
lea    0x4(%rdx),%rbx
mov    $0x1,%esi
cmp    %rcx,%rbx
jb     1640 <Mutation_TemporalOrderChange+0x4f0>
cmpq   $0x18,(%rsp)
jae    157c <Mutation_TemporalOrderChange+0x42c>
xor    %esi,%esi
jmp    15ee <Mutation_TemporalOrderChange+0x49e>
mov    %r10,%rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups 0x4(%rdx,%rsi,4),%xmm0
movups 0x14(%rdx,%rsi,4),%xmm1
movups %xmm0,0x4(%rdi,%rsi,4)
movups %xmm1,0x14(%rdi,%rsi,4)
movups 0x24(%rdx,%rsi,4),%xmm0
movups 0x34(%rdx,%rsi,4),%xmm1
movups %xmm0,0x24(%rdi,%rsi,4)
movups %xmm1,0x34(%rdi,%rsi,4)
movups 0x44(%rdx,%rsi,4),%xmm0
movups 0x54(%rdx,%rsi,4),%xmm1
movups %xmm0,0x44(%rdi,%rsi,4)
movups %xmm1,0x54(%rdi,%rsi,4)
movupd 0x64(%rdx,%rsi,4),%xmm0
movupd 0x74(%rdx,%rsi,4),%xmm1
movupd %xmm0,0x64(%rdi,%rsi,4)
movupd %xmm1,0x74(%rdi,%rsi,4)
add    $0x20,%rsi
add    $0xfffffffffffffffc,%rbx
jne    1590 <Mutation_TemporalOrderChange+0x440>
test   %r12,%r12
je     162c <Mutation_TemporalOrderChange+0x4dc>
mov    %r12,%rcx
cs nopw 0x0(%rax,%rax,1)
lea    0x0(,%rsi,4),%rbx
or     $0x4,%rbx
movupd (%rdx,%rbx,1),%xmm0
movupd 0x10(%rdx,%rbx,1),%xmm1
movupd %xmm0,(%rdi,%rbx,1)
movupd %xmm1,0x10(%rdi,%rbx,1)
add    $0x8,%rsi
add    $0xffffffffffffffff,%rcx
jne    1600 <Mutation_TemporalOrderChange+0x4b0>
mov    0x10(%rsp),%rsi
cmp    %r11,%rax
je     1500 <Mutation_TemporalOrderChange+0x3b0>
nopw   0x0(%rax,%rax,1)
mov    %r8d,%ecx
sub    %esi,%ecx
mov    %rsi,%rbx
not    %rbx
add    %r8,%rbx
and    $0x3,%rcx
je     1672 <Mutation_TemporalOrderChange+0x522>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rdx,%rsi,4),%r9d
mov    %r9d,(%rdi,%rsi,4)
add    $0x1,%rsi
add    $0xffffffffffffffff,%rcx
jne    1660 <Mutation_TemporalOrderChange+0x510>
cmp    $0x3,%rbx
jb     1500 <Mutation_TemporalOrderChange+0x3b0>
nopl   0x0(%rax)
mov    (%rdx,%rsi,4),%ecx
mov    %ecx,(%rdi,%rsi,4)
mov    0x4(%rdx,%rsi,4),%ecx
mov    %ecx,0x4(%rdi,%rsi,4)
mov    0x8(%rdx,%rsi,4),%ecx
mov    %ecx,0x8(%rdi,%rsi,4)
mov    0xc(%rdx,%rsi,4),%ecx
mov    %ecx,0xc(%rdi,%rsi,4)
add    $0x4,%rsi
cmp    %rsi,%r8
jne    1680 <Mutation_TemporalOrderChange+0x530>
jmp    1500 <Mutation_TemporalOrderChange+0x3b0>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0xa0(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
add    $0x1,%rax
movslq %edx,%rdx
mov    0x8(%rsp),%rsi
neg    %esi
jmp    1701 <Mutation_TemporalOrderChange+0x5b1>
nopw   0x0(%rax,%rax,1)
movslq (%r12),%rdi
lea    0x1(%rdi),%rbx
mov    %ebx,(%r12)
mov    %edx,0x4(%r8,%rdi,4)
add    $0x1,%rdx
lea    (%rsi,%rdx,1),%edi
cmp    $0x1,%edi
je     13f9 <Mutation_TemporalOrderChange+0x2a9>
cmpl   $0x1,(%rcx,%rdx,4)
je     16e0 <Mutation_TemporalOrderChange+0x590>
mov    0xa0(%rsp),%rdi
mov    (%rdi,%rax,8),%rdi
cmpl   $0x1,(%rdi,%rdx,4)
je     16e0 <Mutation_TemporalOrderChange+0x590>
jmp    16f1 <Mutation_TemporalOrderChange+0x5a1>

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

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