#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 */
char *cvector(int, int);
int /*<<< orphan*/ dist_2v_ordered_v2(int *, int *, char *, char *, int, int,
                                      int **, int *, int, int, int, int *, int,
                                      int, int /*<<< orphan*/);
int /*<<< orphan*/ dist_2v_unordered_v3(int *, int *, char *, char *, int, int,
                                        int **, int *, int, int, int, int *,
                                        int);
int /*<<< orphan*/ free_cvector(char *, int, int);
int /*<<< orphan*/ free_imatrix(int **, int, int, int, int);
int /*<<< orphan*/ free_ivector(int *, int, int);
int **imatrix(int, int, int, int);
int *ivector(int, int);
int /*<<< orphan*/ printf(char *, ...);
void dist_2v_allt_v2(int *m1_t, int *m2_t, int *m1_p, int *m2_p, char *m1_s,
                     char *m2_s, int n1, int n2, 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 **ovdi_single_transcript;
  int *m1p;
  char *m1s;
  int *m2p;
  char *m2s;
  int curr_n1, curr_n2;
  int curr_tr1, curr_tr2;
  int errorcode = 0;
  int i, j;
  int i1, i2;
  int max_n_ovdi_single_transcript = 50000;
  int max_transcript_occurrences = 10000;
  int n12;
  int n12_stop = 0;
  int n12_tr = 0;
  int running_entries = 0;
  int transcript = 0;
  i1 = 1;
  curr_tr1 = m1_t[i1];
  i2 = 1;
  curr_tr2 = m2_t[i2];
  m1p = ivector(1, max_transcript_occurrences);
  m1s = cvector(1, max_transcript_occurrences);
  m2p = ivector(1, max_transcript_occurrences);
  m2s = cvector(1, max_transcript_occurrences);
  ovdi_single_transcript = imatrix(1, max_n_ovdi_single_transcript, 1, 6);
  if (max_n_transcripts < 0)
    max_n_transcripts = n_transcripts + 1;
  while ((transcript < n_transcripts) & (n12_tr <= max_n_transcripts)) {
    transcript++;
    if ((curr_tr1 < 0) | (curr_tr2 < 0))
      transcript = n_transcripts + 1;
    while ((curr_tr1 < transcript) & (curr_tr1 >= 0) & (i1 < n1)) {
      i1++;
      curr_tr1 = m1_t[i1];
    }
    if (curr_tr1 == transcript) {
      curr_n1 = 0;
      while ((curr_tr1 == transcript) & (i1 <= n1)) {
        curr_n1++;
        m1p[curr_n1] = m1_p[i1];
        m1s[curr_n1] = m1_s[i1];
        i1++;
        if (i1 <= n1)
          curr_tr1 = m1_t[i1];
      }
      i1--;
      curr_tr1 = transcript;
      while ((curr_tr2 < transcript) & (curr_tr2 >= 0) & (i2 < n2)) {
        i2++;
        curr_tr2 = m2_t[i2];
      }
      if (curr_tr2 == transcript) {
        curr_n2 = 0;
        while ((curr_tr2 == transcript) & (i2 <= n2)) {
          curr_n2++;
          m2p[curr_n2] = m2_p[i2];
          m2s[curr_n2] = m2_s[i2];
          i2++;
          if (i2 <= n2)
            curr_tr2 = m2_t[i2];
        }
        i2--;
        curr_tr2 = transcript;
        if (verbose) {
          printf("transcript=%d\n", transcript);
          printf("motif 1 (%d): ", curr_n1);
          for (i = 1; i <= curr_n1; i++)
            printf("%d %d,", m1p[i], m1s[i]);
          printf("\n");
          printf("motif 2 (%d): ", curr_n2);
          for (i = 1; i <= curr_n2; i++)
            printf("%d %d,", m2p[i], m2s[i]);
          printf("\n");
        }
        if (order_constraint == 1) {
          dist_2v_ordered_v2(m1p, m2p, m1s, m2s, curr_n1, curr_n2,
                             ovdi_single_transcript, n, min_dist, max_dist,
                             max_n_ovdi_single_transcript, ml, get_positions,
                             pos_format, 0);
        } else {
          dist_2v_unordered_v3(m1p, m2p, m1s, m2s, curr_n1, curr_n2,
                               ovdi_single_transcript, n, min_dist, max_dist,
                               max_n_ovdi_single_transcript, ml, get_positions);
        }
        n12 = n[0];
        errorcode += n[1];
        if (verbose) {
          printf("ovdi_single_transcript (%d)\n", n12);
          for (i = 1; i <= n12; i++)
            printf("%d %d %d %d\n", ovdi_single_transcript[i][1],
                   ovdi_single_transcript[i][2], ovdi_single_transcript[i][3],
                   ovdi_single_transcript[i][4]);
        }
        if (n12 > 0)
          n12_tr++;
        if (get_positions == 1) {
          if ((running_entries + n12) > max_n_ovdi) {
            get_positions = 0;
            errorcode--;
            n12_stop = running_entries;
            printf("running_entries=%d\n", running_entries);
            printf("n12=%d\n", n12);
            printf("setting get_positions to 0\n");
          }
          for (i = 1; i <= n12; i++) {
            running_entries++;
            ovdi[running_entries][1] = transcript;
            ovdi[running_entries][2] = ovdi_single_transcript[i][1];
            ovdi[running_entries][3] = ovdi_single_transcript[i][2];
            ovdi[running_entries][4] = ovdi_single_transcript[i][3];
            ovdi[running_entries][5] = ovdi_single_transcript[i][4];
            ovdi[running_entries][6] = ovdi_single_transcript[i][5];
            ovdi[running_entries][7] = ovdi_single_transcript[i][6];
          }
        } else {
          running_entries += n12;
        }
      }
    }
  }
  n[0] = running_entries;
  n[1] = n12_tr;
  n[2] = errorcode;
  if (errorcode < 0) {
    if (n12_stop <= 0)
      n12_stop = running_entries;
    n[3] = n12_stop;
  } else {
    n[3] = running_entries;
  }
  free_ivector(m1p, 1, max_transcript_occurrences);
  free_cvector(m1s, 1, max_transcript_occurrences);
  free_ivector(m2p, 1, max_transcript_occurrences);
  free_cvector(m2s, 1, max_transcript_occurrences);
  free_imatrix(ovdi_single_transcript, 1, max_n_ovdi_single_transcript, 1, 6);
}


