#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 */
size_t ind_2(int, int);
int /*<<< orphan*/ printf(char *, ...);
void bswap(int kk, int n, int *nrepr, int med_given, int do_swap, int trace_lev,
           double *dysma, double *dysmb, double *beter, double *dys,
           double *sky, double s, double *obj) {
  int i, j, ij, k, h;
  --nrepr;
  --beter;
  --dysma;
  --dysmb;
  if (trace_lev)
    printf("pam()'s bswap(*, s=%g): ", s);
  s = s * 1.1 + 1.;
  for (i = 1; i <= n; ++i)
    dysma[i] = s;
  if (med_given) {
    if (trace_lev)
      printf("medoids given\n");
    for (i = 1; i <= n; ++i) {
      if (nrepr[i] == 1)
        for (j = 1; j <= n; ++j) {
          ij = ind_2(i, j);
          if (dysma[j] > dys[ij])
            dysma[j] = dys[ij];
        }
    }
  } else {
    if (trace_lev)
      printf("build %d medoids:\n", kk);
    for (k = 1; k <= kk; ++k) {
      int nmax = -1;
      double ammax, cmd;
      ammax = 0.;
      for (i = 1; i <= n; ++i) {
        if (nrepr[i] == 0) {
          beter[i] = 0.;
          for (j = 1; j <= n; ++j) {
            cmd = dysma[j] - dys[ind_2(i, j)];
            if (cmd > 0.)
              beter[i] += cmd;
          }
          if (ammax <= beter[i]) {
            ammax = beter[i];
            nmax = i;
          }
        }
      }
      nrepr[nmax] = 1;
      if (trace_lev >= 2)
        printf("    new repr. %d\n", nmax);
      for (j = 1; j <= n; ++j) {
        ij = ind_2(nmax, j);
        if (dysma[j] > dys[ij])
          dysma[j] = dys[ij];
      }
    }
  }
  if (trace_lev) {
    printf("  after build: medoids are");
    for (i = 1; i <= n; ++i)
      if (nrepr[i] == 1)
        printf(" %2d", i);
    if (trace_lev >= 3) {
      printf("\n  and min.dist dysma[1:n] are\n");
      for (i = 1; i <= n; ++i) {
        printf(" %6.3g", dysma[i]);
        if (i % 10 == 0)
          printf("\n");
      }
      if (n % 10 != 0)
        printf("\n");
    } else
      printf("\n");
  }
  *sky = 0.;
  for (j = 1; j <= n; ++j)
    *sky += dysma[j];
  obj[0] = *sky / n;
  if (do_swap && (kk > 1 || med_given)) {
    double dzsky;
    int hbest = -1, nbest = -1;
  L60:
    for (j = 1; j <= n; ++j) {
      dysma[j] = s;
      dysmb[j] = s;
      for (i = 1; i <= n; ++i) {
        if (nrepr[i]) {
          ij = ind_2(i, j);
          if (dysma[j] > dys[ij]) {
            dysmb[j] = dysma[j];
            dysma[j] = dys[ij];
          } else if (dysmb[j] > dys[ij]) {
            dysmb[j] = dys[ij];
          }
        }
      }
    }
    dzsky = 1.;
    for (h = 1; h <= n; ++h)
      if (!nrepr[h]) {
        for (i = 1; i <= n; ++i)
          if (nrepr[i]) {
            double dz = 0.;
            for (j = 1; j <= n; ++j) {
              int hj = ind_2(h, j);
              ij = ind_2(i, j);
              if (dys[ij] == dysma[j]) {
                double small = dysmb[j] > dys[hj] ? dys[hj] : dysmb[j];
                dz += (-dysma[j] + small);
              } else if (dys[hj] < dysma[j])
                dz += (-dysma[j] + dys[hj]);
            }
            if (dzsky > dz) {
              dzsky = dz;
              hbest = h;
              nbest = i;
            }
          }
      }
    if (dzsky < 0.) {
      if (trace_lev >= 2)
        printf("   swp new %d <-> %d old; decreasing diss. by %g\n", hbest,
               nbest, dzsky);
      nrepr[hbest] = 1;
      nrepr[nbest] = 0;
      *sky += dzsky;
      goto L60;
    }
  }
  obj[1] = *sky / n;
  return;
}


