#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float, ...);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
float maxf(float *, int);
float meanf(float *, int);
float minf(float *, int);
int /*<<< orphan*/ printf(char *, char *);
float stdf(float *, float, int);
void motif_stats_bin_v2(int motif_index, float *expression,
                        char *filename_motifcount_match, int *motif_count,
                        FILE *output_file, int n_transcripts) {
  int i;
  int index;
  float curr_expression;
  char n_match;
  char n_mismatch;
  int total_occurrences_match = 0;
  int total_occurrences_mismatch = 0;
  int max_occurrences_per_transcript_match = 0;
  int max_occurrences_per_transcript_mismatch = 0;
  float mean_occurrences_per_transcript_match;
  float mean_occurrences_per_transcript_mismatch;
  int n_transcripts_present_match = 0;
  int n_transcripts_present_mismatch = 0;
  float mean_expression_match = 0;
  float min_expression_match = 0;
  float max_expression_match = 0;
  float expression_var_match = 0;
  float expression_std_match;
  float mean_expression_mismatch = 0;
  float min_expression_mismatch = 0;
  float max_expression_mismatch = 0;
  float expression_var_mismatch = 0;
  float expression_std_mismatch;
  float overall_mean_expression;
  float ptranscripts_match;
  float ptranscripts_mismatch;
  float oa_std_expression;
  float oa_mean_expression;
  float oa_min_expression;
  float oa_max_expression;
  FILE *file_motifcount_match;
  oa_mean_expression = meanf(expression, n_transcripts);
  oa_std_expression = stdf(expression, oa_mean_expression, n_transcripts);
  oa_min_expression = minf(expression, n_transcripts);
  oa_max_expression = maxf(expression, n_transcripts);
  fprintf(output_file, "\t%.2f", oa_mean_expression);
  fprintf(output_file, "\t%.2f", oa_std_expression);
  fprintf(output_file, "\t%.2f", oa_min_expression);
  fprintf(output_file, "\t%.2f", oa_max_expression);
  file_motifcount_match = fopen(filename_motifcount_match, "r");
  if (!file_motifcount_match) {
    printf("ERROR!!! I could not open the file %s for reading\n",
           filename_motifcount_match);
    exit(1);
  }
  index = n_transcripts * (motif_index - 1);
  fseek(file_motifcount_match, sizeof(char) * index, SEEK_SET);
  for (i = 1; i <= n_transcripts; i++) {
    fread(&n_match, sizeof(char), 1, file_motifcount_match);
    n_mismatch = motif_count[i];
    if (n_match > 0) {
      total_occurrences_match = total_occurrences_match + n_match;
      if (n_match > max_occurrences_per_transcript_match)
        max_occurrences_per_transcript_match = n_match;
      n_transcripts_present_match++;
      curr_expression = expression[i];
      mean_expression_match = mean_expression_match + curr_expression;
      expression_var_match =
          expression_var_match + curr_expression * curr_expression;
      if (curr_expression < min_expression_match)
        min_expression_match = curr_expression;
      if (curr_expression > max_expression_match)
        max_expression_match = curr_expression;
    }
    if (n_mismatch > 0) {
      total_occurrences_mismatch = total_occurrences_mismatch + n_mismatch;
      if (n_mismatch > max_occurrences_per_transcript_mismatch)
        max_occurrences_per_transcript_mismatch = n_mismatch;
      n_transcripts_present_mismatch++;
      curr_expression = expression[i];
      mean_expression_mismatch = mean_expression_mismatch + curr_expression;
      expression_var_mismatch =
          expression_var_mismatch + curr_expression * curr_expression;
      if (curr_expression < min_expression_mismatch)
        min_expression_mismatch = curr_expression;
      if (curr_expression > max_expression_mismatch)
        max_expression_mismatch = curr_expression;
    }
  }
  ptranscripts_match =
      100.0 * (float)n_transcripts_present_match / (float)n_transcripts;
  ptranscripts_mismatch =
      100.0 * (float)n_transcripts_present_mismatch / (float)n_transcripts;
  mean_occurrences_per_transcript_match =
      (float)total_occurrences_match / (float)n_transcripts_present_match;
  mean_occurrences_per_transcript_mismatch =
      (float)total_occurrences_mismatch / (float)n_transcripts_present_mismatch;
  mean_expression_match =
      mean_expression_match / (float)n_transcripts_present_match;
  mean_expression_mismatch =
      mean_expression_mismatch / (float)n_transcripts_present_mismatch;
  expression_var_match =
      expression_var_match / (float)n_transcripts_present_match;
  expression_var_mismatch =
      expression_var_mismatch / (float)n_transcripts_present_mismatch;
  expression_var_match =
      expression_var_match - mean_expression_match * mean_expression_match;
  expression_var_mismatch = expression_var_mismatch -
                            mean_expression_mismatch * mean_expression_mismatch;
  fprintf(output_file, "\t%d\t%.1f", n_transcripts_present_match,
          ptranscripts_match);
  fprintf(output_file, "\t%d", total_occurrences_match);
  fprintf(output_file, "\t%.2f", mean_occurrences_per_transcript_match);
  fprintf(output_file, "\t%d", max_occurrences_per_transcript_match);
  fprintf(output_file, "\t%.2f", mean_expression_match);
  fprintf(output_file, "\t%.2f", min_expression_match);
  fprintf(output_file, "\t%.2f", max_expression_match);
  fprintf(output_file, "\t%.2f", expression_var_match);
  fprintf(output_file, "\t%d\t%.1f", n_transcripts_present_mismatch,
          ptranscripts_mismatch);
  fprintf(output_file, "\t%d", total_occurrences_mismatch);
  fprintf(output_file, "\t%.2f", mean_occurrences_per_transcript_mismatch);
  fprintf(output_file, "\t%d", max_occurrences_per_transcript_mismatch);
  fprintf(output_file, "\t%.2f", mean_expression_mismatch);
  fprintf(output_file, "\t%.2f", min_expression_mismatch);
  fprintf(output_file, "\t%.2f", max_expression_mismatch);
  fprintf(output_file, "\t%.2f", expression_var_mismatch);
}


