#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*/ dist_2v_allt_v2(int *, int *, int *, int *, char *, char *,
                                   int, int, int **, int *, int, int, int,
                                   int *, int, int, int, int, int,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ dist_3v_allt_v3(int **, int *, int *, char *, int, int,
                                   int **, int *, int, int, int, int *, int,
                                   int, int, int, int, int);
int /*<<< orphan*/ free_imatrix(int **, int, int, int, int);
int **imatrix(int, int, int, int);
int /*<<< orphan*/ printf(char *, ...);
void dist_3v_allt_from_m123_v1(int *m1_t, int *m2_t, int *m3_t, int *m1_p,
                               int *m2_p, int *m3_p, char *m1_s, char *m2_s,
                               char *m3_s, int n1, int n2, int n3, int **ovdi,
                               int *n, int min_dist, int max_dist,
                               int n_transcripts, int *ml, int get_positions,
                               int order_constraint, int max_n_transcripts,
                               int max_n_ovdi, int pos_format, int verbose) {
  int **ovdi12;
  int max_n_ovdi12 = 500000;
  int nout12[4];
  int nout123[4];
  int n12;
  int get_positions12 = 1;
  int max_n_transcripts12 = -1;
  int errorcode = 0;
  int i, j;
  ovdi12 = imatrix(1, max_n_ovdi12, 1, 7);
  if (verbose) {
    printf("motif 1 (%d): ", n1);
    for (i = 1; i <= n1; i++)
      printf("%d %d %d,", m1_t[i], m1_p[i], m1_s[i]);
    printf("\n");
    printf("motif 2 (%d): ", n2);
    for (i = 1; i <= n2; i++)
      printf("%d %d %d,", m2_t[i], m2_p[i], m2_s[i]);
    printf("\n");
    printf("motif 3 (%d): ", n3);
    for (i = 1; i <= n3; i++)
      printf("%d %d %d,", m3_t[i], m3_p[i], m3_s[i]);
    printf("\n");
  }
  dist_2v_allt_v2(m1_t, m2_t, m1_p, m2_p, m1_s, m2_s, n1, n2, ovdi12, nout12,
                  min_dist, max_dist, n_transcripts, ml, get_positions12,
                  order_constraint, max_n_transcripts12, max_n_ovdi12,
                  pos_format, 0);
  errorcode += nout12[2];
  if (errorcode < 0) {
    n12 = nout12[3];
  } else {
    n12 = nout12[0];
  }
  if (verbose) {
    printf("ovdi12 (%d)\n", n12);
    for (i = 1; i <= n12; i++)
      printf("%d %d %d %d %d\n", ovdi12[i][1], ovdi12[i][2], ovdi12[i][3],
             ovdi12[i][6], ovdi12[i][7]);
  }
  dist_3v_allt_v3(ovdi12, m3_t, m3_p, m3_s, n12, n3, ovdi, nout123, min_dist,
                  max_dist, n_transcripts, ml, get_positions, order_constraint,
                  max_n_transcripts, max_n_ovdi, pos_format, verbose);
  n[0] = nout123[0];
  n[1] = nout123[1];
  errorcode += nout123[2];
  n[2] = errorcode;
  n[3] = nout123[3];
  if (verbose) {
    printf("ovdi123 (%d)\n", n[0]);
    for (i = 1; i <= n[0]; i++)
      printf("%d %d %d %d %d %d %d\n", ovdi[i][1], ovdi[i][2], ovdi[i][3],
             ovdi[i][4], ovdi[i][8], ovdi[i][9], ovdi[i][10]);
  }
  free_imatrix(ovdi12, 1, max_n_ovdi12, 1, 7);
}


