#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 */
int /*<<< orphan*/ arb_rotation(double *, int /*<<< orphan*/, double **);
int /*<<< orphan*/ ave_dmatrix(double **, long, int, double *);
int /*<<< orphan*/ cross(double *, double *, double *);
double **dmatrix(int, int, int, int);
double dot(double *, double *);
int /*<<< orphan*/ free_dmatrix(double **, int, int, int, int);
int /*<<< orphan*/ free_lmatrix(long **, int, long, int /*<<< orphan*/, long);
long **lmatrix(int, long, int /*<<< orphan*/, long);
int /*<<< orphan*/ lsort(long, long *, long *);
int /*<<< orphan*/ magang(double *, double *);
int /*<<< orphan*/ multi_vec_Tmatrix(double *, int, double **, int, int,
                                     double *);
int /*<<< orphan*/ sprintf(char *, char *, long, ...);
int /*<<< orphan*/ strcat(char *, char *);
void multiplets(long num_ple, long max_ple, long num_residue, long **pair_info,
                long *ivec, long *idx1, char **AtomName, char **ResName,
                char *ChainID, long *ResSeq, char **Miscs, double **xyz,
                double **orien, double **org, long **seidx, char *bseq,
                long *num_multi, long *multi_idx, long **multi) {
  char pairstr[512], pairnum[512], tmp[512];
  double z[4] = {-9999.99, 0.0, 0.0, 1.0};
  double hinge[4], zave[4], pave[4], **ztot, **ptot, **rotmat, **xyz_residue;
  long i, inum_base, inum, is_exist, j, jr, k, m, n_unique = 0, **mtxple;
  mtxple = lmatrix(1, num_ple, 0, max_ple);
  ztot = dmatrix(1, max_ple, 1, 3);
  ptot = dmatrix(1, max_ple, 1, 3);
  rotmat = dmatrix(1, 3, 1, 3);
  xyz_residue = dmatrix(1, 100, 1, 3);
  for (i = 1; i <= num_residue; i++) {
    if (pair_info[i][101L] > 1) {
      inum_base = pair_info[i][101L] + 1;
      ivec[1] = i;
      for (j = 1; j <= pair_info[i][101L]; j++)
        ivec[j + 1] = pair_info[i][j];
      lsort(inum_base, ivec, idx1);
      is_exist = 0;
      for (j = 1; j <= n_unique && !is_exist; j++)
        if (inum_base == mtxple[j][0]) {
          for (k = 1; k <= mtxple[j][0]; k++)
            if (ivec[k] != mtxple[j][k])
              break;
          if (k > mtxple[j][0])
            is_exist = 1;
        }
      if (!is_exist) {
        mtxple[++n_unique][0] = inum_base;
        pairstr[0] = '\0';
        pairnum[0] = '\0';
        multi_idx[n_unique] = inum_base;
        for (j = 1; j <= inum_base; j++) {
          jr = ivec[j];
          multi[n_unique][j] = jr;
          mtxple[n_unique][j] = jr;
          k = seidx[jr][1];
          sprintf(tmp, "%c: %d %c%s", ChainID[k], ResSeq[k], bseq[jr],
                  (j == inum_base) ? "" : "  +  ");
          strcat(pairstr, tmp);
          sprintf(tmp, "%d_", jr);
          strcat(pairnum, tmp);
          for (k = 1; k <= 3; k++) {
            if (j > 1 && dot(ztot[1], &orien[jr][6]) < 0.0)
              ztot[j][k] = -orien[jr][6 + k];
            else
              ztot[j][k] = orien[jr][6 + k];
            ptot[j][k] = org[jr][k];
          }
        }
        ave_dmatrix(ptot, inum_base, 3, pave);
        ave_dmatrix(ztot, inum_base, 3, zave);
        cross(zave, z, hinge);
        arb_rotation(hinge, magang(zave, z), rotmat);
        inum = 0;
        for (j = 1; j <= inum_base; j++) {
          jr = ivec[j];
          for (k = seidx[jr][1]; k <= seidx[jr][2]; k++) {
            for (m = 1; m <= 3; m++)
              zave[m] = xyz[k][m] - pave[m];
            multi_vec_Tmatrix(zave, 3, rotmat, 3, 3,
                              xyz_residue[k - seidx[jr][1] + 1]);
          }
        }
      }
    }
  }
  *num_multi = n_unique;
  free_lmatrix(mtxple, 1, num_ple, 0, max_ple);
  free_dmatrix(ztot, 1, max_ple, 1, 3);
  free_dmatrix(ptot, 1, max_ple, 1, 3);
  free_dmatrix(rotmat, 1, 3, 1, 3);
  free_dmatrix(xyz_residue, 1, 100, 1, 3);
}