x86 assembly (clang, -O0):
<dist_2v_allt_v2>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    0x78(%rbp),%eax
mov    0x70(%rbp),%eax
mov    0x68(%rbp),%eax
mov    0x60(%rbp),%eax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
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   $0x0,-0x94(%rbp)
movl   $0xc350,-0xa8(%rbp)
movl   $0x2710,-0xac(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0xb8(%rbp)
movl   $0x0,-0xbc(%rbp)
movl   $0x0,-0xc0(%rbp)
movl   $0x1,-0xa0(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8c(%rbp)
movl   $0x1,-0xa4(%rbp)
mov    -0x38(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x90(%rbp)
mov    -0xac(%rbp),%esi
mov    $0x1,%edi
call   10a0 <ivector@plt>
mov    %rax,-0x68(%rbp)
mov    -0xac(%rbp),%esi
mov    $0x1,%edi
call   1050 <cvector@plt>
mov    %rax,-0x70(%rbp)
mov    -0xac(%rbp),%esi
mov    $0x1,%edi
call   10a0 <ivector@plt>
mov    %rax,-0x78(%rbp)
mov    -0xac(%rbp),%esi
mov    $0x1,%edi
call   1050 <cvector@plt>
mov    %rax,-0x80(%rbp)
mov    -0xa8(%rbp),%esi
mov    $0x1,%edx
mov    $0x6,%ecx
mov    %edx,%edi
call   1030 <imatrix@plt>
mov    %rax,-0x60(%rbp)
cmpl   $0x0,0x60(%rbp)
jge    12e9 <dist_2v_allt_v2+0x159>
mov    0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,0x60(%rbp)
jmp    12ee <dist_2v_allt_v2+0x15e>
mov    -0xc0(%rbp),%eax
cmp    0x40(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0xb8(%rbp),%ecx
cmp    0x60(%rbp),%ecx
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1abf <dist_2v_allt_v2+0x92f>
mov    -0xc0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
cmpl   $0x0,-0x8c(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x90(%rbp)
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     1361 <dist_2v_allt_v2+0x1d1>
mov    0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc0(%rbp)
jmp    1366 <dist_2v_allt_v2+0x1d6>
mov    -0x8c(%rbp),%eax
cmp    -0xc0(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x8c(%rbp)
setge  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
mov    -0xa0(%rbp),%ecx
cmp    0x10(%rbp),%ecx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     13d1 <dist_2v_allt_v2+0x241>
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
mov    -0x30(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8c(%rbp)
jmp    1366 <dist_2v_allt_v2+0x1d6>
mov    -0x8c(%rbp),%eax
cmp    -0xc0(%rbp),%eax
jne    1aba <dist_2v_allt_v2+0x92a>
movl   $0x0,-0x84(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xc0(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0xa0(%rbp),%ecx
cmp    0x10(%rbp),%ecx
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     149c <dist_2v_allt_v2+0x30c>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
mov    -0x40(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x68(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x50(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x70(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1497 <dist_2v_allt_v2+0x307>
mov    -0x30(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8c(%rbp)
jmp    13ed <dist_2v_allt_v2+0x25d>
mov    -0xa0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa0(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0xc0(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x90(%rbp)
setge  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
mov    -0xa4(%rbp),%ecx
cmp    0x18(%rbp),%ecx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1522 <dist_2v_allt_v2+0x392>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
mov    -0x38(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x90(%rbp)
jmp    14b7 <dist_2v_allt_v2+0x327>
mov    -0x90(%rbp),%eax
cmp    -0xc0(%rbp),%eax
jne    1ab5 <dist_2v_allt_v2+0x925>
movl   $0x0,-0x88(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0xc0(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0xa4(%rbp),%ecx
cmp    0x18(%rbp),%ecx
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     15ed <dist_2v_allt_v2+0x45d>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
mov    -0x48(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x78(%rbp),%rax
movslq -0x88(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x80(%rbp),%rax
movslq -0x88(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     15e8 <dist_2v_allt_v2+0x458>
mov    -0x38(%rbp),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x90(%rbp)
jmp    153e <dist_2v_allt_v2+0x3ae>
mov    -0xa4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa4(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0x90(%rbp)
cmpl   $0x0,0x78(%rbp)
je     1720 <dist_2v_allt_v2+0x590>
mov    -0xc0(%rbp),%esi
lea    0x9e1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x84(%rbp),%esi
lea    0x9dc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x98(%rbp)
mov    -0x98(%rbp),%eax
cmp    -0x84(%rbp),%eax
jg     1695 <dist_2v_allt_v2+0x505>
mov    -0x68(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x70(%rbp),%rax
movslq -0x98(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
lea    0x9a4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1644 <dist_2v_allt_v2+0x4b4>
lea    0x9b3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x88(%rbp),%esi
lea    0x975(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x98(%rbp)
mov    -0x98(%rbp),%eax
cmp    -0x88(%rbp),%eax
jg     1712 <dist_2v_allt_v2+0x582>
mov    -0x78(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x80(%rbp),%rax
movslq -0x98(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
lea    0x927(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    16c1 <dist_2v_allt_v2+0x531>
lea    0x936(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,0x58(%rbp)
jne    17ae <dist_2v_allt_v2+0x61e>
mov    -0x68(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x80(%rbp),%rcx
mov    -0x84(%rbp),%r8d
mov    -0x88(%rbp),%r9d
mov    -0x60(%rbp),%r13
mov    0x28(%rbp),%r12
mov    0x30(%rbp),%r15d
mov    0x38(%rbp),%r14d
mov    -0xa8(%rbp),%ebx
mov    0x48(%rbp),%r11
mov    0x50(%rbp),%r10d
mov    0x70(%rbp),%eax
mov    %eax,-0xc4(%rbp)
xor    %eax,%eax
mov    -0xc4(%rbp),%eax
mov    %r13,(%rsp)
mov    %r12,0x8(%rsp)
mov    %r15d,0x10(%rsp)
mov    %r14d,0x18(%rsp)
mov    %ebx,0x20(%rsp)
mov    %r11,0x28(%rsp)
mov    %r10d,0x30(%rsp)
mov    %eax,0x38(%rsp)
movl   $0x0,0x40(%rsp)
call   10b0 <dist_2v_ordered_v2@plt>
jmp    180e <dist_2v_allt_v2+0x67e>
mov    -0x68(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x80(%rbp),%rcx
mov    -0x84(%rbp),%r8d
mov    -0x88(%rbp),%r9d
mov    -0x60(%rbp),%r12
mov    0x28(%rbp),%r15
mov    0x30(%rbp),%r14d
mov    0x38(%rbp),%ebx
mov    -0xa8(%rbp),%r11d
mov    0x48(%rbp),%r10
mov    0x50(%rbp),%eax
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %ebx,0x18(%rsp)
mov    %r11d,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %eax,0x30(%rsp)
call   1060 <dist_2v_unordered_v3@plt>
mov    0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xb0(%rbp)
mov    0x28(%rbp),%rax
mov    0x4(%rax),%eax
add    -0x94(%rbp),%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x0,0x78(%rbp)
je     18d7 <dist_2v_allt_v2+0x747>
mov    -0xb0(%rbp),%esi
lea    0x7f0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x98(%rbp)
mov    -0x98(%rbp),%eax
cmp    -0xb0(%rbp),%eax
jg     18d2 <dist_2v_allt_v2+0x742>
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x4(%rax),%esi
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%edx
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0xc(%rax),%ecx
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rdi
mov    (%rax,%rdi,8),%rax
mov    0x10(%rax),%r8d
lea    0x79a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1855 <dist_2v_allt_v2+0x6c5>
jmp    18d7 <dist_2v_allt_v2+0x747>
cmpl   $0x0,-0xb0(%rbp)
jle    18f3 <dist_2v_allt_v2+0x763>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
cmpl   $0x1,0x50(%rbp)
jne    1a9e <dist_2v_allt_v2+0x90e>
mov    -0xbc(%rbp),%eax
add    -0xb0(%rbp),%eax
cmp    0x68(%rbp),%eax
jle    196a <dist_2v_allt_v2+0x7da>
movl   $0x0,0x50(%rbp)
mov    -0x94(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x94(%rbp)
mov    -0xbc(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0xbc(%rbp),%esi
lea    0x71d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xb0(%rbp),%esi
lea    0x71d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x717(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x98(%rbp)
mov    -0x98(%rbp),%eax
cmp    -0xb0(%rbp),%eax
jg     1a99 <dist_2v_allt_v2+0x909>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
mov    -0xc0(%rbp),%ecx
mov    0x20(%rbp),%rax
movslq -0xbc(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0x4(%rax)
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x4(%rax),%ecx
mov    0x20(%rbp),%rax
movslq -0xbc(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0x8(%rax)
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%ecx
mov    0x20(%rbp),%rax
movslq -0xbc(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0xc(%rax)
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0xc(%rax),%ecx
mov    0x20(%rbp),%rax
movslq -0xbc(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0x10(%rax)
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%ecx
mov    0x20(%rbp),%rax
movslq -0xbc(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0x14(%rax)
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x14(%rax),%ecx
mov    0x20(%rbp),%rax
movslq -0xbc(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0x18(%rax)
mov    -0x60(%rbp),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x18(%rax),%ecx
mov    0x20(%rbp),%rax
movslq -0xbc(%rbp),%rdx
mov    (%rax,%rdx,8),%rax
mov    %ecx,0x1c(%rax)
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1974 <dist_2v_allt_v2+0x7e4>
jmp    1ab0 <dist_2v_allt_v2+0x920>
mov    -0xb0(%rbp),%eax
add    -0xbc(%rbp),%eax
mov    %eax,-0xbc(%rbp)
jmp    1ab5 <dist_2v_allt_v2+0x925>
jmp    1aba <dist_2v_allt_v2+0x92a>
jmp    12ee <dist_2v_allt_v2+0x15e>
mov    -0xbc(%rbp),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xb8(%rbp),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x94(%rbp),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,0x8(%rax)
cmpl   $0x0,-0x94(%rbp)
jge    1b1d <dist_2v_allt_v2+0x98d>
cmpl   $0x0,-0xb4(%rbp)
jg     1b0b <dist_2v_allt_v2+0x97b>
mov    -0xbc(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,0xc(%rax)
jmp    1b2a <dist_2v_allt_v2+0x99a>
mov    -0xbc(%rbp),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x68(%rbp),%rdi
mov    -0xac(%rbp),%edx
mov    $0x1,%esi
call   1090 <free_ivector@plt>
mov    -0x70(%rbp),%rdi
mov    -0xac(%rbp),%edx
mov    $0x1,%esi
call   1080 <free_cvector@plt>
mov    -0x78(%rbp),%rdi
mov    -0xac(%rbp),%edx
mov    $0x1,%esi
call   1090 <free_ivector@plt>
mov    -0x80(%rbp),%rdi
mov    -0xac(%rbp),%edx
mov    $0x1,%esi
call   1080 <free_cvector@plt>
mov    -0x60(%rbp),%rdi
mov    -0xa8(%rbp),%edx
mov    $0x1,%ecx
mov    $0x6,%r8d
mov    %ecx,%esi
call   1070 <free_imatrix@plt>
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist_2v_allt_v2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %r9,0xe8(%rsp)
mov    %r8,0x100(%rsp)
mov    %rcx,0xe0(%rsp)
mov    %rdx,0xf8(%rsp)
mov    %rdi,%r12
mov    0x1a8(%rsp),%eax
mov    %eax,0x68(%rsp)
mov    0x1a0(%rsp),%eax
mov    %rax,0xd0(%rsp)
mov    0x198(%rsp),%eax
mov    %eax,0x9c(%rsp)
mov    0x188(%rsp),%eax
mov    %eax,0xa0(%rsp)
mov    0x180(%rsp),%eax
mov    %rax,0x40(%rsp)
mov    0x178(%rsp),%rax
mov    %rax,0xb8(%rsp)
mov    0x170(%rsp),%r15d
mov    0x168(%rsp),%eax
mov    %rax,0xb0(%rsp)
mov    0x160(%rsp),%eax
mov    %rax,0xa8(%rsp)
mov    0x158(%rsp),%rax
mov    %rax,0x78(%rsp)
mov    0x150(%rsp),%r13
mov    0x148(%rsp),%eax
mov    %eax,0x34(%rsp)
mov    0x140(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x190(%rsp),%r14d
mov    0x4(%rdi),%ebp
mov    %rsi,0x70(%rsp)
mov    0x4(%rsi),%ebx
mov    $0x1,%edi
mov    $0x2710,%esi
call   10c0 <ivector@plt>
mov    %rax,0x28(%rsp)
mov    $0x1,%edi
mov    $0x2710,%esi
call   1070 <cvector@plt>
mov    %rax,0x50(%rsp)
mov    $0x1,%edi
mov    $0x2710,%esi
call   10c0 <ivector@plt>
mov    %rax,0x88(%rsp)
mov    $0x1,%edi
mov    $0x2710,%esi
call   1070 <cvector@plt>
mov    %rax,0x48(%rsp)
mov    $0x1,%edi
mov    $0xc350,%esi
mov    $0x1,%edx
mov    $0x6,%ecx
call   1040 <imatrix@plt>
mov    %rax,0x20(%rsp)
lea    0x1(%r15),%eax
test   %r14d,%r14d
cmovns %r14d,%eax
mov    %eax,0xa4(%rsp)
test   %eax,%eax
js     1997 <dist_2v_allt_v2+0x7e7>
mov    %r15,%rcx
test   %ecx,%ecx
jle    1997 <dist_2v_allt_v2+0x7e7>
mov    0xc(%rsp),%esi
movslq %esi,%r15
movslq 0x34(%rsp),%rax
mov    %rax,0x90(%rsp)
lea    0x4(%r12),%rax
mov    %rax,0xf0(%rsp)
mov    0x70(%rsp),%r10
lea    0x4(%r10),%rax
mov    %rax,0xc8(%rsp)
add    $0x8,%r13
mov    %r13,0xc0(%rsp)
mov    $0x1,%r14d
xor    %r8d,%r8d
xor    %eax,%eax
mov    %rax,0x80(%rsp)
xor    %r11d,%r11d
movl   $0x0,0x64(%rsp)
mov    $0x1,%r13d
movl   $0x0,0x1c(%rsp)
mov    0x28(%rsp),%rdi
mov    %rcx,0x38(%rsp)
mov    %r12,0xd8(%rsp)
mov    %r15,0x58(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%eax
or     %ebp,%eax
mov    %r8d,%eax
cmovs  %ecx,%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x8(%rsp)
xor    %ecx,%ecx
cmp    %eax,%ebp
setle  %cl
mov    %ebp,%edx
not    %edx
shr    $0x1f,%edx
and    %ecx,%edx
xor    %ecx,%ecx
mov    %esi,%r9d
cmp    %esi,%r13d
setl   %cl
test   %ecx,%edx
je     1428 <dist_2v_allt_v2+0x278>
movslq %r13d,%rcx
add    $0x1,%rcx
nopw   0x0(%rax,%rax,1)
mov    (%r12,%rcx,4),%ebp
xor    %edx,%edx
cmp    %eax,%ebp
setle  %dl
mov    %ebp,%esi
not    %esi
shr    $0x1f,%esi
and    %edx,%esi
xor    %edx,%edx
cmp    %r15,%rcx
setl   %dl
add    $0x1,%r13d
add    $0x1,%rcx
test   %edx,%esi
jne    1400 <dist_2v_allt_v2+0x250>
mov    0x8(%rsp),%r8d
cmp    %r8d,%ebp
jne    15d8 <dist_2v_allt_v2+0x428>
xor    %r15d,%r15d
cmp    %r9d,%r13d
mov    %r11d,0x6c(%rsp)
jle    1450 <dist_2v_allt_v2+0x2a0>
mov    0x90(%rsp),%rbp
jmp    14d8 <dist_2v_allt_v2+0x328>
movslq %r13d,%rcx
mov    0xf8(%rsp),%rdx
lea    (%rdx,%rcx,4),%r8
mov    0x100(%rsp),%rdx
lea    (%rdx,%rcx,1),%rsi
mov    0xf0(%rsp),%rdx
lea    (%rdx,%rcx,4),%r9
xor    %edx,%edx
nopl   0x0(%rax)
mov    %rdx,%r15
lea    (%rcx,%rdx,1),%rbp
mov    (%r8,%rdx,4),%edx
mov    %edx,0x4(%rdi,%r15,4)
movzbl (%rsi,%r15,1),%edx
mov    0x50(%rsp),%r11
mov    %dl,0x1(%r11,%r15,1)
cmp    0x58(%rsp),%rbp
jge    14bb <dist_2v_allt_v2+0x30b>
mov    0x8(%rsp),%edx
cmp    %edx,(%r9,%r15,4)
jne    14bb <dist_2v_allt_v2+0x30b>
lea    0x1(%r15),%rdx
cmp    0x58(%rsp),%rbp
jl     1480 <dist_2v_allt_v2+0x2d0>
add    %r15d,%r13d
add    $0x1,%r13d
add    $0x1,%r15d
mov    0xc(%rsp),%r9d
mov    0x90(%rsp),%rbp
mov    0x6c(%rsp),%r11d
xor    %ecx,%ecx
cmp    %eax,%ebx
setle  %cl
mov    %ebx,%edx
not    %edx
shr    $0x1f,%edx
and    %ecx,%edx
xor    %ecx,%ecx
cmp    0x34(%rsp),%r14d
setl   %cl
test   %ecx,%edx
je     1528 <dist_2v_allt_v2+0x378>
movslq %r14d,%rcx
add    $0x1,%rcx
nopl   (%rax)
mov    (%r10,%rcx,4),%ebx
xor    %edx,%edx
cmp    %eax,%ebx
setle  %dl
mov    %ebx,%esi
not    %esi
shr    $0x1f,%esi
and    %edx,%esi
xor    %edx,%edx
cmp    %rbp,%rcx
setl   %dl
add    $0x1,%r14d
add    $0x1,%rcx
test   %edx,%esi
jne    1500 <dist_2v_allt_v2+0x350>
add    $0xffffffff,%r13d
mov    0x8(%rsp),%r8d
cmp    %r8d,%ebx
jne    15d0 <dist_2v_allt_v2+0x420>
xor    %r9d,%r9d
cmp    0x34(%rsp),%r14d
jle    15fc <dist_2v_allt_v2+0x44c>
mov    0x88(%rsp),%rsi
mov    0x48(%rsp),%rcx
cmpl   $0x0,0x68(%rsp)
jne    1692 <dist_2v_allt_v2+0x4e2>
cmpl   $0x1,0xa0(%rsp)
01
jne    1781 <dist_2v_allt_v2+0x5d1>
sub    $0x8,%rsp
mov    0x30(%rsp),%rdi
mov    0x58(%rsp),%rdx
mov    %r15d,%r8d
push   $0x0
push   0xe0(%rsp)
push   0x58(%rsp)
push   0xd8(%rsp)
push   $0xc350
push   0xe0(%rsp)
push   0xe0(%rsp)
mov    0xb8(%rsp),%rbx
push   %rbx
push   0x68(%rsp)
call   10d0 <dist_2v_ordered_v2@plt>
add    $0x50,%rsp
jmp    17c6 <dist_2v_allt_v2+0x616>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r8d,%ebp
mov    0x58(%rsp),%r15
mov    0x38(%rsp),%rcx
mov    %r9d,%esi
cmp    0xa4(%rsp),%r11d
jg     19b3 <dist_2v_allt_v2+0x803>
cmp    %ecx,%r8d
jl     13c0 <dist_2v_allt_v2+0x210>
jmp    19b3 <dist_2v_allt_v2+0x803>
movslq %r14d,%rax
mov    0xe0(%rsp),%rcx
lea    (%rcx,%rax,4),%r8
mov    0xe8(%rsp),%rcx
lea    (%rcx,%rax,1),%rdx
mov    0xc8(%rsp),%rcx
lea    (%rcx,%rax,4),%r10
xor    %ebx,%ebx
mov    0x88(%rsp),%rsi
mov    0x48(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
lea    (%rax,%rbx,1),%rbp
mov    (%r8,%rbx,4),%ebx
mov    %ebx,0x4(%rsi,%rdi,4)
movzbl (%rdx,%rdi,1),%ebx
mov    %bl,0x1(%rcx,%rdi,1)
cmp    0x90(%rsp),%rbp
jge    1679 <dist_2v_allt_v2+0x4c9>
mov    0x8(%rsp),%ebx
cmp    %ebx,(%r10,%rdi,4)
jne    1679 <dist_2v_allt_v2+0x4c9>
lea    0x1(%rdi),%rbx
cmp    0x90(%rsp),%rbp
jl     1640 <dist_2v_allt_v2+0x490>
mov    %edi,%r9d
add    $0x1,%r9d
add    %edi,%r14d
add    $0x1,%r14d
cmpl   $0x0,0x68(%rsp)
je     1560 <dist_2v_allt_v2+0x3b0>
mov    %r9,0x10(%rsp)
lea    0x962(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
mov    0x50(%rsp),%r12
call   1060 <printf@plt>
lea    0x95a(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %r15d,%r15d
je     16f4 <dist_2v_allt_v2+0x544>
lea    0x1(%r15),%ebp
mov    $0x1,%ebx
nopl   (%rax)
mov    0x28(%rsp),%rax
mov    (%rax,%rbx,4),%esi
movsbl (%r12,%rbx,1),%edx
lea    0x93a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    16d0 <dist_2v_allt_v2+0x520>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x920(%rip),%rdi
mov    0x10(%rsp),%rbx
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %ebx,%ebx
mov    0x88(%rsp),%r12
je     1754 <dist_2v_allt_v2+0x5a4>
mov    0x10(%rsp),%rax
lea    0x1(%rax),%ebp
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    (%r12,%rbx,4),%esi
mov    0x48(%rsp),%rax
movsbl (%rax,%rbx,1),%edx
lea    0x8da(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1730 <dist_2v_allt_v2+0x580>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rsi
mov    0xd8(%rsp),%r12
mov    0x48(%rsp),%rcx
mov    0x10(%rsp),%r9
cmpl   $0x1,0xa0(%rsp)
01
je     156e <dist_2v_allt_v2+0x3be>
sub    $0x8,%rsp
mov    0x30(%rsp),%rdi
mov    0x58(%rsp),%rdx
mov    %r15d,%r8d
push   0x48(%rsp)
push   0xc8(%rsp)
push   $0xc350
push   0xd0(%rsp)
push   0xd0(%rsp)
mov    0xa8(%rsp),%rbx
push   %rbx
push   0x58(%rsp)
call   1080 <dist_2v_unordered_v3@plt>
add    $0x40,%rsp
mov    0x1c(%rsp),%eax
add    0x4(%rbx),%eax
mov    %eax,0x1c(%rsp)
mov    (%rbx),%eax
mov    %rax,0x10(%rsp)
cmpl   $0x0,0x68(%rsp)
mov    0x20(%rsp),%r15
je     1838 <dist_2v_allt_v2+0x688>
lea    0x849(%rip),%rdi
mov    0x10(%rsp),%rbx
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
test   %ebx,%ebx
jle    1838 <dist_2v_allt_v2+0x688>
mov    0x10(%rsp),%rax
lea    0x1(%rax),%rbp
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rax
mov    0x4(%rax),%esi
mov    0x8(%rax),%edx
mov    0xc(%rax),%ecx
mov    0x10(%rax),%r8d
lea    0x829(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1810 <dist_2v_allt_v2+0x660>
add    $0xffffffff,%r14d
xor    %eax,%eax
mov    0x10(%rsp),%rdx
test   %edx,%edx
setg   %al
mov    0x6c(%rsp),%r11d
add    %eax,%r11d
mov    0x80(%rsp),%rsi
lea    (%rdx,%rsi,1),%eax
cmpl   $0x1,0x40(%rsp)
jne    18c6 <dist_2v_allt_v2+0x716>
cmp    0x9c(%rsp),%eax
mov    0x58(%rsp),%r15
jle    18f6 <dist_2v_allt_v2+0x746>
addl   $0xffffffff,0x1c(%rsp)
xor    %eax,%eax
mov    %rax,0x40(%rsp)
lea    0x7d7(%rip),%rdi
xor    %eax,%eax
mov    %r11d,%ebp
mov    %rsi,%rbx
call   1060 <printf@plt>
lea    0x7d7(%rip),%rdi
mov    0x10(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x7cc(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rsi
mov    0x10(%rsp),%rdx
mov    %ebp,%r11d
mov    %esi,%eax
mov    %esi,0x64(%rsp)
jmp    1900 <dist_2v_allt_v2+0x750>
mov    0x8(%rsp),%r8d
mov    %r8d,%ebp
mov    %r8d,%ebx
mov    %rax,0x80(%rsp)
mov    0x28(%rsp),%rdi
mov    0x70(%rsp),%r10
mov    0x38(%rsp),%rcx
mov    0xc(%rsp),%esi
mov    0x58(%rsp),%r15
jmp    15e0 <dist_2v_allt_v2+0x430>
mov    $0x1,%eax
mov    %rax,0x40(%rsp)
mov    0x28(%rsp),%rdi
mov    0x70(%rsp),%r10
mov    0x20(%rsp),%r9
mov    0x38(%rsp),%rcx
mov    0x8(%rsp),%r8d
test   %edx,%edx
jle    1988 <dist_2v_allt_v2+0x7d8>
movslq %esi,%rax
mov    0xc0(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
xor    %eax,%eax
xchg   %ax,%ax
mov    (%rcx,%rax,8),%rdx
mov    %r8d,0x4(%rdx)
mov    0x8(%r9,%rax,8),%rbp
mov    0x4(%rbp),%ebx
mov    %ebx,0x8(%rdx)
mov    0x8(%rbp),%ebx
mov    %ebx,0xc(%rdx)
mov    0xc(%rbp),%ebx
mov    %ebx,0x10(%rdx)
mov    0x10(%rbp),%ebx
mov    %ebx,0x14(%rdx)
mov    0x14(%rbp),%ebx
mov    %ebx,0x18(%rdx)
mov    0x18(%rbp),%ebp
mov    %ebp,0x1c(%rdx)
mov    0x8(%rsp),%r8d
add    $0x1,%rax
cmp    %rax,0x10(%rsp)
jne    1930 <dist_2v_allt_v2+0x780>
add    %eax,%esi
mov    %rsi,0x80(%rsp)
mov    %r8d,%ebp
mov    %r8d,%ebx
mov    0x38(%rsp),%rcx
jmp    198e <dist_2v_allt_v2+0x7de>
mov    %r8d,%ebp
mov    %r8d,%ebx
mov    0xc(%rsp),%esi
jmp    15e0 <dist_2v_allt_v2+0x430>
mov    0x78(%rsp),%rax
movq   $0x0,(%rax)
movl   $0x0,0x8(%rax)
xor    %ecx,%ecx
mov    0x28(%rsp),%rdi
jmp    19da <dist_2v_allt_v2+0x82a>
mov    0x78(%rsp),%rax
mov    0x80(%rsp),%rcx
mov    %ecx,(%rax)
mov    %r11d,0x4(%rax)
mov    0x1c(%rsp),%edx
mov    %edx,0x8(%rax)
test   %edx,%edx
jns    19da <dist_2v_allt_v2+0x82a>
mov    0x64(%rsp),%edx
test   %edx,%edx
cmovg  %edx,%ecx
mov    0x20(%rsp),%rbx
mov    %ecx,0xc(%rax)
mov    $0x1,%esi
mov    $0x2710,%edx
call   10b0 <free_ivector@plt>
mov    0x50(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2710,%edx
call   10a0 <free_cvector@plt>
mov    0x88(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2710,%edx
call   10b0 <free_ivector@plt>
mov    0x48(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2710,%edx
call   10a0 <free_cvector@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xc350,%edx
mov    $0x1,%ecx
mov    $0x6,%r8d
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <free_imatrix@plt>

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

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