x86 assembly (clang, -O0):
<motif_stats_bin_v2>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x74(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x7c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1030 <meanf@plt>
movss  %xmm0,-0x98(%rbp)
ff
mov    -0x10(%rbp),%rdi
movss  -0x98(%rbp),%xmm0
ff
mov    -0x2c(%rbp),%esi
call   1060 <stdf@plt>
movss  %xmm0,-0x94(%rbp)
ff
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   10b0 <minf@plt>
movss  %xmm0,-0x9c(%rbp)
ff
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1070 <maxf@plt>
movss  %xmm0,-0xa0(%rbp)
ff
mov    -0x28(%rbp),%rdi
movss  -0x98(%rbp),%xmm0
ff
lea    0xd71(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x94(%rbp),%xmm0
ff
lea    0xd57(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x9c(%rbp),%xmm0
ff
lea    0xd3d(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0xa0(%rbp),%xmm0
ff
lea    0xd23(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd17(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xa8(%rbp)
cmpq   $0x0,-0xa8(%rbp)
jne    132b <motif_stats_bin_v2+0x18b>
mov    -0x18(%rbp),%rsi
lea    0xcf4(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    -0x2c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0xa8(%rbp),%rdi
movslq -0x34(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%esi
mov    0x2c8e(%rip),%rax
mov    (%rax),%edx
call   1090 <fseek@plt>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1500 <motif_stats_bin_v2+0x360>
mov    -0xa8(%rbp),%rcx
lea    -0x39(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fread@plt>
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %al,-0x3a(%rbp)
movsbl -0x39(%rbp),%eax
cmp    $0x0,%eax
jle    143f <motif_stats_bin_v2+0x29f>
mov    -0x40(%rbp),%eax
movsbl -0x39(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
movsbl -0x39(%rbp),%eax
cmp    -0x48(%rbp),%eax
jle    13be <motif_stats_bin_v2+0x21e>
movsbl -0x39(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x60(%rbp),%xmm0
addss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x6c(%rbp),%xmm1
movss  -0x38(%rbp),%xmm0
movss  -0x38(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x38(%rbp),%xmm1
movss  -0x64(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1421 <motif_stats_bin_v2+0x281>
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x38(%rbp),%xmm0
ucomiss -0x68(%rbp),%xmm0
jbe    143a <motif_stats_bin_v2+0x29a>
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
jmp    143f <motif_stats_bin_v2+0x29f>
movsbl -0x3a(%rbp),%eax
cmp    $0x0,%eax
jle    14ed <motif_stats_bin_v2+0x34d>
mov    -0x44(%rbp),%eax
movsbl -0x3a(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x44(%rbp)
movsbl -0x3a(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jle    146c <motif_stats_bin_v2+0x2cc>
movsbl -0x3a(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x74(%rbp),%xmm0
addss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x80(%rbp),%xmm1
movss  -0x38(%rbp),%xmm0
movss  -0x38(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x38(%rbp),%xmm1
movss  -0x78(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    14cf <motif_stats_bin_v2+0x32f>
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x38(%rbp),%xmm0
ucomiss -0x7c(%rbp),%xmm0
jbe    14e8 <motif_stats_bin_v2+0x348>
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
jmp    14ed <motif_stats_bin_v2+0x34d>
jmp    14f2 <motif_stats_bin_v2+0x352>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1360 <motif_stats_bin_v2+0x1c0>
cvtsi2ssl -0x58(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xaef(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2ssl -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
cvtsi2ssl -0x5c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xac1(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2ssl -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x90(%rbp)
ff
cvtsi2ssl -0x40(%rbp),%xmm0
cvtsi2ssl -0x58(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
cvtsi2ssl -0x44(%rbp),%xmm0
cvtsi2ssl -0x5c(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x60(%rbp),%xmm0
cvtsi2ssl -0x58(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x74(%rbp),%xmm0
cvtsi2ssl -0x5c(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x6c(%rbp),%xmm0
cvtsi2ssl -0x58(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x80(%rbp),%xmm0
cvtsi2ssl -0x5c(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x6c(%rbp),%xmm1
movss  -0x60(%rbp),%xmm0
movss  -0x60(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x80(%rbp),%xmm1
movss  -0x74(%rbp),%xmm0
movss  -0x74(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rdi
cvtsi2ssl -0x58(%rbp),%xmm0
movss  -0x8c(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
lea    0xa07(%rip),%rsi
mov    $0x2,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
cvtsi2ssl -0x40(%rbp),%xmm0
lea    0x9f9(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x50(%rbp),%xmm0
lea    0x99e(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
cvtsi2ssl -0x48(%rbp),%xmm0
lea    0x9cb(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x60(%rbp),%xmm0
lea    0x970(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x64(%rbp),%xmm0
lea    0x959(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x68(%rbp),%xmm0
lea    0x942(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x6c(%rbp),%xmm0
lea    0x92b(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
cvtsi2ssl -0x5c(%rbp),%xmm0
movss  -0x90(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
lea    0x943(%rip),%rsi
mov    $0x2,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
cvtsi2ssl -0x44(%rbp),%xmm0
lea    0x935(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x54(%rbp),%xmm0
lea    0x8da(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
cvtsi2ssl -0x4c(%rbp),%xmm0
lea    0x907(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x74(%rbp),%xmm0
lea    0x8ac(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x78(%rbp),%xmm0
lea    0x895(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x7c(%rbp),%xmm0
lea    0x87e(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rdi
movss  -0x80(%rbp),%xmm0
lea    0x867(%rip),%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<motif_stats_bin_v2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r9d,%ebp
mov    %r8,%r15
mov    %rcx,0x48(%rsp)
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
mov    %r9d,%esi
call   1030 <meanf@plt>
movss  %xmm0,0x30(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1060 <stdf@plt>
movss  %xmm0,0xc(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   10b0 <minf@plt>
movss  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   1070 <maxf@plt>
movss  %xmm0,0x14(%rsp)
lea    0xe0b(%rip),%r13
mov    %r15,%rdi
mov    %r13,%rsi
movss  0x30(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
movss  0xc(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
movss  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
movss  0x14(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
lea    0xdbe(%rip),%rsi
mov    %r12,%rdi
call   10a0 <fopen@plt>
test   %rax,%rax
je     16f3 <motif_stats_bin_v2+0x553>
mov    %rax,%r13
mov    %r15,0x78(%rsp)
add    $0xffffffff,%r14d
imul   %ebp,%r14d
mov    0x2d58(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
mov    %r14d,%esi
call   1090 <fseek@plt>
test   %ebp,%ebp
mov    %rbp,0x60(%rsp)
jle    1455 <motif_stats_bin_v2+0x2b5>
add    $0x1,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rsp)
xor    %r15d,%r15d
mov    $0x1,%r12d
xor    %r14d,%r14d
xorps  %xmm6,%xmm6
xorps  %xmm4,%xmm4
xorps  %xmm7,%xmm7
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rsp)
xorps  %xmm0,%xmm0
jmp    1329 <motif_stats_bin_v2+0x189>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movaps %xmm7,%xmm8
movaps %xmm4,%xmm2
movaps %xmm6,%xmm5
movdqa %xmm3,%xmm1
add    $0x1,%r12
movaps %xmm5,%xmm6
movaps %xmm2,%xmm4
movaps %xmm8,%xmm7
movdqa %xmm1,%xmm0
cmp    %r12,%rbp
je     149e <motif_stats_bin_v2+0x2fe>
movaps %xmm0,0x30(%rsp)
movss  %xmm7,0xc(%rsp)
movss  %xmm6,0x10(%rsp)
movss  %xmm4,0x14(%rsp)
lea    0x1b(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   1040 <fread@plt>
movsbl 0x1b(%rsp),%eax
test   %eax,%eax
jle    13cf <motif_stats_bin_v2+0x22f>
movd   %eax,%xmm0
cmp    %eax,%r15d
cmovl  %eax,%r15d
movaps 0xc8e(%rip),%xmm1
movss  %xmm0,%xmm1
movdqa 0x50(%rsp),%xmm0
paddd  %xmm1,%xmm0
movdqa %xmm0,0x50(%rsp)
movss  (%rbx,%r12,4),%xmm0
movss  0x1c(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x1c(%rsp)
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0x20(%rsp),%xmm2
addss  %xmm1,%xmm2
movss  %xmm2,0x20(%rsp)
movaps %xmm0,%xmm1
minss  0x28(%rsp),%xmm1
ucomiss 0x2c(%rsp),%xmm0
jbe    13c9 <motif_stats_bin_v2+0x229>
movss  %xmm0,0x2c(%rsp)
movss  %xmm1,0x28(%rsp)
movss  0x14(%rsp),%xmm4
movss  0x10(%rsp),%xmm6
movss  0xc(%rsp),%xmm7
movdqa 0x30(%rsp),%xmm3
mov    0x48(%rsp),%rax
mov    (%rax,%r12,4),%eax
mov    %eax,%ecx
shl    $0x18,%ecx
test   %ecx,%ecx
jle    1300 <motif_stats_bin_v2+0x160>
movsbl %al,%eax
movd   %eax,%xmm0
cmp    %r14d,%eax
cmovg  %eax,%r14d
movaps 0xbee(%rip),%xmm1
movss  %xmm0,%xmm1
paddd  %xmm3,%xmm1
movss  (%rbx,%r12,4),%xmm2
movss  0x24(%rsp),%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,0x24(%rsp)
movaps %xmm2,%xmm5
mulss  %xmm2,%xmm5
addss  %xmm6,%xmm5
movaps %xmm2,%xmm8
minss  %xmm7,%xmm8
ucomiss %xmm4,%xmm2
ja     130e <motif_stats_bin_v2+0x16e>
movaps %xmm4,%xmm2
jmp    130e <motif_stats_bin_v2+0x16e>
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
xor    %r14d,%r14d
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rsp)
xorps  %xmm8,%xmm8
xorps  %xmm2,%xmm2
xorps  %xmm5,%xmm5
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rsp)
xor    %r15d,%r15d
pxor   %xmm1,%xmm1
movss  %xmm8,0x10(%rsp)
movss  %xmm2,0x14(%rsp)
cvtdq2ps 0x50(%rsp),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm3
movaps %xmm2,0x80(%rsp)
shufps $0x55,%xmm2,%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  0xb3e(%rip),%xmm8
mulsd  %xmm8,%xmm2
xorps  %xmm4,%xmm4
cvtsi2ssl 0x60(%rsp),%xmm4
cvtss2sd %xmm4,%xmm4
divsd  %xmm4,%xmm2
cvtsd2ss %xmm2,%xmm2
cvtdq2ps %xmm1,%xmm1
movaps %xmm1,%xmm7
movaps %xmm1,%xmm6
movaps %xmm1,0x50(%rsp)
shufps $0x55,%xmm1,%xmm7
movaps %xmm7,0x60(%rsp)
xorps  %xmm1,%xmm1
cvtss2sd %xmm7,%xmm1
mulsd  %xmm8,%xmm1
divsd  %xmm4,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x48(%rsp)
movaps %xmm3,%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,0x90(%rsp)
movaps %xmm6,%xmm1
divss  %xmm7,%xmm1
movaps %xmm1,0x30(%rsp)
movss  0x1c(%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x1c(%rsp)
movss  0x24(%rsp),%xmm3
divss  %xmm7,%xmm3
movss  %xmm3,0x24(%rsp)
movss  0x20(%rsp),%xmm4
divss  %xmm0,%xmm4
divss  %xmm7,%xmm5
mulss  %xmm1,%xmm1
subss  %xmm1,%xmm4
movss  %xmm4,0x20(%rsp)
movaps %xmm3,%xmm1
mulss  %xmm3,%xmm1
subss  %xmm1,%xmm5
movss  %xmm5,0xc(%rsp)
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
lea    0xac0(%rip),%r12
mov    0x78(%rsp),%rbp
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x2,%al
call   1080 <fprintf@plt>
lea    0xab0(%rip),%r13
mov    %rbp,%rdi
mov    %r13,%rsi
movaps 0x80(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
lea    0xa50(%rip),%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
movaps 0x90(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r15d,%xmm0
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0x1c(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0x28(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0x2c(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0x20(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
movss  0x48(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
mov    %rbp,%rdi
mov    %r12,%rsi
movaps 0x60(%rsp),%xmm0
mov    $0x2,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
movaps 0x50(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movaps 0x30(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0x24(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0x14(%rsp),%xmm0
mov    $0x1,%al
call   1080 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
movss  0xc(%rsp),%xmm0
mov    $0x1,%al
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <fprintf@plt>
lea    0x926(%rip),%rdi
mov    %r12,%rsi
call   1050 <printf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\09%.2f\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [51 x i8] c"ERROR!!! I could not open the file %s for reading\0A\00"
@SEEK_SET = global i32 0
@.str.3 = [9 x i8] c"\09%d\09%.1f\00"
@.str.4 = [4 x i8] c"\09%d\00"
define void @motif_stats_bin_v2(i32 %0, float* %1, i8* %2, i32* %3, i32* %4, i32 %5) {
%7 = alloca i32
%8 = alloca float*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
%16 = alloca i8
%17 = alloca i8
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca float
%23 = alloca float
%24 = alloca i32
%25 = alloca i32
%26 = alloca float
%27 = alloca float
%28 = alloca float
%29 = alloca float
%30 = alloca float
%31 = alloca float
%32 = alloca float
%33 = alloca float
%34 = alloca float
%35 = alloca float
%36 = alloca float
%37 = alloca float
%38 = alloca float
%39 = alloca float
%40 = alloca float
%41 = alloca float
%42 = alloca float
%43 = alloca i32*
store i32 %0, i32* %7
store float* %1, float** %8
store i8* %2, i8** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32 %5, i32* %12
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %21
store i32 0, i32* %24
store i32 0, i32* %25
store float 0.000000e+00, float* %26
store float 0.000000e+00, float* %27
store float 0.000000e+00, float* %28
store float 0.000000e+00, float* %29
store float 0.000000e+00, float* %31
store float 0.000000e+00, float* %32
store float 0.000000e+00, float* %33
store float 0.000000e+00, float* %34
%44 = load float*, float** %8
%45 = load i32, i32* %12
%46 = call float @meanf(float* %44, i32 %45)
store float %46, float* %40
%47 = load float*, float** %8
%48 = load float, float* %40
%49 = load i32, i32* %12
%50 = call float @stdf(float* %47, float %48, i32 %49)
store float %50, float* %39
%51 = load float*, float** %8
%52 = load i32, i32* %12
%53 = call float @minf(float* %51, i32 %52)
store float %53, float* %41
%54 = load float*, float** %8
%55 = load i32, i32* %12
%56 = call float @maxf(float* %54, i32 %55)
store float %56, float* %42
%57 = load i32*, i32** %11
%58 = load float, float* %40
%59 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %58)
%60 = load i32*, i32** %11
%61 = load float, float* %39
%62 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %61)
%63 = load i32*, i32** %11
%64 = load float, float* %41
%65 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %64)
%66 = load i32*, i32** %11
%67 = load float, float* %42
%68 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %67)
%69 = load i8*, i8** %9
%70 = call i32* @fopen(i8* %69, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %70, i32** %43
%71 = load i32*, i32** %43
%72 = icmp ne i32* %71, null
br i1 %72, label %77, label %73
73: ; preds = %6
%74 = load i8*, i8** %9
%75 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %74)
%76 = call i32 @exit(i32 1)
unreachable
77: ; preds = %6
%78 = load i32, i32* %12
%79 = load i32, i32* %7
%80 = sub nsw i32 %79, 1
%81 = mul nsw i32 %78, %80
store i32 %81, i32* %14
%82 = load i32*, i32** %43
%83 = load i32, i32* %14
%84 = sext i32 %83 to i64
%85 = mul i64 1, %84
%86 = trunc i64 %85 to i32
%87 = load i32, i32* @SEEK_SET
%88 = call i32 @fseek(i32* %82, i32 %86, i32 %87)
store i32 1, i32* %13
br label %89
89: ; preds = %188, %77
%90 = load i32, i32* %13
%91 = load i32, i32* %12
%92 = icmp sle i32 %90, %91
br i1 %92, label %93, label %191
93: ; preds = %89
%94 = load i32*, i32** %43
%95 = call i32 @fread(i8* %16, i32 1, i32 1, i32* %94)
%96 = load i32*, i32** %10
%97 = load i32, i32* %13
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i32, i32* %96, i64 %98
%100 = load i32, i32* %99
%101 = trunc i32 %100 to i8
store i8 %101, i8* %17
%102 = load i8, i8* %16
%103 = sext i8 %102 to i32
%104 = icmp sgt i32 %103, 0
br i1 %104, label %105, label %144
105: ; preds = %93
%106 = load i32, i32* %18
%107 = load i8, i8* %16
%108 = sext i8 %107 to i32
%109 = add nsw i32 %106, %108
store i32 %109, i32* %18
%110 = load i8, i8* %16
%111 = sext i8 %110 to i32
%112 = load i32, i32* %20
%113 = icmp sgt i32 %111, %112
br i1 %113, label %114, label %117
114: ; preds = %105
%115 = load i8, i8* %16
%116 = sext i8 %115 to i32
store i32 %116, i32* %20
br label %117
117: ; preds = %114, %105
%118 = load i32, i32* %24
%119 = add nsw i32 %118, 1
store i32 %119, i32* %24
%120 = load float*, float** %8
%121 = load i32, i32* %13
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds float, float* %120, i64 %122
%124 = load float, float* %123
store float %124, float* %15
%125 = load float, float* %26
%126 = load float, float* %15
%127 = fadd float %125, %126
store float %127, float* %26
%128 = load float, float* %29
%129 = load float, float* %15
%130 = load float, float* %15
%131 = call float @llvm.fmuladd.f32(float %129, float %130, float %128)
store float %131, float* %29
%132 = load float, float* %15
%133 = load float, float* %27
%134 = fcmp olt float %132, %133
br i1 %134, label %135, label %137
135: ; preds = %117
%136 = load float, float* %15
store float %136, float* %27
br label %137
137: ; preds = %135, %117
%138 = load float, float* %15
%139 = load float, float* %28
%140 = fcmp ogt float %138, %139
br i1 %140, label %141, label %143
141: ; preds = %137
%142 = load float, float* %15
store float %142, float* %28
br label %143
143: ; preds = %141, %137
br label %144
144: ; preds = %143, %93
%145 = load i8, i8* %17
%146 = sext i8 %145 to i32
%147 = icmp sgt i32 %146, 0
br i1 %147, label %148, label %187
148: ; preds = %144
%149 = load i32, i32* %19
%150 = load i8, i8* %17
%151 = sext i8 %150 to i32
%152 = add nsw i32 %149, %151
store i32 %152, i32* %19
%153 = load i8, i8* %17
%154 = sext i8 %153 to i32
%155 = load i32, i32* %21
%156 = icmp sgt i32 %154, %155
br i1 %156, label %157, label %160
157: ; preds = %148
%158 = load i8, i8* %17
%159 = sext i8 %158 to i32
store i32 %159, i32* %21
br label %160
160: ; preds = %157, %148
%161 = load i32, i32* %25
%162 = add nsw i32 %161, 1
store i32 %162, i32* %25
%163 = load float*, float** %8
%164 = load i32, i32* %13
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds float, float* %163, i64 %165
%167 = load float, float* %166
store float %167, float* %15
%168 = load float, float* %31
%169 = load float, float* %15
%170 = fadd float %168, %169
store float %170, float* %31
%171 = load float, float* %34
%172 = load float, float* %15
%173 = load float, float* %15
%174 = call float @llvm.fmuladd.f32(float %172, float %173, float %171)
store float %174, float* %34
%175 = load float, float* %15
%176 = load float, float* %32
%177 = fcmp olt float %175, %176
br i1 %177, label %178, label %180
178: ; preds = %160
%179 = load float, float* %15
store float %179, float* %32
br label %180
180: ; preds = %178, %160
%181 = load float, float* %15
%182 = load float, float* %33
%183 = fcmp ogt float %181, %182
br i1 %183, label %184, label %186
184: ; preds = %180
%185 = load float, float* %15
store float %185, float* %33
br label %186
186: ; preds = %184, %180
br label %187
187: ; preds = %186, %144
br label %188
188: ; preds = %187
%189 = load i32, i32* %13
%190 = add nsw i32 %189, 1
store i32 %190, i32* %13
br label %89
191: ; preds = %89
%192 = load i32, i32* %24
%193 = sitofp i32 %192 to float
%194 = fpext float %193 to double
%195 = fmul double 1.000000e+02, %194
%196 = load i32, i32* %12
%197 = sitofp i32 %196 to float
%198 = fpext float %197 to double
%199 = fdiv double %195, %198
%200 = fptrunc double %199 to float
store float %200, float* %37
%201 = load i32, i32* %25
%202 = sitofp i32 %201 to float
%203 = fpext float %202 to double
%204 = fmul double 1.000000e+02, %203
%205 = load i32, i32* %12
%206 = sitofp i32 %205 to float
%207 = fpext float %206 to double
%208 = fdiv double %204, %207
%209 = fptrunc double %208 to float
store float %209, float* %38
%210 = load i32, i32* %18
%211 = sitofp i32 %210 to float
%212 = load i32, i32* %24
%213 = sitofp i32 %212 to float
%214 = fdiv float %211, %213
store float %214, float* %22
%215 = load i32, i32* %19
%216 = sitofp i32 %215 to float
%217 = load i32, i32* %25
%218 = sitofp i32 %217 to float
%219 = fdiv float %216, %218
store float %219, float* %23
%220 = load float, float* %26
%221 = load i32, i32* %24
%222 = sitofp i32 %221 to float
%223 = fdiv float %220, %222
store float %223, float* %26
%224 = load float, float* %31
%225 = load i32, i32* %25
%226 = sitofp i32 %225 to float
%227 = fdiv float %224, %226
store float %227, float* %31
%228 = load float, float* %29
%229 = load i32, i32* %24
%230 = sitofp i32 %229 to float
%231 = fdiv float %228, %230
store float %231, float* %29
%232 = load float, float* %34
%233 = load i32, i32* %25
%234 = sitofp i32 %233 to float
%235 = fdiv float %232, %234
store float %235, float* %34
%236 = load float, float* %29
%237 = load float, float* %26
%238 = load float, float* %26
%239 = fneg float %237
%240 = call float @llvm.fmuladd.f32(float %239, float %238, float %236)
store float %240, float* %29
%241 = load float, float* %34
%242 = load float, float* %31
%243 = load float, float* %31
%244 = fneg float %242
%245 = call float @llvm.fmuladd.f32(float %244, float %243, float %241)
store float %245, float* %34
%246 = load i32*, i32** %11
%247 = load i32, i32* %24
%248 = sitofp i32 %247 to float
%249 = load float, float* %37
%250 = fpext float %249 to double
%251 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %246, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float %248, double %250)
%252 = load i32*, i32** %11
%253 = load i32, i32* %18
%254 = sitofp i32 %253 to float
%255 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %252, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %254)
%256 = load i32*, i32** %11
%257 = load float, float* %22
%258 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %256, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %257)
%259 = load i32*, i32** %11
%260 = load i32, i32* %20
%261 = sitofp i32 %260 to float
%262 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %259, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %261)
%263 = load i32*, i32** %11
%264 = load float, float* %26
%265 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %263, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %264)
%266 = load i32*, i32** %11
%267 = load float, float* %27
%268 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %266, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %267)
%269 = load i32*, i32** %11
%270 = load float, float* %28
%271 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %269, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %270)
%272 = load i32*, i32** %11
%273 = load float, float* %29
%274 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %272, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %273)
%275 = load i32*, i32** %11
%276 = load i32, i32* %25
%277 = sitofp i32 %276 to float
%278 = load float, float* %38
%279 = fpext float %278 to double
%280 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %275, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float %277, double %279)
%281 = load i32*, i32** %11
%282 = load i32, i32* %19
%283 = sitofp i32 %282 to float
%284 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %281, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %283)
%285 = load i32*, i32** %11
%286 = load float, float* %23
%287 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %285, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %286)
%288 = load i32*, i32** %11
%289 = load i32, i32* %21
%290 = sitofp i32 %289 to float
%291 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %288, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %290)
%292 = load i32*, i32** %11
%293 = load float, float* %31
%294 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %292, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %293)
%295 = load i32*, i32** %11
%296 = load float, float* %32
%297 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %295, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %296)
%298 = load i32*, i32** %11
%299 = load float, float* %33
%300 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %298, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %299)
%301 = load i32*, i32** %11
%302 = load float, float* %34
%303 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %301, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %302)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\09%.2f\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [51 x i8] c"ERROR!!! I could not open the file %s for reading\0A\00"
@SEEK_SET = global i32 0
@.str.3 = [9 x i8] c"\09%d\09%.1f\00"
@.str.4 = [4 x i8] c"\09%d\00"
define void @motif_stats_bin_v2(i32 %0, float* %1, i8* %2, i32* nocapture %3, i32* nocapture %4, i32 %5) {
%7 = alloca i8
%8 = tail call float @meanf(float* %1, i32 %5)
%9 = tail call float @stdf(float* %1, float %8, i32 %5)
%10 = tail call float @minf(float* %1, i32 %5)
%11 = tail call float @maxf(float* %1, i32 %5)
%12 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %8)
%13 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %9)
%14 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %10)
%15 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %11)
%16 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %21
18: ; preds = %6
%19 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%20 = tail call i32 @exit(i32 1)
unreachable
21: ; preds = %6
%22 = add nsw i32 %0, -1
%23 = mul nsw i32 %22, %5
%24 = load i32, i32* @SEEK_SET
%25 = tail call i32 @fseek(i32* %16, i32 %23, i32 %24)
%26 = icmp slt i32 %5, 1
br i1 %26, label %95, label %27
27: ; preds = %21
%28 = add nuw i32 %5, 1
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %27, %86
%31 = phi i64 [ 1, %27 ], [ %93, %86 ]
%32 = phi i32 [ 0, %27 ], [ %68, %86 ]
%33 = phi i32 [ 0, %27 ], [ %91, %86 ]
%34 = phi float [ 0.000000e+00, %27 ], [ %67, %86 ]
%35 = phi float [ 0.000000e+00, %27 ], [ %90, %86 ]
%36 = phi float [ 0.000000e+00, %27 ], [ %89, %86 ]
%37 = phi float [ 0.000000e+00, %27 ], [ %88, %86 ]
%38 = phi float [ 0.000000e+00, %27 ], [ %87, %86 ]
%39 = phi float [ 0.000000e+00, %27 ], [ %66, %86 ]
%40 = phi float [ 0.000000e+00, %27 ], [ %65, %86 ]
%41 = phi float [ 0.000000e+00, %27 ], [ %64, %86 ]
%42 = phi <2 x i32> [ zeroinitializer, %27 ], [ %69, %86 ]
%43 = phi <2 x i32> [ zeroinitializer, %27 ], [ %92, %86 ]
%44 = call i32 @fread(i8* %7, i32 1, i32 1, i32* %16)
%45 = getelementptr inbounds i32, i32* %3, i64 %31
%46 = load i32, i32* %45
%47 = load i8, i8* %7
%48 = sext i8 %47 to i32
%49 = icmp sgt i8 %47, 0
br i1 %49, label %50, label %63
50: ; preds = %30
%51 = icmp slt i32 %32, %48
%52 = select i1 %51, i32 %48, i32 %32
%53 = insertelement <2 x i32> <i32 poison, i32 1>, i32 %48, i64 0
%54 = add nsw <2 x i32> %42, %53
%55 = getelementptr inbounds float, float* %1, i64 %31
%56 = load float, float* %55
%57 = fadd float %34, %56
%58 = tail call float @llvm.fmuladd.f32(float %56, float %56, float %40)
%59 = fcmp olt float %56, %39
%60 = select i1 %59, float %56, float %39
%61 = fcmp ogt float %56, %41
br i1 %61, label %62, label %63
62: ; preds = %50
br label %63
63: ; preds = %50, %62, %30
%64 = phi float [ %56, %62 ], [ %41, %50 ], [ %41, %30 ]
%65 = phi float [ %58, %62 ], [ %58, %50 ], [ %40, %30 ]
%66 = phi float [ %60, %62 ], [ %60, %50 ], [ %39, %30 ]
%67 = phi float [ %57, %62 ], [ %57, %50 ], [ %34, %30 ]
%68 = phi i32 [ %52, %62 ], [ %52, %50 ], [ %32, %30 ]
%69 = phi <2 x i32> [ %54, %62 ], [ %54, %50 ], [ %42, %30 ]
%70 = shl i32 %46, 24
%71 = ashr exact i32 %70, 24
%72 = icmp sgt i32 %70, 0
br i1 %72, label %73, label %86
73: ; preds = %63
%74 = icmp sgt i32 %71, %33
%75 = select i1 %74, i32 %71, i32 %33
%76 = insertelement <2 x i32> <i32 poison, i32 1>, i32 %71, i64 0
%77 = add nsw <2 x i32> %76, %43
%78 = getelementptr inbounds float, float* %1, i64 %31
%79 = load float, float* %78
%80 = fadd float %38, %79
%81 = tail call float @llvm.fmuladd.f32(float %79, float %79, float %35)
%82 = fcmp olt float %79, %37
%83 = select i1 %82, float %79, float %37
%84 = fcmp ogt float %79, %36
br i1 %84, label %85, label %86
85: ; preds = %73
br label %86
86: ; preds = %63, %85, %73
%87 = phi float [ %80, %85 ], [ %80, %73 ], [ %38, %63 ]
%88 = phi float [ %83, %85 ], [ %83, %73 ], [ %37, %63 ]
%89 = phi float [ %79, %85 ], [ %36, %73 ], [ %36, %63 ]
%90 = phi float [ %81, %85 ], [ %81, %73 ], [ %35, %63 ]
%91 = phi i32 [ %75, %85 ], [ %75, %73 ], [ %33, %63 ]
%92 = phi <2 x i32> [ %77, %85 ], [ %77, %73 ], [ %43, %63 ]
%93 = add nuw nsw i64 %31, 1
%94 = icmp eq i64 %93, %29
br i1 %94, label %95, label %30
95: ; preds = %86, %21
%96 = phi float [ 0.000000e+00, %21 ], [ %64, %86 ]
%97 = phi float [ 0.000000e+00, %21 ], [ %65, %86 ]
%98 = phi float [ 0.000000e+00, %21 ], [ %66, %86 ]
%99 = phi float [ 0.000000e+00, %21 ], [ %87, %86 ]
%100 = phi float [ 0.000000e+00, %21 ], [ %88, %86 ]
%101 = phi float [ 0.000000e+00, %21 ], [ %89, %86 ]
%102 = phi float [ 0.000000e+00, %21 ], [ %90, %86 ]
%103 = phi float [ 0.000000e+00, %21 ], [ %67, %86 ]
%104 = phi i32 [ 0, %21 ], [ %91, %86 ]
%105 = phi i32 [ 0, %21 ], [ %68, %86 ]
%106 = phi <2 x i32> [ zeroinitializer, %21 ], [ %69, %86 ]
%107 = phi <2 x i32> [ zeroinitializer, %21 ], [ %92, %86 ]
%108 = sitofp <2 x i32> %106 to <2 x float>
%109 = extractelement <2 x float> %108, i64 1
%110 = fpext float %109 to double
%111 = fmul double %110, 1.000000e+02
%112 = sitofp i32 %5 to float
%113 = fpext float %112 to double
%114 = fdiv double %111, %113
%115 = fptrunc double %114 to float
%116 = sitofp <2 x i32> %107 to <2 x float>
%117 = extractelement <2 x float> %116, i64 1
%118 = fpext float %117 to double
%119 = fmul double %118, 1.000000e+02
%120 = fdiv double %119, %113
%121 = fptrunc double %120 to float
%122 = extractelement <2 x float> %108, i64 0
%123 = fdiv float %122, %109
%124 = extractelement <2 x float> %116, i64 0
%125 = fdiv float %124, %117
%126 = fdiv float %103, %109
%127 = fdiv float %99, %117
%128 = fdiv float %97, %109
%129 = fdiv float %102, %117
%130 = fneg float %126
%131 = tail call float @llvm.fmuladd.f32(float %130, float %126, float %128)
%132 = fneg float %127
%133 = tail call float @llvm.fmuladd.f32(float %132, float %127, float %129)
%134 = fpext float %115 to double
%135 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float %109, double %134)
%136 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %122)
%137 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %123)
%138 = sitofp i32 %105 to float
%139 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %138)
%140 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %126)
%141 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %98)
%142 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %96)
%143 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %131)
%144 = fpext float %121 to double
%145 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), float %117, double %144)
%146 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %124)
%147 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %125)
%148 = sitofp i32 %104 to float
%149 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), float %148)
%150 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %127)
%151 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %100)
%152 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %101)
%153 = tail call i32 (i32*, i8*, float, ...) @fprintf(i32* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %133)
ret void
}