x86 assembly (clang, -O0):
<multiplets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x730,%rsp
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
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    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0xdd2(%rip),%rax
mov    %rax,-0x650(%rbp)
mov    0xdcc(%rip),%rax
mov    %rax,-0x648(%rbp)
mov    0xdc6(%rip),%rax
mov    %rax,-0x640(%rbp)
mov    0xdc0(%rip),%rax
mov    %rax,-0x638(%rbp)
movq   $0x0,-0x718(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edi
xor    %edx,%edx
call   1090 <lmatrix@plt>
mov    %rax,-0x720(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
mov    %edx,%edi
call   1060 <dmatrix@plt>
mov    %rax,-0x6b8(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
mov    %edx,%edi
call   1060 <dmatrix@plt>
mov    %rax,-0x6c0(%rbp)
mov    $0x1,%edx
mov    $0x3,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1060 <dmatrix@plt>
mov    %rax,-0x6c8(%rbp)
mov    $0x1,%edx
mov    $0x64,%esi
mov    $0x3,%ecx
mov    %edx,%edi
call   1060 <dmatrix@plt>
mov    %rax,-0x6d0(%rbp)
movq   $0x1,-0x6d8(%rbp)
mov    -0x6d8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     1a33 <multiplets+0x863>
mov    -0x20(%rbp),%rax
mov    -0x6d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
cmpq   $0x1,0x328(%rax)
01
jle    1a17 <multiplets+0x847>
mov    -0x20(%rbp),%rax
mov    -0x6d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x328(%rax),%rax
add    $0x1,%rax
mov    %rax,-0x6e0(%rbp)
mov    -0x6d8(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,0x8(%rax)
movq   $0x1,-0x6f8(%rbp)
mov    -0x6f8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    -0x6d8(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    0x328(%rcx),%rax
jg     13d0 <multiplets+0x200>
mov    -0x20(%rbp),%rax
mov    -0x6d8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x6f8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x28(%rbp),%rax
mov    -0x6f8(%rbp),%rcx
mov    %rdx,0x8(%rax,%rcx,8)
mov    -0x6f8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x6f8(%rbp)
jmp    136c <multiplets+0x19c>
mov    -0x6e0(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1080 <lsort@plt>
movq   $0x0,-0x6f0(%rbp)
movq   $0x1,-0x6f8(%rbp)
mov    -0x6f8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x718(%rbp),%rcx
mov    %al,-0x721(%rbp)
jg     1429 <multiplets+0x259>
cmpq   $0x0,-0x6f0(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x721(%rbp)
mov    -0x721(%rbp),%al
test   $0x1,%al
jne    143c <multiplets+0x26c>
jmp    152c <multiplets+0x35c>
mov    -0x6e0(%rbp),%rax
mov    -0x720(%rbp),%rcx
mov    -0x6f8(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    (%rcx),%rax
jne    1510 <multiplets+0x340>
movq   $0x1,-0x708(%rbp)
mov    -0x708(%rbp),%rax
mov    -0x720(%rbp),%rcx
mov    -0x6f8(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    (%rcx),%rax
jg     14de <multiplets+0x30e>
mov    -0x28(%rbp),%rax
mov    -0x708(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x720(%rbp),%rcx
mov    -0x6f8(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
mov    -0x708(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
je     14c2 <multiplets+0x2f2>
jmp    14de <multiplets+0x30e>
jmp    14c7 <multiplets+0x2f7>
mov    -0x708(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x708(%rbp)
jmp    1469 <multiplets+0x299>
mov    -0x708(%rbp),%rax
mov    -0x720(%rbp),%rcx
mov    -0x6f8(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    (%rcx),%rax
jle    150b <multiplets+0x33b>
movq   $0x1,-0x6f0(%rbp)
jmp    1510 <multiplets+0x340>
jmp    1515 <multiplets+0x345>
mov    -0x6f8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x6f8(%rbp)
jmp    13fa <multiplets+0x22a>
cmpq   $0x0,-0x6f0(%rbp)
jne    1a12 <multiplets+0x842>
mov    -0x6e0(%rbp),%rcx
mov    -0x720(%rbp),%rax
mov    -0x718(%rbp),%rdx
mov    %rdx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x718(%rbp)
mov    0x8(%rax,%rdx,8),%rax
mov    %rcx,(%rax)
movb   $0x0,-0x230(%rbp)
movb   $0x0,-0x430(%rbp)
mov    -0x6e0(%rbp),%rdx
mov    0x68(%rbp),%rax
mov    -0x718(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movq   $0x1,-0x6f8(%rbp)
mov    -0x6f8(%rbp),%rax
cmp    -0x6e0(%rbp),%rax
jg     1822 <multiplets+0x652>
mov    -0x28(%rbp),%rax
mov    -0x6f8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x700(%rbp)
mov    -0x700(%rbp),%rdx
mov    0x70(%rbp),%rax
mov    -0x718(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x6f8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x700(%rbp),%rdx
mov    -0x720(%rbp),%rax
mov    -0x718(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x6f8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    0x50(%rbp),%rax
mov    -0x700(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x708(%rbp)
lea    -0x630(%rbp),%rdi
mov    0x20(%rbp),%rax
mov    -0x708(%rbp),%rcx
movsbq (%rax,%rcx,1),%rdx
mov    0x28(%rbp),%rax
mov    -0x708(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    0x58(%rbp),%rax
mov    -0x700(%rbp),%rsi
movsbl (%rax,%rsi,1),%r8d
mov    -0x6f8(%rbp),%rsi
mov    -0x6e0(%rbp),%r10
lea    0x9c4(%rip),%r9
lea    0x9c2(%rip),%rax
cmp    %r10,%rsi
cmove  %rax,%r9
lea    0x9a3(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x230(%rbp),%rdi
lea    -0x630(%rbp),%rsi
call   10b0 <strcat@plt>
lea    -0x630(%rbp),%rdi
mov    -0x700(%rbp),%rdx
lea    0x986(%rip),%rsi
mov    $0x0,%al
call   10d0 <sprintf@plt>
lea    -0x430(%rbp),%rdi
lea    -0x630(%rbp),%rsi
call   10b0 <strcat@plt>
movq   $0x1,-0x708(%rbp)
cmpq   $0x3,-0x708(%rbp)
03
jg     1806 <multiplets+0x636>
cmpq   $0x1,-0x6f8(%rbp)
01
jle    1779 <multiplets+0x5a9>
mov    -0x6b8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x40(%rbp),%rax
mov    -0x700(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
add    $0x30,%rsi
call   1030 <dot@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1779 <multiplets+0x5a9>
mov    0x40(%rbp),%rax
mov    -0x700(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x708(%rbp),%rcx
add    $0x6,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x6b8(%rbp),%rax
mov    -0x6f8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x708(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    17b6 <multiplets+0x5e6>
mov    0x40(%rbp),%rax
mov    -0x700(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x708(%rbp),%rcx
add    $0x6,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x6b8(%rbp),%rax
mov    -0x6f8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x708(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x48(%rbp),%rax
mov    -0x700(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x708(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x6c0(%rbp),%rax
mov    -0x6f8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x708(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x708(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x708(%rbp)
jmp    16d1 <multiplets+0x501>
jmp    180b <multiplets+0x63b>
mov    -0x6f8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x6f8(%rbp)
jmp    1594 <multiplets+0x3c4>
mov    -0x6c0(%rbp),%rdi
mov    -0x6e0(%rbp),%rsi
lea    -0x6b0(%rbp),%rcx
mov    $0x3,%edx
call   10f0 <ave_dmatrix@plt>
mov    -0x6b8(%rbp),%rdi
mov    -0x6e0(%rbp),%rsi
lea    -0x690(%rbp),%rcx
mov    $0x3,%edx
call   10f0 <ave_dmatrix@plt>
lea    -0x690(%rbp),%rdi
lea    -0x650(%rbp),%rsi
lea    -0x670(%rbp),%rdx
call   10c0 <cross@plt>
lea    -0x670(%rbp),%rax
mov    %rax,-0x730(%rbp)
lea    -0x690(%rbp),%rdi
lea    -0x650(%rbp),%rsi
call   1050 <magang@plt>
mov    -0x730(%rbp),%rdi
mov    %eax,%esi
mov    -0x6c8(%rbp),%rdx
call   1040 <arb_rotation@plt>
movq   $0x0,-0x6e8(%rbp)
movq   $0x1,-0x6f8(%rbp)
mov    -0x6f8(%rbp),%rax
cmp    -0x6e0(%rbp),%rax
jg     1a0d <multiplets+0x83d>
mov    -0x28(%rbp),%rax
mov    -0x6f8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x700(%rbp)
mov    0x50(%rbp),%rax
mov    -0x700(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x708(%rbp)
mov    -0x708(%rbp),%rax
mov    0x50(%rbp),%rcx
mov    -0x700(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    0x10(%rcx),%rax
jg     19f1 <multiplets+0x821>
movq   $0x1,-0x710(%rbp)
cmpq   $0x3,-0x710(%rbp)
03
jg     1995 <multiplets+0x7c5>
mov    0x38(%rbp),%rax
mov    -0x708(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x710(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x710(%rbp),%rax
subsd  -0x6b0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x710(%rbp),%rax
movsd  %xmm0,-0x690(%rbp,%rax,8)
ff ff
mov    -0x710(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x710(%rbp)
jmp    1935 <multiplets+0x765>
lea    -0x690(%rbp),%rdi
mov    -0x6c8(%rbp),%rdx
mov    -0x6d0(%rbp),%rax
mov    -0x708(%rbp),%rcx
mov    0x50(%rbp),%rsi
mov    -0x700(%rbp),%r8
mov    (%rsi,%r8,8),%rsi
sub    0x8(%rsi),%rcx
mov    0x8(%rax,%rcx,8),%r9
mov    $0x3,%r8d
mov    %r8d,%esi
mov    %r8d,%ecx
call   1070 <multi_vec_Tmatrix@plt>
mov    -0x708(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x708(%rbp)
jmp    190a <multiplets+0x73a>
jmp    19f6 <multiplets+0x826>
mov    -0x6f8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x6f8(%rbp)
jmp    18c6 <multiplets+0x6f6>
jmp    1a12 <multiplets+0x842>
jmp    1a17 <multiplets+0x847>
jmp    1a1c <multiplets+0x84c>
mov    -0x6d8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x6d8(%rbp)
jmp    1303 <multiplets+0x133>
mov    -0x718(%rbp),%rcx
mov    0x60(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x720(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%r8
mov    $0x1,%esi
xor    %ecx,%ecx
call   10e0 <free_lmatrix@plt>
mov    -0x6b8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
call   10a0 <free_dmatrix@plt>
mov    -0x6c0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
call   10a0 <free_dmatrix@plt>
mov    -0x6c8(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x3,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   10a0 <free_dmatrix@plt>
mov    -0x6d0(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x64,%edx
mov    $0x3,%r8d
mov    %ecx,%esi
call   10a0 <free_dmatrix@plt>
add    $0x730,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplets>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x718,%rsp
mov    %r9,0x78(%rsp)
mov    %r8,%rbp
mov    %rcx,%r12
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rsi
movaps 0xe34(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movapd 0xe14(%rip),%xmm0
movapd %xmm0,0xb0(%rsp)
xor    %ebx,%ebx
mov    $0x1,%edi
mov    %rsi,0x68(%rsp)
xor    %edx,%edx
mov    %r14,%rcx
call   1090 <lmatrix@plt>
mov    %rax,0x30(%rsp)
mov    $0x1,%edi
mov    %r14d,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1060 <dmatrix@plt>
mov    %rax,0x28(%rsp)
mov    $0x1,%edi
mov    %r14,0x70(%rsp)
mov    %r14d,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1060 <dmatrix@plt>
mov    %rax,0x10(%rsp)
mov    $0x1,%edi
mov    $0x3,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1060 <dmatrix@plt>
mov    %rax,%r13
mov    $0x1,%edi
mov    $0x64,%esi
mov    $0x1,%edx
mov    $0x3,%ecx
call   1060 <dmatrix@plt>
mov    %rax,%r14
test   %r15,%r15
jle    18d1 <multiplets+0x701>
mov    %r15,%rdx
mov    $0x1,%ecx
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    %r14,0x88(%rsp)
mov    %r13,0x80(%rsp)
mov    %r12,%r15
mov    %rbp,0x40(%rsp)
mov    %r12,0x48(%rsp)
mov    %rdx,0x18(%rsp)
jmp    130a <multiplets+0x13a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rbx
lea    0x1(%rcx),%rax
mov    %rbx,0x8(%rsp)
cmp    %rdx,%rcx
mov    %rax,%rcx
je     18d1 <multiplets+0x701>
mov    (%r15,%rcx,8),%rax
mov    0x328(%rax),%r12
cmp    $0x2,%r12
jl     12f0 <multiplets+0x120>
lea    0x1(%r12),%rbx
mov    %rcx,0x20(%rsp)
mov    %rcx,0x8(%rbp)
cmpq   $0x0,0x328(%rax)
jle    1357 <multiplets+0x187>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%rax,%rcx,8),%rdx
mov    %rdx,0x10(%rbp,%rcx,8)
add    $0x1,%rcx
cmp    0x328(%rax),%rcx
jl     1340 <multiplets+0x170>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    0x78(%rsp),%rdx
call   1080 <lsort@plt>
cmpq   $0x0,0x8(%rsp)
jle    13d0 <multiplets+0x200>
mov    $0x1,%eax
jmp    138e <multiplets+0x1be>
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rax),%rcx
cmp    0x8(%rsp),%rax
mov    %rcx,%rax
jge    13d0 <multiplets+0x200>
mov    0x30(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
cmp    (%rcx),%rbx
jne    1380 <multiplets+0x1b0>
test   %r12,%r12
js     13c5 <multiplets+0x1f5>
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x8(%rbp,%rdx,8),%rsi
cmp    0x8(%rcx,%rdx,8),%rsi
jne    1380 <multiplets+0x1b0>
add    $0x1,%rdx
cmp    %rdx,%rbx
jne    13b0 <multiplets+0x1e0>
mov    0x8(%rsp),%rbx
jmp    18c2 <multiplets+0x6f2>
nop
mov    %r12,%rcx
mov    0x8(%rsp),%rdx
lea    0x1(%rdx),%r12
mov    0x30(%rsp),%rax
mov    0x8(%rax,%rdx,8),%rax
mov    %rbx,(%rax)
movb   $0x0,0x310(%rsp)
movb   $0x0,0x110(%rsp)
mov    0x7a8(%rsp),%rax
mov    %rbx,0x8(%rax,%rdx,8)
mov    %rcx,0x58(%rsp)
test   %rcx,%rcx
js     184e <multiplets+0x67e>
mov    %r12,0x50(%rsp)
xor    %edx,%edx
mov    %rbx,0x60(%rsp)
jmp    148f <multiplets+0x2bf>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x40(%rsi),%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x0(%r13,%r15,8),%rcx
movsd  0x10(%rcx),%xmm0
mov    0x8(%r14,%r12,8),%rcx
movsd  %xmm0,0x10(%rcx)
movsd  0x48(%rsi),%xmm0
movsd  %xmm0,0x18(%rax)
mov    0x0(%r13,%r15,8),%rax
movsd  0x18(%rax),%xmm0
mov    0x8(%r14,%r12,8),%rax
movsd  %xmm0,0x18(%rax)
mov    0x60(%rsp),%rbx
cmp    %rdx,%rbx
mov    0x40(%rsp),%rbp
mov    0x88(%rsp),%r14
mov    0x80(%rsp),%r13
je     16d1 <multiplets+0x501>
mov    %rdx,%r12
lea    0x1(%rdx),%r14
mov    0x8(%rbp,%rdx,8),%r15
mov    0x7b0(%rsp),%rax
mov    0x8(%rsp),%rcx
mov    0x8(%rax,%rcx,8),%rax
mov    %r15,0x8(%rax,%rdx,8)
mov    0x30(%rsp),%rax
mov    0x8(%rax,%rcx,8),%rax
mov    %r15,0x8(%rax,%rdx,8)
mov    0x790(%rsp),%rax
mov    (%rax,%r15,8),%rax
mov    0x8(%rax),%rax
mov    0x760(%rsp),%rcx
movsbq (%rcx,%rax,1),%rdx
mov    0x768(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
mov    0x798(%rsp),%rax
movsbl (%rax,%r15,1),%r8d
cmp    %r12,0x58(%rsp)
lea    0xb49(%rip),%r9
lea    0xb47(%rip),%rax
cmove  %rax,%r9
lea    0x510(%rsp),%rbx
mov    %rbx,%rdi
lea    0xb20(%rip),%rsi
xor    %eax,%eax
call   10d0 <sprintf@plt>
lea    0x310(%rsp),%rdi
mov    %rbx,%rsi
call   10b0 <strcat@plt>
mov    %rbx,%rdi
lea    0xb11(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10d0 <sprintf@plt>
lea    0x110(%rsp),%rdi
mov    %rbx,%rsi
call   10b0 <strcat@plt>
mov    %r14,%rdx
cmp    $0x2,%r14
mov    0x28(%rsp),%rbp
mov    0x780(%rsp),%rbx
jb     15e0 <multiplets+0x410>
mov    0x8(%rbp),%rdi
mov    (%rbx,%r15,8),%rsi
add    $0x30,%rsi
mov    %rdx,0x38(%rsp)
call   1030 <dot@plt>
mov    0x38(%rsp),%rdx
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    15e0 <multiplets+0x410>
mov    (%rbx,%r15,8),%rsi
movsd  0x38(%rsi),%xmm0
movapd 0xa59(%rip),%xmm1
xorpd  %xmm1,%xmm0
mov    0x8(%rbp,%r12,8),%rax
movlpd %xmm0,0x8(%rax)
mov    0x788(%rsp),%r13
mov    0x0(%r13,%r15,8),%rax
movsd  0x8(%rax),%xmm0
mov    0x10(%rsp),%r14
mov    0x8(%r14,%r12,8),%rax
movsd  %xmm0,0x8(%rax)
jmp    162b <multiplets+0x45b>
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%r15,8),%rsi
movsd  0x38(%rsi),%xmm0
mov    0x8(%rbp,%r12,8),%rax
movsd  %xmm0,0x8(%rax)
mov    0x788(%rsp),%r13
mov    0x0(%r13,%r15,8),%rcx
movsd  0x8(%rcx),%xmm0
mov    0x10(%rsp),%r14
mov    0x8(%r14,%r12,8),%rcx
movsd  %xmm0,0x8(%rcx)
cmp    $0x2,%rdx
jb     1430 <multiplets+0x260>
mov    %rdx,0x38(%rsp)
mov    0x780(%rsp),%rbx
mov    0x8(%rbp),%rdi
add    $0x30,%rsi
call   1030 <dot@plt>
mov    (%rbx,%r15,8),%rsi
movsd  0x40(%rsi),%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm2,%xmm0
movapd %xmm0,%xmm2
andnpd %xmm1,%xmm2
xorpd  0x9a6(%rip),%xmm1
andpd  %xmm0,%xmm1
orpd   %xmm2,%xmm1
mov    0x8(%rbp,%r12,8),%rax
movlpd %xmm1,0x10(%rax)
mov    0x0(%r13,%r15,8),%rax
movsd  0x10(%rax),%xmm0
mov    0x8(%r14,%r12,8),%rax
movsd  %xmm0,0x10(%rax)
mov    0x8(%rbp),%rdi
add    $0x30,%rsi
call   1030 <dot@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
mov    (%rbx,%r15,8),%rcx
jbe    16b0 <multiplets+0x4e0>
movsd  0x48(%rcx),%xmm0
xorps  0x959(%rip),%xmm0
mov    0x8(%rbp,%r12,8),%rax
jmp    16ba <multiplets+0x4ea>
xchg   %ax,%ax
mov    0x8(%rbp,%r12,8),%rax
movsd  0x48(%rcx),%xmm0
mov    0x10(%rsp),%r14
mov    0x788(%rsp),%r13
mov    0x38(%rsp),%rdx
jmp    1453 <multiplets+0x283>
mov    0x10(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
lea    0xd0(%rsp),%rcx
call   10f0 <ave_dmatrix@plt>
mov    0x28(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
lea    0x90(%rsp),%rbx
mov    %rbx,%rcx
call   10f0 <ave_dmatrix@plt>
mov    %rbx,%rdi
lea    0xb0(%rsp),%r15
mov    %r15,%rsi
lea    0xf0(%rsp),%r12
mov    %r12,%rdx
call   10c0 <cross@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <magang@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    %r13,%rdx
call   1040 <arb_rotation@plt>
cmpq   $0x0,0x58(%rsp)
js     1835 <multiplets+0x665>
mov    $0x1,%r15d
jmp    1772 <multiplets+0x5a2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%r15),%rax
cmp    0x60(%rsp),%r15
mov    %rax,%r15
je     1830 <multiplets+0x660>
mov    0x40(%rsp),%rax
mov    (%rax,%r15,8),%rbp
mov    0x790(%rsp),%rax
mov    (%rax,%rbp,8),%rcx
mov    0x8(%rcx),%rax
cmp    0x10(%rcx),%rax
jg     1760 <multiplets+0x590>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x778(%rsp),%rcx
mov    (%rcx,%rbx,8),%rcx
movupd 0x8(%rcx),%xmm0
movupd 0xd8(%rsp),%xmm1
subpd  %xmm1,%xmm0
movupd %xmm0,0x98(%rsp)
movsd  0x18(%rcx),%xmm0
subsd  0xe8(%rsp),%xmm0
movsd  %xmm0,0xa8(%rsp)
shl    $0x3,%rax
mov    %r14,%rcx
sub    %rax,%rcx
mov    0x8(%rcx,%rbx,8),%r9
lea    0x90(%rsp),%rdi
mov    $0x3,%esi
mov    %r13,%rdx
mov    $0x3,%ecx
mov    $0x3,%r8d
call   1070 <multi_vec_Tmatrix@plt>
mov    0x790(%rsp),%rax
mov    (%rax,%rbp,8),%rax
cmp    0x10(%rax),%rbx
jge    1760 <multiplets+0x590>
mov    0x8(%rax),%rax
add    $0x1,%rbx
jmp    17a0 <multiplets+0x5d0>
mov    0x40(%rsp),%rbp
mov    0x48(%rsp),%r15
mov    0x18(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    0x50(%rsp),%rbx
jmp    12f5 <multiplets+0x125>
mov    0x10(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
lea    0xd0(%rsp),%rcx
call   10f0 <ave_dmatrix@plt>
mov    0x28(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
mov    %r12,%rbx
lea    0x90(%rsp),%r12
mov    %r12,%rcx
call   10f0 <ave_dmatrix@plt>
mov    %r12,%rdi
lea    0xb0(%rsp),%rsi
lea    0xf0(%rsp),%rdx
call   10c0 <cross@plt>
mov    %r12,%rdi
lea    0xb0(%rsp),%rsi
call   1050 <magang@plt>
lea    0xf0(%rsp),%rdi
mov    %eax,%esi
mov    %r13,%rdx
call   1040 <arb_rotation@plt>
mov    0x20(%rsp),%rcx
mov    0x18(%rsp),%rdx
jmp    12f5 <multiplets+0x125>
mov    0x7a0(%rsp),%rax
mov    %rbx,(%rax)
mov    0x30(%rsp),%rdi
mov    $0x1,%esi
mov    0x68(%rsp),%rdx
xor    %ecx,%ecx
mov    0x70(%rsp),%rbx
mov    %rbx,%r8
call   10e0 <free_lmatrix@plt>
mov    0x28(%rsp),%rdi
mov    $0x1,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10a0 <free_dmatrix@plt>
mov    0x10(%rsp),%rdi
mov    $0x1,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10a0 <free_dmatrix@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10a0 <free_dmatrix@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x64,%edx
mov    $0x1,%ecx
mov    $0x3,%r8d
call   10a0 <free_dmatrix@plt>
add    $0x718,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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