x86 assembly (clang, -O0):
<dist_3v_allt_from_m123_v1>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    0x98(%rbp),%eax
mov    0x90(%rbp),%eax
mov    0x88(%rbp),%eax
mov    0x80(%rbp),%eax
mov    0x78(%rbp),%eax
mov    0x70(%rbp),%eax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%eax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movl   $0x7a120,-0x64(%rbp)
movl   $0x1,-0x98(%rbp)
movl   $0xffffffff,-0x9c(%rbp)
ff ff ff
movl   $0x0,-0xa0(%rbp)
mov    -0x64(%rbp),%esi
mov    $0x1,%edx
mov    $0x7,%ecx
mov    %edx,%edi
call   1040 <imatrix@plt>
mov    %rax,-0x60(%rbp)
cmpl   $0x0,0x98(%rbp)
je     139d <dist_3v_allt_from_m123_v1+0x24d>
mov    0x28(%rbp),%esi
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x28(%rbp),%eax
jg     1285 <dist_3v_allt_from_m123_v1+0x135>
mov    -0x30(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x48(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x10(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1229 <dist_3v_allt_from_m123_v1+0xd9>
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x30(%rbp),%esi
lea    0xd7c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x30(%rbp),%eax
jg     130a <dist_3v_allt_from_m123_v1+0x1ba>
mov    -0x38(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x50(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x18(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    12ae <dist_3v_allt_from_m123_v1+0x15e>
lea    0xd31(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x38(%rbp),%esi
lea    0xd06(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x38(%rbp),%eax
jg     138f <dist_3v_allt_from_m123_v1+0x23f>
mov    -0x40(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x58(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    0x20(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1333 <dist_3v_allt_from_m123_v1+0x1e3>
lea    0xcac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%r9
mov    0x28(%rbp),%eax
mov    %eax,-0xc8(%rbp)
mov    0x30(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0xc0(%rbp)
lea    -0x80(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    0x50(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    0x58(%rbp),%r13d
mov    0x60(%rbp),%r12d
mov    0x68(%rbp),%r15
mov    -0x98(%rbp),%r14d
mov    0x78(%rbp),%ebx
mov    -0x9c(%rbp),%r11d
mov    -0x64(%rbp),%r10d
mov    0x90(%rbp),%eax
mov    %eax,-0xac(%rbp)
xor    %eax,%eax
mov    -0xc8(%rbp),%eax
mov    %eax,(%rsp)
mov    -0xc4(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0xc0(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0xb8(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0xb0(%rbp),%eax
mov    %eax,0x20(%rsp)
mov    -0xac(%rbp),%eax
mov    %r13d,0x28(%rsp)
mov    %r12d,0x30(%rsp)
mov    %r15,0x38(%rsp)
mov    %r14d,0x40(%rsp)
mov    %ebx,0x48(%rsp)
mov    %r11d,0x50(%rsp)
mov    %r10d,0x58(%rsp)
mov    %eax,0x60(%rsp)
movl   $0x0,0x68(%rsp)
call   1030 <dist_2v_allt_v2@plt>
mov    -0x78(%rbp),%eax
add    -0xa0(%rbp),%eax
mov    %eax,-0xa0(%rbp)
cmpl   $0x0,-0xa0(%rbp)
jge    14ad <dist_3v_allt_from_m123_v1+0x35d>
mov    -0x74(%rbp),%eax
mov    %eax,-0x94(%rbp)
jmp    14b6 <dist_3v_allt_from_m123_v1+0x366>
mov    -0x80(%rbp),%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x0,0x98(%rbp)
je     1576 <dist_3v_allt_from_m123_v1+0x426>
mov    -0x94(%rbp),%esi
lea    0xb67(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    -0x94(%rbp),%eax
jg     1571 <dist_3v_allt_from_m123_v1+0x421>
mov    -0x60(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x4(%rax),%esi
mov    -0x60(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%edx
mov    -0x60(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0xc(%rax),%ecx
mov    -0x60(%rbp),%rax
movslq -0xa4(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    0x18(%rax),%r8d
mov    -0x60(%rbp),%rax
movslq -0xa4(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    0x1c(%rax),%r9d
lea    0xb02(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    14e1 <dist_3v_allt_from_m123_v1+0x391>
jmp    1576 <dist_3v_allt_from_m123_v1+0x426>
mov    -0x60(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    0x20(%rbp),%rcx
mov    -0x94(%rbp),%r8d
mov    0x38(%rbp),%r9d
mov    0x40(%rbp),%rax
mov    %rax,-0xe8(%rbp)
lea    -0x90(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    0x50(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    0x58(%rbp),%eax
mov    %eax,-0xd0(%rbp)
mov    0x60(%rbp),%r13d
mov    0x68(%rbp),%r12
mov    0x70(%rbp),%r15d
mov    0x78(%rbp),%r14d
mov    0x80(%rbp),%ebx
mov    0x88(%rbp),%r11d
mov    0x90(%rbp),%r10d
mov    0x98(%rbp),%eax
mov    %eax,-0xcc(%rbp)
mov    -0xe8(%rbp),%rax
mov    %rax,(%rsp)
mov    -0xe0(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0xd4(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0xd0(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0xcc(%rbp),%eax
mov    %r13d,0x20(%rsp)
mov    %r12,0x28(%rsp)
mov    %r15d,0x30(%rsp)
mov    %r14d,0x38(%rsp)
mov    %ebx,0x40(%rsp)
mov    %r11d,0x48(%rsp)
mov    %r10d,0x50(%rsp)
mov    %eax,0x58(%rsp)
call   1070 <dist_3v_allt_v3@plt>
mov    -0x90(%rbp),%ecx
mov    0x48(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8c(%rbp),%ecx
mov    0x48(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x88(%rbp),%eax
add    -0xa0(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%ecx
mov    0x48(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x84(%rbp),%ecx
mov    0x48(%rbp),%rax
mov    %ecx,0xc(%rax)
cmpl   $0x0,0x98(%rbp)
je     177a <dist_3v_allt_from_m123_v1+0x62a>
mov    0x48(%rbp),%rax
mov    (%rax),%esi
lea    0x99d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
mov    0x48(%rbp),%rcx
cmp    (%rcx),%eax
jg     1775 <dist_3v_allt_from_m123_v1+0x625>
mov    0x40(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x4(%rax),%esi
mov    0x40(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%edx
mov    0x40(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0xc(%rax),%ecx
mov    0x40(%rbp),%rax
movslq -0xa4(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    0x10(%rax),%r8d
mov    0x40(%rbp),%rax
movslq -0xa4(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    0x20(%rax),%r9d
mov    0x40(%rbp),%rax
movslq -0xa4(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    0x24(%rax),%r10d
mov    0x40(%rbp),%rax
movslq -0xa4(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    0x28(%rax),%eax
lea    0x900(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    16b8 <dist_3v_allt_from_m123_v1+0x568>
jmp    177a <dist_3v_allt_from_m123_v1+0x62a>
mov    -0x60(%rbp),%rdi
mov    -0x64(%rbp),%edx
mov    $0x1,%ecx
mov    $0x7,%r8d
mov    %ecx,%esi
call   1060 <free_imatrix@plt>
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist_3v_allt_from_m123_v1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,%rbp
mov    %rcx,%r13
mov    %rdx,0x20(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdi,0x18(%rsp)
mov    0x128(%rsp),%r15d
mov    0xc0(%rsp),%r14d
mov    0xb8(%rsp),%r12d
mov    0xa8(%rsp),%rbx
mov    $0x1,%edi
mov    $0x7a120,%esi
mov    $0x1,%edx
mov    $0x7,%ecx
call   1050 <imatrix@plt>
mov    %rax,0x48(%rsp)
test   %r15d,%r15d
je     133d <dist_3v_allt_from_m123_v1+0x1dd>
mov    %rbp,0x10(%rsp)
lea    0xe25(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rax
test   %r12d,%r12d
mov    0x18(%rsp),%r14
mov    0xa0(%rsp),%r12
jle    1231 <dist_3v_allt_from_m123_v1+0xd1>
lea    0x1(%rax),%ebx
mov    $0x1,%ebp
lea    0xe06(%rip),%r15
nopl   0x0(%rax)
mov    (%r14,%rbp,4),%esi
mov    0x0(%r13,%rbp,4),%edx
movsbl (%r12,%rbp,1),%ecx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1210 <dist_3v_allt_from_m123_v1+0xb0>
mov    %r13,0x40(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdd2(%rip),%rdi
mov    0xc0(%rsp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %ebx,%ebx
mov    0x8(%rsp),%r13
mov    0xa8(%rsp),%r14
mov    0x10(%rsp),%r12
jle    12a1 <dist_3v_allt_from_m123_v1+0x141>
lea    0x1(%rbx),%ebp
mov    $0x1,%ebx
lea    0xd93(%rip),%r15
nopl   0x0(%rax)
mov    0x0(%r13,%rbx,4),%esi
mov    (%r12,%rbx,4),%edx
movsbl (%r14,%rbx,1),%ecx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1280 <dist_3v_allt_from_m123_v1+0x120>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd76(%rip),%rdi
mov    0xc8(%rsp),%ebx
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %ebx,%ebx
mov    0x28(%rsp),%r12
mov    0x20(%rsp),%r13
mov    0xb0(%rsp),%r14
jle    1311 <dist_3v_allt_from_m123_v1+0x1b1>
mov    0xc8(%rsp),%eax
lea    0x1(%rax),%ebp
mov    $0x1,%ebx
lea    0xd21(%rip),%r15
xchg   %ax,%ax
mov    0x0(%r13,%rbx,4),%esi
mov    (%r12,%rbx,4),%edx
movsbl (%r14,%rbx,1),%ecx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    12f0 <dist_3v_allt_from_m123_v1+0x190>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xb8(%rsp),%r12d
mov    0xc0(%rsp),%r14d
mov    0x10(%rsp),%rbp
mov    0x40(%rsp),%r13
mov    0xa8(%rsp),%rbx
mov    0xd8(%rsp),%r15
lea    0x50(%rsp),%r10
mov    0x18(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
mov    0xa0(%rsp),%r8
mov    %rbx,%r9
push   $0x0
mov    0x128(%rsp),%eax
push   %rax
push   $0x7a120
push   $0xffffffffffffffff
mov    0x128(%rsp),%eax
push   %rax
push   $0x1
push   0x128(%rsp)
mov    0x128(%rsp),%eax
push   %rax
mov    0x128(%rsp),%eax
push   %rax
mov    0x128(%rsp),%eax
push   %rax
mov    %r10,%rbx
push   %r10
mov    %r12,%rax
mov    0xa0(%rsp),%r12
push   %r12
push   %r14
push   %rax
call   1040 <dist_2v_allt_v2@plt>
add    $0x70,%rsp
mov    0x58(%rsp),%eax
mov    %eax,0x8(%rsp)
test   %eax,%eax
lea    0x5c(%rsp),%rax
cmovns %rbx,%rax
mov    (%rax),%r14d
mov    0x128(%rsp),%eax
test   %eax,%eax
je     1438 <dist_3v_allt_from_m123_v1+0x2d8>
lea    0xc52(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %r14d,%r14d
jle    1438 <dist_3v_allt_from_m123_v1+0x2d8>
lea    0x1(%r14),%ebx
mov    $0x1,%ebp
lea    0xc54(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r12,%rbp,8),%rax
mov    0x4(%rax),%esi
mov    0x8(%rax),%edx
mov    0xc(%rax),%ecx
mov    0x18(%rax),%r8d
mov    0x1c(%rax),%r9d
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1410 <dist_3v_allt_from_m123_v1+0x2b0>
lea    0x30(%rsp),%rax
mov    %r12,%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%rdx
mov    0xb0(%rsp),%rcx
mov    %r14d,%r8d
mov    0xc8(%rsp),%r9d
mov    0x128(%rsp),%ebx
push   %rbx
mov    0x128(%rsp),%ebp
push   %rbp
mov    0x128(%rsp),%ebp
push   %rbp
mov    0x128(%rsp),%ebp
push   %rbp
mov    0x128(%rsp),%ebp
push   %rbp
mov    0x128(%rsp),%ebp
push   %rbp
push   0x128(%rsp)
mov    0x128(%rsp),%ebp
push   %rbp
mov    0x128(%rsp),%ebp
push   %rbp
mov    0x128(%rsp),%ebp
push   %rbp
push   %rax
mov    0x128(%rsp),%r13
push   %r13
call   1080 <dist_3v_allt_v3@plt>
add    $0x60,%rsp
mov    0x30(%rsp),%esi
mov    %esi,(%r15)
mov    0x34(%rsp),%eax
mov    %eax,0x4(%r15)
mov    0x8(%rsp),%eax
add    0x38(%rsp),%eax
mov    %eax,0x8(%r15)
mov    0x3c(%rsp),%eax
mov    %eax,0xc(%r15)
test   %ebx,%ebx
je     154a <dist_3v_allt_from_m123_v1+0x3ea>
lea    0xb56(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmpl   $0x0,(%r15)
jle    154a <dist_3v_allt_from_m123_v1+0x3ea>
lea    0xb50(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%r13,%rbp,8),%rax
mov    0x4(%rax),%esi
mov    0x8(%rax),%edx
mov    0xc(%rax),%ecx
mov    0x10(%rax),%r8d
mov    0x20(%rax),%r9d
mov    0x24(%rax),%r10d
mov    0x28(%rax),%ebx
mov    %r14,%rdi
xor    %eax,%eax
push   %rbx
push   %r10
call   1060 <printf@plt>
add    $0x10,%rsp
movslq (%r15),%rax
add    $0x1,%rbp
cmp    %rax,%rbp
jl     1510 <dist_3v_allt_from_m123_v1+0x3b0>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x7a120,%edx
mov    $0x1,%ecx
mov    $0x7,%r8d
call   1070 <free_imatrix@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"motif 1 (%d): \00"
@.str.1 = [10 x i8] c"%d %d %d,\00"
@.str.3 = [15 x i8] c"motif 2 (%d): \00"
@.str.4 = [15 x i8] c"motif 3 (%d): \00"
@.str.5 = [13 x i8] c"ovdi12 (%d)\0A\00"
@.str.6 = [16 x i8] c"%d %d %d %d %d\0A\00"
@.str.7 = [14 x i8] c"ovdi123 (%d)\0A\00"
@.str.8 = [22 x i8] c"%d %d %d %d %d %d %d\0A\00"
define void @dist_3v_allt_from_m123_v1(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i8* %6, i8* %7, i8* %8, i32 %9, i32 %10, i32 %11, i32** %12, i32* nocapture %13, i32 %14, i32 %15, i32 %16, i32* %17, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23) {
%25 = alloca [4 x i32]
%26 = alloca [4 x i32]
%27 = bitcast [4 x i32]* %25 to i8*
%28 = bitcast [4 x i32]* %26 to i8*
%29 = tail call i32** @imatrix(i32 1, i32 500000, i32 1, i32 7)
%30 = icmp eq i32 %23, 0
br i1 %30, label %89, label %31
31: ; preds = %24
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %9)
%33 = icmp slt i32 %9, 1
br i1 %33, label %49, label %34
34: ; preds = %31
%35 = add nuw i32 %9, 1
%36 = zext i32 %35 to i64
br label %37
37: ; preds = %34, %37
%38 = phi i64 [ 1, %34 ], [ %47, %37 ]
%39 = getelementptr inbounds i32, i32* %0, i64 %38
%40 = load i32, i32* %39
%41 = getelementptr inbounds i32, i32* %3, i64 %38
%42 = load i32, i32* %41
%43 = getelementptr inbounds i8, i8* %6, i64 %38
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %40, i32 %42, i32 %45)
%47 = add nuw nsw i64 %38, 1
%48 = icmp eq i64 %47, %36
br i1 %48, label %49, label %37
49: ; preds = %37, %31
%50 = tail call i32 @putchar(i32 10)
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%52 = icmp slt i32 %10, 1
br i1 %52, label %68, label %53
53: ; preds = %49
%54 = add nuw i32 %10, 1
%55 = zext i32 %54 to i64
br label %56
56: ; preds = %53, %56
%57 = phi i64 [ 1, %53 ], [ %66, %56 ]
%58 = getelementptr inbounds i32, i32* %1, i64 %57
%59 = load i32, i32* %58
%60 = getelementptr inbounds i32, i32* %4, i64 %57
%61 = load i32, i32* %60
%62 = getelementptr inbounds i8, i8* %7, i64 %57
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %59, i32 %61, i32 %64)
%66 = add nuw nsw i64 %57, 1
%67 = icmp eq i64 %66, %55
br i1 %67, label %68, label %56
68: ; preds = %56, %49
%69 = tail call i32 @putchar(i32 10)
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%71 = icmp slt i32 %11, 1
br i1 %71, label %87, label %72
72: ; preds = %68
%73 = add nuw i32 %11, 1
%74 = zext i32 %73 to i64
br label %75
75: ; preds = %72, %75
%76 = phi i64 [ 1, %72 ], [ %85, %75 ]
%77 = getelementptr inbounds i32, i32* %2, i64 %76
%78 = load i32, i32* %77
%79 = getelementptr inbounds i32, i32* %5, i64 %76
%80 = load i32, i32* %79
%81 = getelementptr inbounds i8, i8* %8, i64 %76
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %78, i32 %80, i32 %83)
%85 = add nuw nsw i64 %76, 1
%86 = icmp eq i64 %85, %74
br i1 %86, label %87, label %75
87: ; preds = %75, %68
%88 = tail call i32 @putchar(i32 10)
br label %89
89: ; preds = %87, %24
%90 = getelementptr inbounds [4 x i32], [4 x i32]* %25, i64 0, i64 0
%91 = call i32 @dist_2v_allt_v2(i32* %0, i32* %1, i32* %3, i32* %4, i8* %6, i8* %7, i32 %9, i32 %10, i32** %29, i32* %90, i32 %14, i32 %15, i32 %16, i32* %17, i32 1, i32 %19, i32 -1, i32 500000, i32 %22, i32 0)
%92 = getelementptr inbounds [4 x i32], [4 x i32]* %25, i64 0, i64 2
%93 = load i32, i32* %92
%94 = icmp slt i32 %93, 0
%95 = getelementptr inbounds [4 x i32], [4 x i32]* %25, i64 0, i64 3
%96 = load i32, i32* %95
%97 = load i32, i32* %90
%98 = select i1 %94, i32 %96, i32 %97
br i1 %30, label %122, label %99
99: ; preds = %89
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %98)
%101 = icmp slt i32 %98, 1
br i1 %101, label %122, label %102
102: ; preds = %99
%103 = add nuw i32 %98, 1
%104 = zext i32 %103 to i64
br label %105
105: ; preds = %102, %105
%106 = phi i64 [ 1, %102 ], [ %120, %105 ]
%107 = getelementptr inbounds i32*, i32** %29, i64 %106
%108 = load i32*, i32** %107
%109 = getelementptr inbounds i32, i32* %108, i64 1
%110 = load i32, i32* %109
%111 = getelementptr inbounds i32, i32* %108, i64 2
%112 = load i32, i32* %111
%113 = getelementptr inbounds i32, i32* %108, i64 3
%114 = load i32, i32* %113
%115 = getelementptr inbounds i32, i32* %108, i64 6
%116 = load i32, i32* %115
%117 = getelementptr inbounds i32, i32* %108, i64 7
%118 = load i32, i32* %117
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %110, i32 %112, i32 %114, i32 %116, i32 %118)
%120 = add nuw nsw i64 %106, 1
%121 = icmp eq i64 %120, %104
br i1 %121, label %122, label %105
122: ; preds = %105, %99, %89
%123 = getelementptr inbounds [4 x i32], [4 x i32]* %26, i64 0, i64 0
%124 = call i32 @dist_3v_allt_v3(i32** %29, i32* %2, i32* %5, i8* %8, i32 %98, i32 %11, i32** %12, i32* %123, i32 %14, i32 %15, i32 %16, i32* %17, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23)
%125 = load i32, i32* %123
store i32 %125, i32* %13
%126 = getelementptr inbounds [4 x i32], [4 x i32]* %26, i64 0, i64 1
%127 = load i32, i32* %126
%128 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %127, i32* %128
%129 = getelementptr inbounds [4 x i32], [4 x i32]* %26, i64 0, i64 2
%130 = load i32, i32* %129
%131 = add nsw i32 %130, %93
%132 = getelementptr inbounds i32, i32* %13, i64 2
store i32 %131, i32* %132
%133 = getelementptr inbounds [4 x i32], [4 x i32]* %26, i64 0, i64 3
%134 = load i32, i32* %133
%135 = getelementptr inbounds i32, i32* %13, i64 3
store i32 %134, i32* %135
br i1 %30, label %163, label %136
136: ; preds = %122
%137 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %125)
%138 = load i32, i32* %13
%139 = icmp slt i32 %138, 1
br i1 %139, label %163, label %140
140: ; preds = %136, %140
%141 = phi i64 [ %159, %140 ], [ 1, %136 ]
%142 = getelementptr inbounds i32*, i32** %12, i64 %141
%143 = load i32*, i32** %142
%144 = getelementptr inbounds i32, i32* %143, i64 1
%145 = load i32, i32* %144
%146 = getelementptr inbounds i32, i32* %143, i64 2
%147 = load i32, i32* %146
%148 = getelementptr inbounds i32, i32* %143, i64 3
%149 = load i32, i32* %148
%150 = getelementptr inbounds i32, i32* %143, i64 4
%151 = load i32, i32* %150
%152 = getelementptr inbounds i32, i32* %143, i64 8
%153 = load i32, i32* %152
%154 = getelementptr inbounds i32, i32* %143, i64 9
%155 = load i32, i32* %154
%156 = getelementptr inbounds i32, i32* %143, i64 10
%157 = load i32, i32* %156
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %145, i32 %147, i32 %149, i32 %151, i32 %153, i32 %155, i32 %157)
%159 = add nuw nsw i64 %141, 1
%160 = load i32, i32* %13
%161 = sext i32 %160 to i64
%162 = icmp slt i64 %141, %161
br i1 %162, label %140, label %163
163: ; preds = %140, %136, %122
%164 = call i32 @free_imatrix(i32** %29, i32 1, i32 500000, i32 1, i32 7)
ret void
}