x86 assembly (clang, -O0):
<bswap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    0x20(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,0x20(%rbp)
mov    0x10(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,0x10(%rbp)
mov    0x18(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,0x18(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     11aa <bswap+0x8a>
movsd  -0x28(%rbp),%xmm0
lea    0xe6d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
movsd  0xe49(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe45(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ff <bswap+0xdf>
movsd  -0x28(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11d3 <bswap+0xb3>
cmpl   $0x0,-0x14(%rbp)
je     12d1 <bswap+0x1b1>
cmpl   $0x0,-0x1c(%rbp)
je     1221 <bswap+0x101>
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     12cc <bswap+0x1ac>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    12b9 <bswap+0x199>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     12b4 <bswap+0x194>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1030 <ind_2@plt>
mov    %eax,-0x34(%rbp)
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    12a1 <bswap+0x181>
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    12a6 <bswap+0x186>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    124d <bswap+0x12d>
jmp    12b9 <bswap+0x199>
jmp    12be <bswap+0x19e>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1228 <bswap+0x108>
jmp    14cf <bswap+0x3af>
cmpl   $0x0,-0x1c(%rbp)
je     12ec <bswap+0x1cc>
mov    -0x4(%rbp),%esi
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     14ca <bswap+0x3aa>
movl   $0xffffffff,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     141f <bswap+0x2ff>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    140c <bswap+0x2ec>
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     13d3 <bswap+0x2b3>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x28(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1030 <ind_2@plt>
movsd  -0x88(%rbp),%xmm0
ff
mov    %rax,%rcx
mov    -0x80(%rbp),%rax
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13c0 <bswap+0x2a0>
movsd  -0x50(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    13c5 <bswap+0x2a5>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    134a <bswap+0x22a>
movsd  -0x48(%rbp),%xmm1
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     1407 <bswap+0x2e7>
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    140c <bswap+0x2ec>
jmp    1411 <bswap+0x2f1>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1315 <bswap+0x1f5>
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
cmpl   $0x2,-0x1c(%rbp)
jl     1449 <bswap+0x329>
mov    -0x40(%rbp),%esi
lea    0xc09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     14b7 <bswap+0x397>
mov    -0x40(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1030 <ind_2@plt>
mov    %eax,-0x34(%rbp)
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    14a4 <bswap+0x384>
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14a9 <bswap+0x389>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1450 <bswap+0x330>
jmp    14bc <bswap+0x39c>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12f3 <bswap+0x1d3>
jmp    14cf <bswap+0x3af>
cmpl   $0x0,-0x1c(%rbp)
je     15e5 <bswap+0x4c5>
lea    0xb7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1530 <bswap+0x410>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    151d <bswap+0x3fd>
mov    -0x2c(%rbp),%esi
lea    0xb62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1522 <bswap+0x402>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    14ee <bswap+0x3ce>
cmpl   $0x3,-0x1c(%rbp)
jl     15d2 <bswap+0x4b2>
lea    0xb3c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     15ab <bswap+0x48b>
mov    0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xb2e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1598 <bswap+0x478>
lea    0xab8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    159d <bswap+0x47d>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    154f <bswap+0x42f>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     15cd <bswap+0x4ad>
lea    0xa83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    15e0 <bswap+0x4c0>
lea    0xa70(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    15e5 <bswap+0x4c5>
mov    0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     162a <bswap+0x50a>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x30(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15f7 <bswap+0x4d7>
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x0,-0x18(%rbp)
je     1a1b <bswap+0x8fb>
cmpl   $0x1,-0x4(%rbp)
jg     1661 <bswap+0x541>
cmpl   $0x0,-0x14(%rbp)
je     1a1b <bswap+0x8fb>
movl   $0xffffffff,-0x5c(%rbp)
movl   $0xffffffff,-0x60(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     179c <bswap+0x67c>
movsd  -0x28(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x28(%rbp),%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1789 <bswap+0x669>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1776 <bswap+0x656>
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1030 <ind_2@plt>
mov    %eax,-0x34(%rbp)
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1732 <bswap+0x612>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1771 <bswap+0x651>
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    176c <bswap+0x64c>
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1771 <bswap+0x651>
jmp    1776 <bswap+0x656>
jmp    177b <bswap+0x65b>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    16ad <bswap+0x58d>
jmp    178e <bswap+0x66e>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1676 <bswap+0x556>
movsd  0x864(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     19b1 <bswap+0x891>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    199e <bswap+0x87e>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1999 <bswap+0x879>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1986 <bswap+0x866>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     195b <bswap+0x83b>
mov    -0x3c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1030 <ind_2@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
call   1030 <ind_2@plt>
mov    %eax,-0x34(%rbp)
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    18e4 <bswap+0x7c4>
jp     18e4 <bswap+0x7c4>
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    188a <bswap+0x76a>
mov    0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    189f <bswap+0x77f>
mov    0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x78(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1948 <bswap+0x828>
mov    0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1943 <bswap+0x823>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1948 <bswap+0x828>
jmp    194d <bswap+0x82d>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1802 <bswap+0x6e2>
movsd  -0x58(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    1981 <bswap+0x861>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x60(%rbp)
jmp    1986 <bswap+0x866>
jmp    198b <bswap+0x86b>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    17d5 <bswap+0x6b5>
jmp    199e <bswap+0x87e>
jmp    19a3 <bswap+0x883>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    17b0 <bswap+0x690>
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    1a16 <bswap+0x8f6>
cmpl   $0x2,-0x1c(%rbp)
jl     19e2 <bswap+0x8c2>
mov    -0x5c(%rbp),%esi
mov    -0x60(%rbp),%edx
movsd  -0x58(%rbp),%xmm0
lea    0x6c9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x60(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
movsd  -0x58(%rbp),%xmm0
mov    0x30(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    166f <bswap+0x54f>
jmp    1a1b <bswap+0x8fb>
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8d,%ebx
mov    %ecx,%r13d
mov    %rdx,%r15
mov    %esi,%r12d
mov    %edi,%ebp
mov    %r9d,0xc(%rsp)
test   %r9d,%r9d
je     1184 <bswap+0x44>
lea    0xeab(%rip),%rdi
movaps %xmm0,0x40(%rsp)
movaps 0x40(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movapd 0x40(%rsp),%xmm0
mov    0x90(%rsp),%rdi
mulsd  0xe6c(%rip),%xmm0
addsd  0xe6c(%rip),%xmm0
mov    %r12d,%eax
mov    %rax,0x10(%rsp)
test   %r12d,%r12d
movapd %xmm0,0x40(%rsp)
jle    128f <bswap+0x14f>
mov    $0x1,%eax
cmp    $0x4,%r12d
jb     1273 <bswap+0x133>
mov    0x10(%rsp),%rax
and    $0xfffffffc,%eax
unpcklpd %xmm0,%xmm0
lea    -0x4(%rax),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0xc,%rdx
jae    11ec <bswap+0xac>
xor    %edx,%edx
jmp    1239 <bswap+0xf9>
and    $0xfffffffffffffffc,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd %xmm0,(%rdi,%rdx,8)
movupd %xmm0,0x10(%rdi,%rdx,8)
movupd %xmm0,0x20(%rdi,%rdx,8)
movupd %xmm0,0x30(%rdi,%rdx,8)
movupd %xmm0,0x40(%rdi,%rdx,8)
movupd %xmm0,0x50(%rdi,%rdx,8)
movupd %xmm0,0x60(%rdi,%rdx,8)
movupd %xmm0,0x70(%rdi,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%rsi
jne    1200 <bswap+0xc0>
test   %rcx,%rcx
je     1262 <bswap+0x122>
xchg   %ax,%ax
lea    0x0(,%rdx,8),%rsi
or     $0x8,%rsi
movupd %xmm0,-0x8(%rdi,%rsi,1)
movupd %xmm0,0x8(%rdi,%rsi,1)
add    $0x4,%rdx
add    $0xffffffffffffffff,%rcx
jne    1240 <bswap+0x100>
cmp    %rax,0x10(%rsp)
movapd 0x40(%rsp),%xmm0
je     128f <bswap+0x14f>
or     $0x1,%rax
mov    0x10(%rsp),%rcx
add    $0x1,%rcx
nopl   0x0(%rax)
movsd  %xmm0,-0x8(%rdi,%rax,8)
add    $0x1,%rax
cmp    %rax,%rcx
jne    1280 <bswap+0x140>
mov    0xb0(%rsp),%r14
test   %r13d,%r13d
mov    %r15,0x38(%rsp)
mov    %r12,0x30(%rsp)
mov    %ebx,0x2c(%rsp)
mov    %ebp,0x8(%rsp)
mov    %r13d,0x50(%rsp)
je     12e6 <bswap+0x1a6>
cmpl   $0x0,0xc(%rsp)
je     14aa <bswap+0x36a>
lea    0xe09(%rip),%rdi
call   1040 <puts@plt>
test   %r12d,%r12d
jg     14b3 <bswap+0x373>
lea    0xd7c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    157f <bswap+0x43f>
cmpl   $0x0,0xc(%rsp)
je     12fd <bswap+0x1bd>
lea    0xd3d(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %ebp,%ebp
jle    1525 <bswap+0x3e5>
mov    0xa0(%rsp),%r13
mov    0x30(%rsp),%rax
lea    0x1(%rax),%r12d
mov    $0x1,%r14d
jmp    1337 <bswap+0x1f7>
xchg   %ax,%ax
lea    0x1(%r14),%eax
cmp    0x8(%rsp),%r14d
mov    %eax,%r14d
mov    0x38(%rsp),%r15
je     1525 <bswap+0x3e5>
cmpl   $0x0,0x30(%rsp)
jle    1420 <bswap+0x2e0>
mov    $0xffffffff,%r15d
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
mov    $0x1,%ebp
jmp    136d <bswap+0x22d>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %r12,%rbp
je     1426 <bswap+0x2e6>
mov    0x38(%rsp),%rax
cmpl   $0x0,-0x4(%rax,%rbp,4)
jne    1360 <bswap+0x220>
movq   $0x0,-0x8(%r13,%rbp,8)
mov    $0x1,%ebx
jmp    1399 <bswap+0x259>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %rbx,%r12
je     13f0 <bswap+0x2b0>
mov    0x90(%rsp),%rax
movsd  -0x8(%rax,%rbx,8),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <ind_2@plt>
movsd  0x20(%rsp),%xmm0
mov    0xa8(%rsp),%rcx
subsd  (%rcx,%rax,8),%xmm0
ucomisd 0xc3f(%rip),%xmm0
jbe    1390 <bswap+0x250>
addsd  -0x8(%r13,%rbp,8),%xmm0
movsd  %xmm0,-0x8(%r13,%rbp,8)
jmp    1390 <bswap+0x250>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  -0x8(%r13,%rbp,8),%xmm0
ucomisd 0x18(%rsp),%xmm0
jb     1360 <bswap+0x220>
mov    %ebp,%r15d
movsd  %xmm0,0x18(%rsp)
jmp    1360 <bswap+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xffffffff,%r15d
movslq %r15d,%rax
mov    0x38(%rsp),%rcx
movl   $0x1,-0x4(%rcx,%rax,4)
cmpl   $0x2,0xc(%rsp)
jl     144e <bswap+0x30e>
lea    0xc00(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
cmpl   $0x0,0x30(%rsp)
mov    0x90(%rsp),%rbp
jle    1320 <bswap+0x1e0>
mov    $0x1,%ebx
jmp    147d <bswap+0x33d>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r12
je     1320 <bswap+0x1e0>
mov    %r15d,%edi
mov    %ebx,%esi
call   1050 <ind_2@plt>
movsd  -0x8(%rbp,%rbx,8),%xmm1
cltq
mov    0xa8(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
jbe    1470 <bswap+0x330>
movsd  %xmm0,-0x8(%rbp,%rbx,8)
jmp    1470 <bswap+0x330>
test   %r12d,%r12d
jle    1715 <bswap+0x5d5>
lea    0x1(%r12),%r14d
mov    $0x1,%ebx
jmp    14c9 <bswap+0x389>
nop
add    $0x1,%rbx
cmp    %r14,%rbx
je     1525 <bswap+0x3e5>
cmpl   $0x1,-0x4(%r15,%rbx,4)
jne    14c0 <bswap+0x380>
mov    $0x1,%ebp
jmp    14e9 <bswap+0x3a9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r14
je     14c0 <bswap+0x380>
mov    %ebx,%edi
mov    %ebp,%esi
call   1050 <ind_2@plt>
mov    0x90(%rsp),%rcx
movsd  -0x8(%rcx,%rbp,8),%xmm1
cltq
mov    0xa8(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
jbe    14e0 <bswap+0x3a0>
mov    0x90(%rsp),%rax
movsd  %xmm0,-0x8(%rax,%rbp,8)
jmp    14e0 <bswap+0x3a0>
cmpl   $0x0,0xc(%rsp)
mov    0x30(%rsp),%r12
mov    0x50(%rsp),%r13d
je     163c <bswap+0x4fc>
lea    0xb15(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
test   %r12d,%r12d
jle    157f <bswap+0x43f>
lea    0x1(%r12),%ebp
mov    $0x1,%ebx
lea    0xb13(%rip),%r14
jmp    1569 <bswap+0x429>
add    $0x1,%rbx
cmp    %rbx,%rbp
je     157f <bswap+0x43f>
cmpl   $0x1,-0x4(%r15,%rbx,4)
jne    1560 <bswap+0x420>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1560 <bswap+0x420>
cmpl   $0x3,0xc(%rsp)
jl     1632 <bswap+0x4f2>
lea    0xb1e(%rip),%rdi
call   1040 <puts@plt>
test   %r12d,%r12d
jle    160e <bswap+0x4ce>
mov    0x10(%rsp),%rax
lea    0x0(,%rax,8),%r15
mov    $0xffffffff,%r12d
mov    $0x1,%ebp
xor    %ebx,%ebx
lea    0xaba(%rip),%r14
jmp    15d0 <bswap+0x490>
xchg   %ax,%ax
add    $0x8,%rbx
add    $0xffffffff,%r12d
add    $0x1,%ebp
cmp    %rbx,%r15
je     160e <bswap+0x4ce>
mov    %ebp,%eax
mov    $0xcccccccd,%ecx
imul   %rcx,%rax
shr    $0x23,%rax
lea    (%rax,%rax,4),%r13d
add    %r13d,%r13d
mov    0x90(%rsp),%rax
movsd  (%rax,%rbx,1),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
add    %r12d,%r13d
jne    15c0 <bswap+0x480>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    15c0 <bswap+0x480>
mov    0x30(%rsp),%r12
imul   $0xcccccccd,%r12d,%eax
add    $0x19999998,%eax
ror    %eax
cmp    $0x19999999,%eax
mov    0x38(%rsp),%r15
mov    0x50(%rsp),%r13d
jb     163c <bswap+0x4fc>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xb0(%rsp),%r14
movq   $0x0,(%r14)
test   %r12d,%r12d
jle    167f <bswap+0x53f>
mov    0x10(%rsp),%rax
lea    -0x1(%rax),%rcx
mov    %eax,%ebp
and    $0x3,%ebp
cmp    $0x3,%rcx
jae    168c <bswap+0x54c>
mov    $0x1,%ecx
xorpd  %xmm0,%xmm0
mov    0x90(%rsp),%rsi
mov    0x2c(%rsp),%ebx
mov    0x8(%rsp),%edi
jmp    16ed <bswap+0x5ad>
xorpd  %xmm0,%xmm0
mov    0x2c(%rsp),%ebx
jmp    1720 <bswap+0x5e0>
and    $0xfffffffc,%eax
neg    %rax
mov    $0x1,%ecx
xorpd  %xmm0,%xmm0
mov    0x90(%rsp),%rsi
mov    0x2c(%rsp),%ebx
mov    0x8(%rsp),%edi
nopl   0x0(%rax,%rax,1)
addsd  -0x8(%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%r14)
addsd  (%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%r14)
addsd  0x8(%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%r14)
addsd  0x10(%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%r14)
lea    (%rax,%rcx,1),%rdx
add    $0x4,%rdx
add    $0x4,%rcx
cmp    $0x1,%rdx
jne    16b0 <bswap+0x570>
test   %rbp,%rbp
je     1724 <bswap+0x5e4>
lea    (%rsi,%rcx,8),%rcx
add    $0xfffffffffffffff8,%rcx
xor    %edx,%edx
nopl   0x0(%rax)
addsd  (%rcx,%rdx,8),%xmm0
movsd  %xmm0,(%r14)
add    $0x1,%rdx
cmp    %rdx,%rbp
jne    1700 <bswap+0x5c0>
jmp    1724 <bswap+0x5e4>
movq   $0x0,(%r14)
xorpd  %xmm0,%xmm0
mov    0x8(%rsp),%edi
test   %r13d,%r13d
setne  %al
xorps  %xmm1,%xmm1
cvtsi2sd %r12d,%xmm1
movsd  %xmm1,0x50(%rsp)
divsd  %xmm1,%xmm0
mov    0xb8(%rsp),%rcx
movsd  %xmm0,(%rcx)
cmp    $0x2,%edi
setge  %cl
test   %ebx,%ebx
movapd 0x40(%rsp),%xmm0
je     1a1b <bswap+0x8db>
or     %al,%cl
je     1a1b <bswap+0x8db>
test   %r12d,%r12d
jle    1a1b <bswap+0x8db>
lea    0x1(%r12),%r13d
movl   $0xffffffff,0x8(%rsp)
ff
movl   $0xffffffff,0x10(%rsp)
ff
jmp    17c5 <bswap+0x685>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq 0x10(%rsp),%rax
movl   $0x1,-0x4(%r15,%rax,4)
movslq 0x8(%rsp),%rax
movl   $0x0,-0x4(%r15,%rax,4)
movsd  0x18(%rsp),%xmm1
addsd  (%r14),%xmm1
movsd  %xmm1,(%r14)
test   %r12d,%r12d
jle    1a1b <bswap+0x8db>
mov    $0x1,%ebp
jmp    17e3 <bswap+0x6a3>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %r13,%rbp
movapd 0x40(%rsp),%xmm0
je     1890 <bswap+0x750>
mov    0x90(%rsp),%rax
movsd  %xmm0,-0x8(%rax,%rbp,8)
mov    0x98(%rsp),%rax
movsd  %xmm0,-0x8(%rax,%rbp,8)
mov    $0x1,%ebx
jmp    1832 <bswap+0x6f2>
cs nopw 0x0(%rax,%rax,1)
mov    0x98(%rsp),%rsi
movsd  %xmm1,-0x8(%rsi,%rbp,8)
movsd  (%rdx,%rax,8),%xmm0
movsd  %xmm0,-0x8(%rcx,%rbp,8)
add    $0x1,%rbx
cmp    %rbx,%r13
je     17d0 <bswap+0x690>
cmpl   $0x0,-0x4(%r15,%rbx,4)
je     1829 <bswap+0x6e9>
mov    %ebx,%edi
mov    %ebp,%esi
call   1050 <ind_2@plt>
mov    0x90(%rsp),%rcx
movsd  -0x8(%rcx,%rbp,8),%xmm1
cltq
mov    0xa8(%rsp),%rdx
movsd  (%rdx,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
ja     1810 <bswap+0x6d0>
mov    0x98(%rsp),%rax
movsd  -0x8(%rax,%rbp,8),%xmm1
ucomisd %xmm0,%xmm1
jbe    1829 <bswap+0x6e9>
mov    0x98(%rsp),%rax
movsd  %xmm0,-0x8(%rax,%rbp,8)
jmp    1829 <bswap+0x6e9>
nopw   0x0(%rax,%rax,1)
test   %r12d,%r12d
mov    0x90(%rsp),%rbp
jle    1a1b <bswap+0x8db>
mov    $0x1,%r12d
movsd  0x759(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
jmp    18cd <bswap+0x78d>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12
cmp    %r13,%r12
je     19d0 <bswap+0x890>
cmpl   $0x0,-0x4(%r15,%r12,4)
jne    18c0 <bswap+0x780>
mov    $0x1,%r14d
jmp    1920 <bswap+0x7e0>
nopl   (%rax)
movsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
ucomisd %xmm2,%xmm1
mov    0x10(%rsp),%eax
cmova  %r12d,%eax
mov    %eax,0x10(%rsp)
minsd  %xmm1,%xmm2
mov    0x8(%rsp),%eax
cmova  %r14d,%eax
mov    %eax,0x8(%rsp)
movsd  %xmm2,0x18(%rsp)
mov    0x38(%rsp),%r15
add    $0x1,%r14
cmp    %r13,%r14
je     18c0 <bswap+0x780>
cmpl   $0x0,-0x4(%r15,%r14,4)
je     1917 <bswap+0x7d7>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    $0x1,%r15d
jmp    197b <bswap+0x83b>
nopw   0x0(%rax,%rax,1)
movsd  (%rcx,%rax,8),%xmm1
mov    0x98(%rsp),%rax
minsd  -0x8(%rax,%r15,8),%xmm1
subsd  %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
movapd 0x40(%rsp),%xmm0
add    $0x1,%r15
cmp    %r15,%r13
je     18e0 <bswap+0x7a0>
mov    %r12d,%edi
mov    %r15d,%esi
call   1050 <ind_2@plt>
mov    %rax,%rbx
mov    %r14d,%edi
mov    %r15d,%esi
call   1050 <ind_2@plt>
cltq
mov    0xa8(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm1
movsd  -0x8(%rbp,%r15,8),%xmm0
movslq %ebx,%rax
ucomisd %xmm0,%xmm1
jne    19b5 <bswap+0x875>
jnp    1940 <bswap+0x800>
movsd  (%rcx,%rax,8),%xmm1
ucomisd %xmm1,%xmm0
ja     1954 <bswap+0x814>
jmp    1968 <bswap+0x828>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorpd  %xmm1,%xmm1
ucomisd 0x18(%rsp),%xmm1
mov    0x30(%rsp),%r12
mov    0xb0(%rsp),%r14
jbe    1a1b <bswap+0x8db>
cmpl   $0x2,0xc(%rsp)
jl     1790 <bswap+0x650>
lea    0x682(%rip),%rdi
mov    0x10(%rsp),%esi
mov    0x8(%rsp),%edx
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movapd 0x40(%rsp),%xmm0
jmp    1790 <bswap+0x650>
movsd  (%r14),%xmm0
divsd  0x50(%rsp),%xmm0
mov    0xb8(%rsp),%rax
movsd  %xmm0,0x8(%rax)
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"pam()'s bswap(*, s=%g): \00"
@.str.1 = [15 x i8] c"medoids given\0A\00"
@.str.2 = [19 x i8] c"build %d medoids:\0A\00"
@.str.3 = [18 x i8] c" new repr. %d\0A\00"
@.str.4 = [27 x i8] c" after build: medoids are\00"
@.str.5 = [5 x i8] c" %2d\00"
@.str.6 = [32 x i8] c"\0A and min.dist dysma[1:n] are\0A\00"
@.str.7 = [7 x i8] c" %6.3g\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [50 x i8] c" swp new %d <-> %d old; decreasing diss. by %g\0A\00"
define void @bswap(i32 %0, i32 %1, i32* %2, i32 %3, i32 %4, i32 %5, double* %6, double* %7, double* %8, double* %9, double* %10, double %11, double* %12) {
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double
%26 = alloca double*
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca i32
%37 = alloca i32
%38 = alloca double
%39 = alloca i32
%40 = alloca double
store i32 %0, i32* %14
store i32 %1, i32* %15
store i32* %2, i32** %16
store i32 %3, i32* %17
store i32 %4, i32* %18
store i32 %5, i32* %19
store double* %6, double** %20
store double* %7, double** %21
store double* %8, double** %22
store double* %9, double** %23
store double* %10, double** %24
store double %11, double* %25
store double* %12, double** %26
%41 = load i32*, i32** %16
%42 = getelementptr inbounds i32, i32* %41, i32 -1
store i32* %42, i32** %16
%43 = load double*, double** %22
%44 = getelementptr inbounds double, double* %43, i32 -1
store double* %44, double** %22
%45 = load double*, double** %20
%46 = getelementptr inbounds double, double* %45, i32 -1
store double* %46, double** %20
%47 = load double*, double** %21
%48 = getelementptr inbounds double, double* %47, i32 -1
store double* %48, double** %21
%49 = load i32, i32* %19
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %13
%52 = load double, double* %25
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %52)
br label %54
54: ; preds = %51, %13
%55 = load double, double* %25
%56 = call double @llvm.fmuladd.f64(double %55, double 1.100000e+00, double 1.000000e+00)
store double %56, double* %25
store i32 1, i32* %27
br label %57
57: ; preds = %67, %54
%58 = load i32, i32* %27
%59 = load i32, i32* %15
%60 = icmp sle i32 %58, %59
br i1 %60, label %61, label %70
61: ; preds = %57
%62 = load double, double* %25
%63 = load double*, double** %20
%64 = load i32, i32* %27
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
store double %62, double* %66
br label %67
67: ; preds = %61
%68 = load i32, i32* %27
%69 = add nsw i32 %68, 1
store i32 %69, i32* %27
br label %57
70: ; preds = %57
%71 = load i32, i32* %17
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %131
73: ; preds = %70
%74 = load i32, i32* %19
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %78
76: ; preds = %73
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %78
78: ; preds = %76, %73
store i32 1, i32* %27
br label %79
79: ; preds = %127, %78
%80 = load i32, i32* %27
%81 = load i32, i32* %15
%82 = icmp sle i32 %80, %81
br i1 %82, label %83, label %130
83: ; preds = %79
%84 = load i32*, i32** %16
%85 = load i32, i32* %27
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i32, i32* %84, i64 %86
%88 = load i32, i32* %87
%89 = icmp eq i32 %88, 1
br i1 %89, label %90, label %126
90: ; preds = %83
store i32 1, i32* %28
br label %91
91: ; preds = %122, %90
%92 = load i32, i32* %28
%93 = load i32, i32* %15
%94 = icmp sle i32 %92, %93
br i1 %94, label %95, label %125
95: ; preds = %91
%96 = load i32, i32* %27
%97 = load i32, i32* %28
%98 = call i64 @ind_2(i32 %96, i32 %97)
%99 = trunc i64 %98 to i32
store i32 %99, i32* %29
%100 = load double*, double** %20
%101 = load i32, i32* %28
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %100, i64 %102
%104 = load double, double* %103
%105 = load double*, double** %23
%106 = load i32, i32* %29
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
%110 = fcmp ogt double %104, %109
br i1 %110, label %111, label %121
111: ; preds = %95
%112 = load double*, double** %23
%113 = load i32, i32* %29
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = load double*, double** %20
%118 = load i32, i32* %28
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %117, i64 %119
store double %116, double* %120
br label %121
121: ; preds = %111, %95
br label %122
122: ; preds = %121
%123 = load i32, i32* %28
%124 = add nsw i32 %123, 1
store i32 %124, i32* %28
br label %91
125: ; preds = %91
br label %126
126: ; preds = %125, %83
br label %127
127: ; preds = %126
%128 = load i32, i32* %27
%129 = add nsw i32 %128, 1
store i32 %129, i32* %27
br label %79
130: ; preds = %79
br label %260
131: ; preds = %70
%132 = load i32, i32* %19
%133 = icmp ne i32 %132, 0
br i1 %133, label %134, label %137
134: ; preds = %131
%135 = load i32, i32* %14
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %135)
br label %137
137: ; preds = %134, %131
store i32 1, i32* %30
br label %138
138: ; preds = %256, %137
%139 = load i32, i32* %30
%140 = load i32, i32* %14
%141 = icmp sle i32 %139, %140
br i1 %141, label %142, label %259
142: ; preds = %138
store i32 -1, i32* %32
store double 0.000000e+00, double* %33
store i32 1, i32* %27
br label %143
143: ; preds = %207, %142
%144 = load i32, i32* %27
%145 = load i32, i32* %15
%146 = icmp sle i32 %144, %145
br i1 %146, label %147, label %210
147: ; preds = %143
%148 = load i32*, i32** %16
%149 = load i32, i32* %27
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %148, i64 %150
%152 = load i32, i32* %151
%153 = icmp eq i32 %152, 0
br i1 %153, label %154, label %206
154: ; preds = %147
%155 = load double*, double** %22
%156 = load i32, i32* %27
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %155, i64 %157
store double 0.000000e+00, double* %158
store i32 1, i32* %28
br label %159
159: ; preds = %187, %154
%160 = load i32, i32* %28
%161 = load i32, i32* %15
%162 = icmp sle i32 %160, %161
br i1 %162, label %163, label %190
163: ; preds = %159
%164 = load double*, double** %20
%165 = load i32, i32* %28
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %164, i64 %166
%168 = load double, double* %167
%169 = load double*, double** %23
%170 = load i32, i32* %27
%171 = load i32, i32* %28
%172 = call i64 @ind_2(i32 %170, i32 %171)
%173 = getelementptr inbounds double, double* %169, i64 %172
%174 = load double, double* %173
%175 = fsub double %168, %174
store double %175, double* %34
%176 = load double, double* %34
%177 = fcmp ogt double %176, 0.000000e+00
br i1 %177, label %178, label %186
178: ; preds = %163
%179 = load double, double* %34
%180 = load double*, double** %22
%181 = load i32, i32* %27
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds double, double* %180, i64 %182
%184 = load double, double* %183
%185 = fadd double %184, %179
store double %185, double* %183
br label %186
186: ; preds = %178, %163
br label %187
187: ; preds = %186
%188 = load i32, i32* %28
%189 = add nsw i32 %188, 1
store i32 %189, i32* %28
br label %159
190: ; preds = %159
%191 = load double, double* %33
%192 = load double*, double** %22
%193 = load i32, i32* %27
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds double, double* %192, i64 %194
%196 = load double, double* %195
%197 = fcmp ole double %191, %196
br i1 %197, label %198, label %205
198: ; preds = %190
%199 = load double*, double** %22
%200 = load i32, i32* %27
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %199, i64 %201
%203 = load double, double* %202
store double %203, double* %33
%204 = load i32, i32* %27
store i32 %204, i32* %32
br label %205
205: ; preds = %198, %190
br label %206
206: ; preds = %205, %147
br label %207
207: ; preds = %206
%208 = load i32, i32* %27
%209 = add nsw i32 %208, 1
store i32 %209, i32* %27
br label %143
210: ; preds = %143
%211 = load i32*, i32** %16
%212 = load i32, i32* %32
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds i32, i32* %211, i64 %213
store i32 1, i32* %214
%215 = load i32, i32* %19
%216 = icmp sge i32 %215, 2
br i1 %216, label %217, label %220
217: ; preds = %210
%218 = load i32, i32* %32
%219 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %218)
br label %220
220: ; preds = %217, %210
store i32 1, i32* %28
br label %221
221: ; preds = %252, %220
%222 = load i32, i32* %28
%223 = load i32, i32* %15
%224 = icmp sle i32 %222, %223
br i1 %224, label %225, label %255
225: ; preds = %221
%226 = load i32, i32* %32
%227 = load i32, i32* %28
%228 = call i64 @ind_2(i32 %226, i32 %227)
%229 = trunc i64 %228 to i32
store i32 %229, i32* %29
%230 = load double*, double** %20
%231 = load i32, i32* %28
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %230, i64 %232
%234 = load double, double* %233
%235 = load double*, double** %23
%236 = load i32, i32* %29
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds double, double* %235, i64 %237
%239 = load double, double* %238
%240 = fcmp ogt double %234, %239
br i1 %240, label %241, label %251
241: ; preds = %225
%242 = load double*, double** %23
%243 = load i32, i32* %29
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %242, i64 %244
%246 = load double, double* %245
%247 = load double*, double** %20
%248 = load i32, i32* %28
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double, double* %247, i64 %249
store double %246, double* %250
br label %251
251: ; preds = %241, %225
br label %252
252: ; preds = %251
%253 = load i32, i32* %28
%254 = add nsw i32 %253, 1
store i32 %254, i32* %28
br label %221
255: ; preds = %221
br label %256
256: ; preds = %255
%257 = load i32, i32* %30
%258 = add nsw i32 %257, 1
store i32 %258, i32* %30
br label %138
259: ; preds = %138
br label %260
260: ; preds = %259, %130
%261 = load i32, i32* %19
%262 = icmp ne i32 %261, 0
br i1 %262, label %263, label %318
263: ; preds = %260
%264 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %27
br label %265
265: ; preds = %280, %263
%266 = load i32, i32* %27
%267 = load i32, i32* %15
%268 = icmp sle i32 %266, %267
br i1 %268, label %269, label %283
269: ; preds = %265
%270 = load i32*, i32** %16
%271 = load i32, i32* %27
%272 = sext i32 %271 to i64
%273 = getelementptr inbounds i32, i32* %270, i64 %272
%274 = load i32, i32* %273
%275 = icmp eq i32 %274, 1
br i1 %275, label %276, label %279
276: ; preds = %269
%277 = load i32, i32* %27
%278 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %277)
br label %279
279: ; preds = %276, %269
br label %280
280: ; preds = %279
%281 = load i32, i32* %27
%282 = add nsw i32 %281, 1
store i32 %282, i32* %27
br label %265
283: ; preds = %265
%284 = load i32, i32* %19
%285 = icmp sge i32 %284, 3
br i1 %285, label %286, label %315
286: ; preds = %283
%287 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %27
br label %288
288: ; preds = %305, %286
%289 = load i32, i32* %27
%290 = load i32, i32* %15
%291 = icmp sle i32 %289, %290
br i1 %291, label %292, label %308
292: ; preds = %288
%293 = load double*, double** %20
%294 = load i32, i32* %27
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double, double* %293, i64 %295
%297 = load double, double* %296
%298 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), double %297)
%299 = load i32, i32* %27
%300 = srem i32 %299, 10
%301 = icmp eq i32 %300, 0
br i1 %301, label %302, label %304
302: ; preds = %292
%303 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %304
304: ; preds = %302, %292
br label %305
305: ; preds = %304
%306 = load i32, i32* %27
%307 = add nsw i32 %306, 1
store i32 %307, i32* %27
br label %288
308: ; preds = %288
%309 = load i32, i32* %15
%310 = srem i32 %309, 10
%311 = icmp ne i32 %310, 0
br i1 %311, label %312, label %314
312: ; preds = %308
%313 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %314
314: ; preds = %312, %308
br label %317
315: ; preds = %283
%316 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %317
317: ; preds = %315, %314
br label %318
318: ; preds = %317, %260
%319 = load double*, double** %24
store double 0.000000e+00, double* %319
store i32 1, i32* %28
br label %320
320: ; preds = %333, %318
%321 = load i32, i32* %28
%322 = load i32, i32* %15
%323 = icmp sle i32 %321, %322
br i1 %323, label %324, label %336
324: ; preds = %320
%325 = load double*, double** %20
%326 = load i32, i32* %28
%327 = sext i32 %326 to i64
%328 = getelementptr inbounds double, double* %325, i64 %327
%329 = load double, double* %328
%330 = load double*, double** %24
%331 = load double, double* %330
%332 = fadd double %331, %329
store double %332, double* %330
br label %333
333: ; preds = %324
%334 = load i32, i32* %28
%335 = add nsw i32 %334, 1
store i32 %335, i32* %28
br label %320
336: ; preds = %320
%337 = load double*, double** %24
%338 = load double, double* %337
%339 = load i32, i32* %15
%340 = sitofp i32 %339 to double
%341 = fdiv double %338, %340
%342 = load double*, double** %26
%343 = getelementptr inbounds double, double* %342, i64 0
store double %341, double* %343
%344 = load i32, i32* %18
%345 = icmp ne i32 %344, 0
br i1 %345, label %346, label %607
346: ; preds = %336
%347 = load i32, i32* %14
%348 = icmp sgt i32 %347, 1
br i1 %348, label %352, label %349
349: ; preds = %346
%350 = load i32, i32* %17
%351 = icmp ne i32 %350, 0
br i1 %351, label %352, label %607
352: ; preds = %349, %346
store i32 -1, i32* %36
store i32 -1, i32* %37
br label %353
353: ; preds = %593, %352
store i32 1, i32* %28
br label %354
354: ; preds = %444, %353
%355 = load i32, i32* %28
%356 = load i32, i32* %15
%357 = icmp sle i32 %355, %356
br i1 %357, label %358, label %447
358: ; preds = %354
%359 = load double, double* %25
%360 = load double*, double** %20
%361 = load i32, i32* %28
%362 = sext i32 %361 to i64
%363 = getelementptr inbounds double, double* %360, i64 %362
store double %359, double* %363
%364 = load double, double* %25
%365 = load double*, double** %21
%366 = load i32, i32* %28
%367 = sext i32 %366 to i64
%368 = getelementptr inbounds double, double* %365, i64 %367
store double %364, double* %368
store i32 1, i32* %27
br label %369
369: ; preds = %440, %358
%370 = load i32, i32* %27
%371 = load i32, i32* %15
%372 = icmp sle i32 %370, %371
br i1 %372, label %373, label %443
373: ; preds = %369
%374 = load i32*, i32** %16
%375 = load i32, i32* %27
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds i32, i32* %374, i64 %376
%378 = load i32, i32* %377
%379 = icmp ne i32 %378, 0
br i1 %379, label %380, label %439
380: ; preds = %373
%381 = load i32, i32* %27
%382 = load i32, i32* %28
%383 = call i64 @ind_2(i32 %381, i32 %382)
%384 = trunc i64 %383 to i32
store i32 %384, i32* %29
%385 = load double*, double** %20
%386 = load i32, i32* %28
%387 = sext i32 %386 to i64
%388 = getelementptr inbounds double, double* %385, i64 %387
%389 = load double, double* %388
%390 = load double*, double** %23
%391 = load i32, i32* %29
%392 = sext i32 %391 to i64
%393 = getelementptr inbounds double, double* %390, i64 %392
%394 = load double, double* %393
%395 = fcmp ogt double %389, %394
br i1 %395, label %396, label %415
396: ; preds = %380
%397 = load double*, double** %20
%398 = load i32, i32* %28
%399 = sext i32 %398 to i64
%400 = getelementptr inbounds double, double* %397, i64 %399
%401 = load double, double* %400
%402 = load double*, double** %21
%403 = load i32, i32* %28
%404 = sext i32 %403 to i64
%405 = getelementptr inbounds double, double* %402, i64 %404
store double %401, double* %405
%406 = load double*, double** %23
%407 = load i32, i32* %29
%408 = sext i32 %407 to i64
%409 = getelementptr inbounds double, double* %406, i64 %408
%410 = load double, double* %409
%411 = load double*, double** %20
%412 = load i32, i32* %28
%413 = sext i32 %412 to i64
%414 = getelementptr inbounds double, double* %411, i64 %413
store double %410, double* %414
br label %438
415: ; preds = %380
%416 = load double*, double** %21
%417 = load i32, i32* %28
%418 = sext i32 %417 to i64
%419 = getelementptr inbounds double, double* %416, i64 %418
%420 = load double, double* %419
%421 = load double*, double** %23
%422 = load i32, i32* %29
%423 = sext i32 %422 to i64
%424 = getelementptr inbounds double, double* %421, i64 %423
%425 = load double, double* %424
%426 = fcmp ogt double %420, %425
br i1 %426, label %427, label %437
427: ; preds = %415
%428 = load double*, double** %23
%429 = load i32, i32* %29
%430 = sext i32 %429 to i64
%431 = getelementptr inbounds double, double* %428, i64 %430
%432 = load double, double* %431
%433 = load double*, double** %21
%434 = load i32, i32* %28
%435 = sext i32 %434 to i64
%436 = getelementptr inbounds double, double* %433, i64 %435
store double %432, double* %436
br label %437
437: ; preds = %427, %415
br label %438
438: ; preds = %437, %396
br label %439
439: ; preds = %438, %373
br label %440
440: ; preds = %439
%441 = load i32, i32* %27
%442 = add nsw i32 %441, 1
store i32 %442, i32* %27
br label %369
443: ; preds = %369
br label %444
444: ; preds = %443
%445 = load i32, i32* %28
%446 = add nsw i32 %445, 1
store i32 %446, i32* %28
br label %354
447: ; preds = %354
store double 1.000000e+00, double* %35
store i32 1, i32* %31
br label %448
448: ; preds = %579, %447
%449 = load i32, i32* %31
%450 = load i32, i32* %15
%451 = icmp sle i32 %449, %450
br i1 %451, label %452, label %582
452: ; preds = %448
%453 = load i32*, i32** %16
%454 = load i32, i32* %31
%455 = sext i32 %454 to i64
%456 = getelementptr inbounds i32, i32* %453, i64 %455
%457 = load i32, i32* %456
%458 = icmp ne i32 %457, 0
br i1 %458, label %578, label %459
459: ; preds = %452
store i32 1, i32* %27
br label %460
460: ; preds = %574, %459
%461 = load i32, i32* %27
%462 = load i32, i32* %15
%463 = icmp sle i32 %461, %462
br i1 %463, label %464, label %577
464: ; preds = %460
%465 = load i32*, i32** %16
%466 = load i32, i32* %27
%467 = sext i32 %466 to i64
%468 = getelementptr inbounds i32, i32* %465, i64 %467
%469 = load i32, i32* %468
%470 = icmp ne i32 %469, 0
br i1 %470, label %471, label %573
471: ; preds = %464
store double 0.000000e+00, double* %38
store i32 1, i32* %28
br label %472
472: ; preds = %561, %471
%473 = load i32, i32* %28
%474 = load i32, i32* %15
%475 = icmp sle i32 %473, %474
br i1 %475, label %476, label %564
476: ; preds = %472
%477 = load i32, i32* %31
%478 = load i32, i32* %28
%479 = call i64 @ind_2(i32 %477, i32 %478)
%480 = trunc i64 %479 to i32
store i32 %480, i32* %39
%481 = load i32, i32* %27
%482 = load i32, i32* %28
%483 = call i64 @ind_2(i32 %481, i32 %482)
%484 = trunc i64 %483 to i32
store i32 %484, i32* %29
%485 = load double*, double** %23
%486 = load i32, i32* %29
%487 = sext i32 %486 to i64
%488 = getelementptr inbounds double, double* %485, i64 %487
%489 = load double, double* %488
%490 = load double*, double** %20
%491 = load i32, i32* %28
%492 = sext i32 %491 to i64
%493 = getelementptr inbounds double, double* %490, i64 %492
%494 = load double, double* %493
%495 = fcmp oeq double %489, %494
br i1 %495, label %496, label %532
496: ; preds = %476
%497 = load double*, double** %21
%498 = load i32, i32* %28
%499 = sext i32 %498 to i64
%500 = getelementptr inbounds double, double* %497, i64 %499
%501 = load double, double* %500
%502 = load double*, double** %23
%503 = load i32, i32* %39
%504 = sext i32 %503 to i64
%505 = getelementptr inbounds double, double* %502, i64 %504
%506 = load double, double* %505
%507 = fcmp ogt double %501, %506
br i1 %507, label %508, label %514
508: ; preds = %496
%509 = load double*, double** %23
%510 = load i32, i32* %39
%511 = sext i32 %510 to i64
%512 = getelementptr inbounds double, double* %509, i64 %511
%513 = load double, double* %512
br label %520
514: ; preds = %496
%515 = load double*, double** %21
%516 = load i32, i32* %28
%517 = sext i32 %516 to i64
%518 = getelementptr inbounds double, double* %515, i64 %517
%519 = load double, double* %518
br label %520
520: ; preds = %514, %508
%521 = phi double [ %513, %508 ], [ %519, %514 ]
store double %521, double* %40
%522 = load double*, double** %20
%523 = load i32, i32* %28
%524 = sext i32 %523 to i64
%525 = getelementptr inbounds double, double* %522, i64 %524
%526 = load double, double* %525
%527 = fneg double %526
%528 = load double, double* %40
%529 = fadd double %527, %528
%530 = load double, double* %38
%531 = fadd double %530, %529
store double %531, double* %38
br label %560
532: ; preds = %476
%533 = load double*, double** %23
%534 = load i32, i32* %39
%535 = sext i32 %534 to i64
%536 = getelementptr inbounds double, double* %533, i64 %535
%537 = load double, double* %536
%538 = load double*, double** %20
%539 = load i32, i32* %28
%540 = sext i32 %539 to i64
%541 = getelementptr inbounds double, double* %538, i64 %540
%542 = load double, double* %541
%543 = fcmp olt double %537, %542
br i1 %543, label %544, label %559
544: ; preds = %532
%545 = load double*, double** %20
%546 = load i32, i32* %28
%547 = sext i32 %546 to i64
%548 = getelementptr inbounds double, double* %545, i64 %547
%549 = load double, double* %548
%550 = fneg double %549
%551 = load double*, double** %23
%552 = load i32, i32* %39
%553 = sext i32 %552 to i64
%554 = getelementptr inbounds double, double* %551, i64 %553
%555 = load double, double* %554
%556 = fadd double %550, %555
%557 = load double, double* %38
%558 = fadd double %557, %556
store double %558, double* %38
br label %559
559: ; preds = %544, %532
br label %560
560: ; preds = %559, %520
br label %561
561: ; preds = %560
%562 = load i32, i32* %28
%563 = add nsw i32 %562, 1
store i32 %563, i32* %28
br label %472
564: ; preds = %472
%565 = load double, double* %35
%566 = load double, double* %38
%567 = fcmp ogt double %565, %566
br i1 %567, label %568, label %572
568: ; preds = %564
%569 = load double, double* %38
store double %569, double* %35
%570 = load i32, i32* %31
store i32 %570, i32* %36
%571 = load i32, i32* %27
store i32 %571, i32* %37
br label %572
572: ; preds = %568, %564
br label %573
573: ; preds = %572, %464
br label %574
574: ; preds = %573
%575 = load i32, i32* %27
%576 = add nsw i32 %575, 1
store i32 %576, i32* %27
br label %460
577: ; preds = %460
br label %578
578: ; preds = %577, %452
br label %579
579: ; preds = %578
%580 = load i32, i32* %31
%581 = add nsw i32 %580, 1
store i32 %581, i32* %31
br label %448
582: ; preds = %448
%583 = load double, double* %35
%584 = fcmp olt double %583, 0.000000e+00
br i1 %584, label %585, label %606
585: ; preds = %582
%586 = load i32, i32* %19
%587 = icmp sge i32 %586, 2
br i1 %587, label %588, label %593
588: ; preds = %585
%589 = load i32, i32* %36
%590 = load i32, i32* %37
%591 = load double, double* %35
%592 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i32 %589, i32 %590, double %591)
br label %593
593: ; preds = %588, %585
%594 = load i32*, i32** %16
%595 = load i32, i32* %36
%596 = sext i32 %595 to i64
%597 = getelementptr inbounds i32, i32* %594, i64 %596
store i32 1, i32* %597
%598 = load i32*, i32** %16
%599 = load i32, i32* %37
%600 = sext i32 %599 to i64
%601 = getelementptr inbounds i32, i32* %598, i64 %600
store i32 0, i32* %601
%602 = load double, double* %35
%603 = load double*, double** %24
%604 = load double, double* %603
%605 = fadd double %604, %602
store double %605, double* %603
br label %353
606: ; preds = %582
br label %607
607: ; preds = %606, %349, %336
%608 = load double*, double** %24
%609 = load double, double* %608
%610 = load i32, i32* %15
%611 = sitofp i32 %610 to double
%612 = fdiv double %609, %611
%613 = load double*, double** %26
%614 = getelementptr inbounds double, double* %613, i64 1
store double %612, double* %614
ret void
}

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