#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 */
float FLT_MAX;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(int *);
float log10(float);
int *malloc(int);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int read_string(int /*<<< orphan*/ *, char *);
int sscanf(char *, char *, int *);
char *strtok(char *, char *);
int calculate_confusion_penalties_matrix(char *confusion_matrix_name,
                                         int phonemes_number,
                                         float confusion_penalties_matrix[]) {
  FILE *matrix_file = NULL;
  int *confusion_matrix = NULL;
  char buffer[1001];
  char *value_str;
  int i, j, index, buffer_size, value = 0, is_ok = 1;
  float sum_value = 0.0;
  if ((confusion_matrix_name == NULL) || (phonemes_number <= 0) ||
      (confusion_penalties_matrix == NULL)) {
    return 0;
  }
  matrix_file = fopen(confusion_matrix_name, "r");
  if (matrix_file == NULL) {
    return 0;
  }
  i = 0;
  confusion_matrix =
      malloc((phonemes_number + 1) * (phonemes_number + 1) * sizeof(int));
  memset(confusion_matrix, 0,
         (phonemes_number + 1) * (phonemes_number + 1) * sizeof(int));
  while (!feof(matrix_file)) {
    buffer_size = read_string(matrix_file, buffer);
    if (buffer_size <= 0) {
      continue;
    }
    if (i > phonemes_number) {
      is_ok = 0;
      break;
    }
    j = 0;
    value_str = strtok(buffer, " \t");
    if (value_str == NULL) {
      is_ok = 0;
      break;
    }
    if (sscanf(value_str, "%d", &value) != 1) {
      is_ok = 0;
      break;
    }
    if (value < 0) {
      is_ok = 0;
      break;
    }
    confusion_matrix[i * (phonemes_number + 1) + j] = value;
    j++;
    value_str = strtok(NULL, " \t");
    while (value_str != NULL) {
      if (j > phonemes_number) {
        is_ok = 0;
        break;
      }
      if (sscanf(value_str, "%d", &value) != 1) {
        is_ok = 0;
        break;
      }
      if (value < 0) {
        is_ok = 0;
        break;
      }
      confusion_matrix[i * (phonemes_number + 1) + j] = value;
      j++;
      value_str = strtok(NULL, " \t");
    }
    if (is_ok) {
      if (j != (phonemes_number + 1)) {
        is_ok = 0;
      }
    }
    if (!is_ok) {
      break;
    }
    i++;
  }
  if (is_ok) {
    if (i != (phonemes_number + 1)) {
      is_ok = 0;
    }
  }
  fclose(matrix_file);
  if (!is_ok) {
    free(confusion_matrix);
    return 0;
  }
  for (i = 0; i < phonemes_number; i++) {
    sum_value = 0;
    for (j = 0; j < phonemes_number; j++) {
      sum_value += confusion_matrix[i * (phonemes_number + 1) + j];
    }
    if (sum_value > 0) {
      for (j = 0; j < phonemes_number; j++) {
        confusion_penalties_matrix[i * phonemes_number + j] =
            confusion_matrix[i * (phonemes_number + 1) + j] / sum_value;
      }
    } else {
      is_ok = 0;
      break;
    }
  }
  free(confusion_matrix);
  if (!is_ok) {
    return 0;
  }
  for (i = 0; i < phonemes_number; i++) {
    for (j = 0; j < phonemes_number; j++) {
      index = i * phonemes_number + j;
      if (confusion_penalties_matrix[index] > 0.0) {
        confusion_penalties_matrix[index] =
            log10(confusion_penalties_matrix[index]);
      } else {
        confusion_penalties_matrix[index] = -FLT_MAX;
      }
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<calculate_confusion_penalties_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0x0,-0x43c(%rbp)
movl   $0x1,-0x440(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x444(%rbp)
ff
cmpq   $0x0,-0x10(%rbp)
je     1205 <calculate_confusion_penalties_matrix+0x65>
cmpl   $0x0,-0x14(%rbp)
jle    1205 <calculate_confusion_penalties_matrix+0x65>
cmpq   $0x0,-0x20(%rbp)
jne    1211 <calculate_confusion_penalties_matrix+0x71>
movl   $0x0,-0x4(%rbp)
jmp    178c <calculate_confusion_penalties_matrix+0x5ec>
mov    -0x10(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    123c <calculate_confusion_penalties_matrix+0x9c>
movl   $0x0,-0x4(%rbp)
jmp    178c <calculate_confusion_penalties_matrix+0x5ec>
movl   $0x0,-0x42c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1050 <memset@plt>
mov    -0x28(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12a6 <calculate_confusion_penalties_matrix+0x106>
jmp    14e6 <calculate_confusion_penalties_matrix+0x346>
mov    -0x28(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   10c0 <read_string@plt>
mov    %eax,-0x438(%rbp)
cmpl   $0x0,-0x438(%rbp)
jg     12ce <calculate_confusion_penalties_matrix+0x12e>
jmp    1288 <calculate_confusion_penalties_matrix+0xe8>
mov    -0x42c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    12ec <calculate_confusion_penalties_matrix+0x14c>
movl   $0x0,-0x440(%rbp)
jmp    14e6 <calculate_confusion_penalties_matrix+0x346>
movl   $0x0,-0x430(%rbp)
lea    -0x420(%rbp),%rdi
lea    0xcfe(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x428(%rbp)
jne    132d <calculate_confusion_penalties_matrix+0x18d>
movl   $0x0,-0x440(%rbp)
jmp    14e6 <calculate_confusion_penalties_matrix+0x346>
mov    -0x428(%rbp),%rdi
lea    0xcca(%rip),%rsi
lea    -0x43c(%rbp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
je     135f <calculate_confusion_penalties_matrix+0x1bf>
movl   $0x0,-0x440(%rbp)
jmp    14e6 <calculate_confusion_penalties_matrix+0x346>
cmpl   $0x0,-0x43c(%rbp)
jge    137b <calculate_confusion_penalties_matrix+0x1db>
movl   $0x0,-0x440(%rbp)
jmp    14e6 <calculate_confusion_penalties_matrix+0x346>
mov    -0x43c(%rbp),%edx
mov    -0x30(%rbp),%rax
mov    -0x42c(%rbp),%ecx
mov    -0x14(%rbp),%esi
add    $0x1,%esi
imul   %esi,%ecx
add    -0x430(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x430(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xc48(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x428(%rbp)
je     1490 <calculate_confusion_penalties_matrix+0x2f0>
mov    -0x430(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    13f2 <calculate_confusion_penalties_matrix+0x252>
movl   $0x0,-0x440(%rbp)
jmp    1490 <calculate_confusion_penalties_matrix+0x2f0>
mov    -0x428(%rbp),%rdi
lea    0xc05(%rip),%rsi
lea    -0x43c(%rbp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
je     1424 <calculate_confusion_penalties_matrix+0x284>
movl   $0x0,-0x440(%rbp)
jmp    1490 <calculate_confusion_penalties_matrix+0x2f0>
cmpl   $0x0,-0x43c(%rbp)
jge    1440 <calculate_confusion_penalties_matrix+0x2a0>
movl   $0x0,-0x440(%rbp)
jmp    1490 <calculate_confusion_penalties_matrix+0x2f0>
mov    -0x43c(%rbp),%edx
mov    -0x30(%rbp),%rax
mov    -0x42c(%rbp),%ecx
mov    -0x14(%rbp),%esi
add    $0x1,%esi
imul   %esi,%ecx
add    -0x430(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x430(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xb83(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0x428(%rbp)
jmp    13c6 <calculate_confusion_penalties_matrix+0x226>
cmpl   $0x0,-0x440(%rbp)
je     14c0 <calculate_confusion_penalties_matrix+0x320>
mov    -0x430(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     14bb <calculate_confusion_penalties_matrix+0x31b>
movl   $0x0,-0x440(%rbp)
jmp    14c0 <calculate_confusion_penalties_matrix+0x320>
cmpl   $0x0,-0x440(%rbp)
jne    14d2 <calculate_confusion_penalties_matrix+0x332>
jmp    14e6 <calculate_confusion_penalties_matrix+0x346>
mov    -0x42c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x42c(%rbp)
jmp    1288 <calculate_confusion_penalties_matrix+0xe8>
cmpl   $0x0,-0x440(%rbp)
je     1516 <calculate_confusion_penalties_matrix+0x376>
mov    -0x42c(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     1511 <calculate_confusion_penalties_matrix+0x371>
movl   $0x0,-0x440(%rbp)
jmp    1516 <calculate_confusion_penalties_matrix+0x376>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
cmpl   $0x0,-0x440(%rbp)
jne    1541 <calculate_confusion_penalties_matrix+0x3a1>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <calculate_confusion_penalties_matrix+0x5ec>
movl   $0x0,-0x42c(%rbp)
mov    -0x42c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1676 <calculate_confusion_penalties_matrix+0x4d6>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x444(%rbp)
ff
movl   $0x0,-0x430(%rbp)
mov    -0x430(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15c3 <calculate_confusion_penalties_matrix+0x423>
mov    -0x30(%rbp),%rax
mov    -0x42c(%rbp),%ecx
mov    -0x14(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
add    -0x430(%rbp),%ecx
movslq %ecx,%rcx
cvtsi2ssl (%rax,%rcx,4),%xmm0
addss  -0x444(%rbp),%xmm0
ff
movss  %xmm0,-0x444(%rbp)
ff
mov    -0x430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x430(%rbp)
jmp    156f <calculate_confusion_penalties_matrix+0x3cf>
movss  -0x444(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    164e <calculate_confusion_penalties_matrix+0x4ae>
movl   $0x0,-0x430(%rbp)
mov    -0x430(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1649 <calculate_confusion_penalties_matrix+0x4a9>
mov    -0x30(%rbp),%rax
mov    -0x42c(%rbp),%ecx
mov    -0x14(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
add    -0x430(%rbp),%ecx
movslq %ecx,%rcx
cvtsi2ssl (%rax,%rcx,4),%xmm0
divss  -0x444(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
mov    -0x42c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x430(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x430(%rbp)
jmp    15e1 <calculate_confusion_penalties_matrix+0x441>
jmp    165d <calculate_confusion_penalties_matrix+0x4bd>
movl   $0x0,-0x440(%rbp)
jmp    1676 <calculate_confusion_penalties_matrix+0x4d6>
jmp    1662 <calculate_confusion_penalties_matrix+0x4c2>
mov    -0x42c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x42c(%rbp)
jmp    154b <calculate_confusion_penalties_matrix+0x3ab>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x0,-0x440(%rbp)
jne    1698 <calculate_confusion_penalties_matrix+0x4f8>
movl   $0x0,-0x4(%rbp)
jmp    178c <calculate_confusion_penalties_matrix+0x5ec>
movl   $0x0,-0x42c(%rbp)
mov    -0x42c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1785 <calculate_confusion_penalties_matrix+0x5e5>
movl   $0x0,-0x430(%rbp)
mov    -0x430(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    176c <calculate_confusion_penalties_matrix+0x5cc>
mov    -0x42c(%rbp),%eax
imul   -0x14(%rbp),%eax
add    -0x430(%rbp),%eax
mov    %eax,-0x434(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    172b <calculate_confusion_penalties_matrix+0x58b>
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   10b0 <log10@plt>
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    1753 <calculate_confusion_penalties_matrix+0x5b3>
mov    0x28b6(%rip),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x434(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    1758 <calculate_confusion_penalties_matrix+0x5b8>
mov    -0x430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x430(%rbp)
jmp    16bb <calculate_confusion_penalties_matrix+0x51b>
jmp    1771 <calculate_confusion_penalties_matrix+0x5d1>
mov    -0x42c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x42c(%rbp)
jmp    16a2 <calculate_confusion_penalties_matrix+0x502>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_confusion_penalties_matrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x438,%rsp
movl   $0x0,0x4(%rsp)
xor    %r14d,%r14d
test   %rdi,%rdi
je     159f <calculate_confusion_penalties_matrix+0x3ff>
mov    %esi,%ebp
test   %esi,%esi
jle    159f <calculate_confusion_penalties_matrix+0x3ff>
mov    %rdx,%rbx
test   %rdx,%rdx
je     159f <calculate_confusion_penalties_matrix+0x3ff>
lea    0xe2e(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     159f <calculate_confusion_penalties_matrix+0x3ff>
mov    %rax,%r12
mov    %ebp,%r15d
lea    0x1(%r15),%rax
mov    %rax,0x8(%rsp)
mov    %rbp,0x20(%rsp)
add    $0x1,%ebp
imul   %ebp,%ebp
shl    $0x2,%ebp
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1050 <memset@plt>
lea    0x4(,%r15,4),%rbp
lea    0x40(%rsp),%r13
mov    %r14,0x18(%rsp)
nopl   0x0(%rax)
mov    %r12,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    1353 <calculate_confusion_penalties_matrix+0x1b3>
mov    %r12,%rdi
mov    %r13,%rsi
call   10c0 <read_string@plt>
test   %eax,%eax
jle    1240 <calculate_confusion_penalties_matrix+0xa0>
mov    %rbp,0x28(%rsp)
mov    0x10(%rsp),%rax
cmp    0x8(%rsp),%rax
je     158a <calculate_confusion_penalties_matrix+0x3ea>
mov    %r13,%rdi
lea    0xd94(%rip),%rsi
call   10a0 <strtok@plt>
test   %rax,%rax
je     158a <calculate_confusion_penalties_matrix+0x3ea>
mov    %rax,%rdi
lea    0xd7f(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
jne    158a <calculate_confusion_penalties_matrix+0x3ea>
mov    0x4(%rsp),%eax
test   %eax,%eax
js     158a <calculate_confusion_penalties_matrix+0x3ea>
mov    0x10(%rsp),%rcx
imul   0x8(%rsp),%rcx
mov    0x18(%rsp),%rdx
mov    %eax,(%rdx,%rcx,4)
xor    %edi,%edi
lea    0xd41(%rip),%rsi
call   10a0 <strtok@plt>
test   %rax,%rax
je     1331 <calculate_confusion_penalties_matrix+0x191>
mov    $0x1,%ebp
cmp    %rbp,0x8(%rsp)
je     158a <calculate_confusion_penalties_matrix+0x3ea>
mov    %rax,%rdi
lea    0xd20(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1080 <sscanf@plt>
cmp    $0x1,%eax
jne    158a <calculate_confusion_penalties_matrix+0x3ea>
mov    0x4(%rsp),%eax
test   %eax,%eax
js     158a <calculate_confusion_penalties_matrix+0x3ea>
mov    %eax,(%r14,%rbp,4)
add    $0x1,%rbp
xor    %edi,%edi
lea    0xced(%rip),%rsi
call   10a0 <strtok@plt>
test   %rax,%rax
jne    12e0 <calculate_confusion_penalties_matrix+0x140>
jmp    1336 <calculate_confusion_penalties_matrix+0x196>
mov    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jne    158a <calculate_confusion_penalties_matrix+0x3ea>
addq   $0x1,0x10(%rsp)
mov    0x28(%rsp),%rbp
add    %rbp,%r14
jmp    1240 <calculate_confusion_penalties_matrix+0xa0>
mov    0x10(%rsp),%rax
cmp    %eax,0x8(%rsp)
jne    158a <calculate_confusion_penalties_matrix+0x3ea>
mov    %r12,%rdi
call   1040 <fclose@plt>
cmpl   $0x0,0x20(%rsp)
jle    15b4 <calculate_confusion_penalties_matrix+0x414>
lea    -0x1(%r15),%r11
mov    %r15d,%r10d
and    $0xfffffffc,%r10d
lea    -0x4(%r10),%r12
mov    %r12,%r13
shr    $0x2,%r13
add    $0x1,%r13
mov    %r15d,%edi
and    $0x3,%edi
mov    %r13,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x38(%rsp)
mov    0x18(%rsp),%r8
mov    %r8,%rbp
add    $0xc,%rbp
mov    0x8(%rsp),%rax
lea    0x0(,%rax,4),%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rbx),%rsi
lea    0x0(,%r15,4),%rax
mov    %rax,0x28(%rsp)
mov    $0x1,%r14b
xor    %r9d,%r9d
xorps  %xmm0,%xmm0
mov    %rbx,%rax
mov    %r13,0x30(%rsp)
jmp    141a <calculate_confusion_penalties_matrix+0x27a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r9
cmp    %r15,%r9
setb   %r14b
mov    0x10(%rsp),%rcx
add    %rcx,%rbp
add    %rcx,%r8
mov    0x28(%rsp),%rcx
add    %rcx,%rsi
add    %rcx,%rax
cmp    %r15,%r9
je     15bc <calculate_confusion_penalties_matrix+0x41c>
cmp    $0x3,%r11
jae    1430 <calculate_confusion_penalties_matrix+0x290>
xor    %edx,%edx
xorps  %xmm1,%xmm1
jmp    147d <calculate_confusion_penalties_matrix+0x2dd>
nopw   0x0(%rax,%rax,1)
xorps  %xmm1,%xmm1
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm2,%xmm2
cvtsi2ssl -0xc(%rbp,%rdx,4),%xmm2
xorps  %xmm3,%xmm3
cvtsi2ssl -0x8(%rbp,%rdx,4),%xmm3
addss  %xmm1,%xmm2
xorps  %xmm4,%xmm4
cvtsi2ssl -0x4(%rbp,%rdx,4),%xmm4
addss  %xmm2,%xmm3
xorps  %xmm1,%xmm1
cvtsi2ssl 0x0(%rbp,%rdx,4),%xmm1
addss  %xmm3,%xmm4
addss  %xmm4,%xmm1
add    $0x4,%rdx
cmp    %rdx,%r10
jne    1440 <calculate_confusion_penalties_matrix+0x2a0>
test   %rdi,%rdi
je     14a5 <calculate_confusion_penalties_matrix+0x305>
lea    (%r8,%rdx,4),%rcx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
xorps  %xmm2,%xmm2
cvtsi2ssl (%rcx,%rdx,4),%xmm2
addss  %xmm2,%xmm1
add    $0x1,%rdx
cmp    %rdx,%rdi
jne    1490 <calculate_confusion_penalties_matrix+0x2f0>
ucomiss %xmm0,%xmm1
jbe    15d5 <calculate_confusion_penalties_matrix+0x435>
cmpl   $0x4,0x20(%rsp)
jae    14c0 <calculate_confusion_penalties_matrix+0x320>
xor    %ecx,%ecx
jmp    1560 <calculate_confusion_penalties_matrix+0x3c0>
nopl   0x0(%rax)
movaps %xmm1,%xmm2
shufps $0x0,%xmm1,%xmm2
test   %r12,%r12
je     1580 <calculate_confusion_penalties_matrix+0x3e0>
mov    0x38(%rsp),%rcx
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movups (%r8,%rdx,4),%xmm3
cvtdq2ps %xmm3,%xmm3
divps  %xmm2,%xmm3
movups %xmm3,-0x10(%rsi,%rdx,4)
movups 0x10(%r8,%rdx,4),%xmm3
cvtdq2ps %xmm3,%xmm3
divps  %xmm2,%xmm3
movups %xmm3,(%rsi,%rdx,4)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rcx
jne    14e0 <calculate_confusion_penalties_matrix+0x340>
test   $0x1,%r13b
je     154c <calculate_confusion_penalties_matrix+0x3ac>
mov    %r9,%rcx
imul   0x8(%rsp),%rcx
mov    %r9,%r14
imul   %r15,%r14
add    %rdx,%rcx
mov    %r12,%r13
mov    %r11,%r12
mov    0x18(%rsp),%r11
movups (%r11,%rcx,4),%xmm3
mov    %r12,%r11
mov    %r13,%r12
mov    0x30(%rsp),%r13
cvtdq2ps %xmm3,%xmm3
divps  %xmm2,%xmm3
add    %rdx,%r14
movups %xmm3,(%rbx,%r14,4)
mov    %r10,%rcx
cmp    %r15,%r10
je     13f0 <calculate_confusion_penalties_matrix+0x250>
nopl   0x0(%rax,%rax,1)
xorps  %xmm2,%xmm2
cvtsi2ssl (%r8,%rcx,4),%xmm2
divss  %xmm1,%xmm2
movss  %xmm2,(%rax,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%r15
jne    1560 <calculate_confusion_penalties_matrix+0x3c0>
jmp    13f0 <calculate_confusion_penalties_matrix+0x250>
xor    %edx,%edx
test   $0x1,%r13b
jne    1510 <calculate_confusion_penalties_matrix+0x370>
jmp    154c <calculate_confusion_penalties_matrix+0x3ac>
mov    %r12,%rdi
call   1040 <fclose@plt>
xor    %r14d,%r14d
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %r14d,%eax
add    $0x438,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%r14d
jmp    1595 <calculate_confusion_penalties_matrix+0x3f5>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
cmpl   $0x0,0x20(%rsp)
jg     15fe <calculate_confusion_penalties_matrix+0x45e>
mov    $0x1,%r14d
jmp    159f <calculate_confusion_penalties_matrix+0x3ff>
cmpl   $0x0,0x20(%rsp)
setle  %bpl
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
or     %r14b,%bpl
test   $0x1,%bpl
je     15fe <calculate_confusion_penalties_matrix+0x45e>
not    %r14b
movzbl %r14b,%r14d
and    $0x1,%r14d
jmp    159f <calculate_confusion_penalties_matrix+0x3ff>
lea    0x0(,%r15,4),%r14
xor    %r12d,%r12d
xorps  %xmm1,%xmm1
mov    0x29d5(%rip),%r13
jmp    162c <calculate_confusion_penalties_matrix+0x48c>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r12
add    %r14,%rbx
cmp    %r15,%r12
je     15cd <calculate_confusion_penalties_matrix+0x42d>
xor    %ebp,%ebp
jmp    164b <calculate_confusion_penalties_matrix+0x4ab>
movss  0x0(%r13),%xmm0
xorps  0x9c3(%rip),%xmm0
movss  %xmm0,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%r15
je     1620 <calculate_confusion_penalties_matrix+0x480>
movss  (%rbx,%rbp,4),%xmm0
ucomiss %xmm1,%xmm0
jbe    1630 <calculate_confusion_penalties_matrix+0x490>
call   10b0 <log10@plt>
xorps  %xmm1,%xmm1
jmp    163d <calculate_confusion_penalties_matrix+0x49d>

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c" \09\00"
@.str.2 = [3 x i8] c"%d\00"
@FLT_MAX = global float 0.000000e+00
define i32 @calculate_confusion_penalties_matrix(i8* %0, i32 %1, float* %2) {
%4 = alloca [1001 x i8]
%5 = alloca i32
%6 = getelementptr inbounds [1001 x i8], [1001 x i8]* %4, i64 0, i64 0
%7 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%8 = icmp eq i8* %0, null
%9 = icmp slt i32 %1, 1
%10 = or i1 %8, %9
%11 = icmp eq float* %2, null
%12 = or i1 %10, %11
br i1 %12, label %247, label %13
13: ; preds = %3
%14 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i32* %14, null
br i1 %15, label %247, label %16
16: ; preds = %13
%17 = add nuw nsw i32 %1, 1
%18 = shl i32 %17, 2
%19 = mul i32 %18, %17
%20 = tail call i32* @malloc(i32 %19)
%21 = tail call i32 @memset(i32* %20, i32 0, i32 %19)
%22 = zext i32 %17 to i64
%23 = zext i32 %17 to i64
br label %24
24: ; preds = %69, %16
%25 = phi i64 [ %70, %69 ], [ 0, %16 ]
br label %26
26: ; preds = %24, %29
%27 = call i32 @feof(i32* %14)
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %71
29: ; preds = %26
%30 = call i32 @read_string(i32* %14, i8* %6)
%31 = icmp slt i32 %30, 1
br i1 %31, label %26, label %32
32: ; preds = %29
%33 = icmp eq i64 %25, %23
br i1 %33, label %74, label %34
34: ; preds = %32
%35 = call i8* @strtok(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%36 = icmp eq i8* %35, null
br i1 %36, label %74, label %37
37: ; preds = %34
%38 = call i32 @sscanf(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %74
40: ; preds = %37
%41 = load i32, i32* %5
%42 = icmp slt i32 %41, 0
br i1 %42, label %74, label %43
43: ; preds = %40
%44 = mul nsw i64 %25, %22
%45 = getelementptr inbounds i32, i32* %20, i64 %44
store i32 %41, i32* %45
%46 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%47 = icmp eq i8* %46, null
br i1 %47, label %66, label %48
48: ; preds = %43, %58
%49 = phi i64 [ %61, %58 ], [ 1, %43 ]
%50 = phi i8* [ %62, %58 ], [ %46, %43 ]
%51 = icmp eq i64 %49, %23
br i1 %51, label %74, label %52
52: ; preds = %48
%53 = call i32 @sscanf(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%54 = icmp eq i32 %53, 1
br i1 %54, label %55, label %74
55: ; preds = %52
%56 = load i32, i32* %5
%57 = icmp slt i32 %56, 0
br i1 %57, label %74, label %58
58: ; preds = %55
%59 = add nuw nsw i64 %49, %44
%60 = getelementptr inbounds i32, i32* %20, i64 %59
store i32 %56, i32* %60
%61 = add nuw nsw i64 %49, 1
%62 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%63 = icmp eq i8* %62, null
br i1 %63, label %64, label %48
64: ; preds = %58
%65 = trunc i64 %61 to i32
br label %66
66: ; preds = %64, %43
%67 = phi i32 [ 1, %43 ], [ %65, %64 ]
%68 = icmp eq i32 %67, %17
br i1 %68, label %69, label %74
69: ; preds = %66
%70 = add nuw nsw i64 %25, 1
br label %24
71: ; preds = %26
%72 = trunc i64 %25 to i32
%73 = icmp eq i32 %17, %72
br i1 %73, label %76, label %74
74: ; preds = %66, %32, %34, %37, %40, %48, %52, %55, %71
%75 = call i32 @fclose(i32* %14)
br label %244
76: ; preds = %71
%77 = call i32 @fclose(i32* %14)
%78 = icmp sgt i32 %1, 0
br i1 %78, label %79, label %244
79: ; preds = %76
%80 = zext i32 %1 to i64
%81 = zext i32 %1 to i64
%82 = add nsw i64 %81, -1
%83 = and i64 %81, 4294967292
%84 = add nsw i64 %83, -4
%85 = lshr exact i64 %84, 2
%86 = add nuw nsw i64 %85, 1
%87 = and i64 %81, 3
%88 = icmp ult i64 %82, 3
%89 = and i64 %81, 4294967292
%90 = icmp eq i64 %87, 0
%91 = icmp ult i32 %1, 4
%92 = and i64 %81, 4294967292
%93 = and i64 %86, 1
%94 = icmp eq i64 %84, 0
%95 = and i64 %86, 9223372036854775806
%96 = icmp eq i64 %93, 0
%97 = icmp eq i64 %92, %81
br label %98
98: ; preds = %208, %79
%99 = phi i64 [ 0, %79 ], [ %209, %208 ]
%100 = phi i1 [ true, %79 ], [ %210, %208 ]
%101 = mul nsw i64 %99, %22
br i1 %88, label %132, label %102
102: ; preds = %98, %102
%103 = phi i64 [ %129, %102 ], [ 0, %98 ]
%104 = phi float [ %128, %102 ], [ 0.000000e+00, %98 ]
%105 = phi i64 [ %130, %102 ], [ 0, %98 ]
%106 = add nuw nsw i64 %103, %101
%107 = getelementptr inbounds i32, i32* %20, i64 %106
%108 = load i32, i32* %107
%109 = sitofp i32 %108 to float
%110 = fadd float %104, %109
%111 = or i64 %103, 1
%112 = add nuw nsw i64 %111, %101
%113 = getelementptr inbounds i32, i32* %20, i64 %112
%114 = load i32, i32* %113
%115 = sitofp i32 %114 to float
%116 = fadd float %110, %115
%117 = or i64 %103, 2
%118 = add nuw nsw i64 %117, %101
%119 = getelementptr inbounds i32, i32* %20, i64 %118
%120 = load i32, i32* %119
%121 = sitofp i32 %120 to float
%122 = fadd float %116, %121
%123 = or i64 %103, 3
%124 = add nuw nsw i64 %123, %101
%125 = getelementptr inbounds i32, i32* %20, i64 %124
%126 = load i32, i32* %125
%127 = sitofp i32 %126 to float
%128 = fadd float %122, %127
%129 = add nuw nsw i64 %103, 4
%130 = add i64 %105, 4
%131 = icmp eq i64 %130, %89
br i1 %131, label %132, label %102
132: ; preds = %102, %98
%133 = phi float [ undef, %98 ], [ %128, %102 ]
%134 = phi i64 [ 0, %98 ], [ %129, %102 ]
%135 = phi float [ 0.000000e+00, %98 ], [ %128, %102 ]
br i1 %90, label %148, label %136
136: ; preds = %132, %136
%137 = phi i64 [ %145, %136 ], [ %134, %132 ]
%138 = phi float [ %144, %136 ], [ %135, %132 ]
%139 = phi i64 [ %146, %136 ], [ 0, %132 ]
%140 = add nuw nsw i64 %137, %101
%141 = getelementptr inbounds i32, i32* %20, i64 %140
%142 = load i32, i32* %141
%143 = sitofp i32 %142 to float
%144 = fadd float %138, %143
%145 = add nuw nsw i64 %137, 1
%146 = add i64 %139, 1
%147 = icmp eq i64 %146, %87
br i1 %147, label %148, label %136
148: ; preds = %136, %132
%149 = phi float [ %133, %132 ], [ %144, %136 ]
%150 = fcmp ogt float %149, 0.000000e+00
br i1 %150, label %151, label %212
151: ; preds = %148
%152 = mul nsw i64 %99, %22
%153 = mul nsw i64 %99, %80
br i1 %91, label %195, label %154
154: ; preds = %151
%155 = insertelement <4 x float> poison, float %149, i64 0
%156 = shufflevector <4 x float> %155, <4 x float> poison, <4 x i32> zeroinitializer
br i1 %94, label %182, label %157
157: ; preds = %154, %157
%158 = phi i64 [ %179, %157 ], [ 0, %154 ]
%159 = phi i64 [ %180, %157 ], [ 0, %154 ]
%160 = add nuw nsw i64 %158, %152
%161 = getelementptr inbounds i32, i32* %20, i64 %160
%162 = bitcast i32* %161 to <4 x i32>*
%163 = load <4 x i32>, <4 x i32>* %162
%164 = sitofp <4 x i32> %163 to <4 x float>
%165 = fdiv <4 x float> %164, %156
%166 = add nuw nsw i64 %158, %153
%167 = getelementptr inbounds float, float* %2, i64 %166
%168 = bitcast float* %167 to <4 x float>*
store <4 x float> %165, <4 x float>* %168
%169 = or i64 %158, 4
%170 = add nuw nsw i64 %169, %152
%171 = getelementptr inbounds i32, i32* %20, i64 %170
%172 = bitcast i32* %171 to <4 x i32>*
%173 = load <4 x i32>, <4 x i32>* %172
%174 = sitofp <4 x i32> %173 to <4 x float>
%175 = fdiv <4 x float> %174, %156
%176 = add nuw nsw i64 %169, %153
%177 = getelementptr inbounds float, float* %2, i64 %176
%178 = bitcast float* %177 to <4 x float>*
store <4 x float> %175, <4 x float>* %178
%179 = add nuw i64 %158, 8
%180 = add i64 %159, 2
%181 = icmp eq i64 %180, %95
br i1 %181, label %182, label %157
182: ; preds = %157, %154
%183 = phi i64 [ 0, %154 ], [ %179, %157 ]
br i1 %96, label %194, label %184
184: ; preds = %182
%185 = add nuw nsw i64 %183, %152
%186 = getelementptr inbounds i32, i32* %20, i64 %185
%187 = bitcast i32* %186 to <4 x i32>*
%188 = load <4 x i32>, <4 x i32>* %187
%189 = sitofp <4 x i32> %188 to <4 x float>
%190 = fdiv <4 x float> %189, %156
%191 = add nuw nsw i64 %183, %153
%192 = getelementptr inbounds float, float* %2, i64 %191
%193 = bitcast float* %192 to <4 x float>*
store <4 x float> %190, <4 x float>* %193
br label %194
194: ; preds = %182, %184
br i1 %97, label %208, label %195
195: ; preds = %151, %194
%196 = phi i64 [ 0, %151 ], [ %92, %194 ]
br label %197
197: ; preds = %195, %197
%198 = phi i64 [ %206, %197 ], [ %196, %195 ]
%199 = add nuw nsw i64 %198, %152
%200 = getelementptr inbounds i32, i32* %20, i64 %199
%201 = load i32, i32* %200
%202 = sitofp i32 %201 to float
%203 = fdiv float %202, %149
%204 = add nuw nsw i64 %198, %153
%205 = getelementptr inbounds float, float* %2, i64 %204
store float %203, float* %205
%206 = add nuw nsw i64 %198, 1
%207 = icmp eq i64 %206, %81
br i1 %207, label %208, label %197
208: ; preds = %197, %194
%209 = add nuw nsw i64 %99, 1
%210 = icmp ult i64 %209, %80
%211 = icmp eq i64 %209, %81
br i1 %211, label %218, label %98
212: ; preds = %148
%213 = call i32 @free(i32* %20)
%214 = xor i1 %78, true
%215 = or i1 %100, %214
%216 = xor i1 %100, true
%217 = zext i1 %216 to i32
br i1 %215, label %247, label %220
218: ; preds = %208
%219 = call i32 @free(i32* %20)
br i1 %78, label %220, label %247
220: ; preds = %212, %218
%221 = zext i32 %1 to i64
%222 = zext i32 %1 to i64
br label %223
223: ; preds = %241, %220
%224 = phi i64 [ 0, %220 ], [ %242, %241 ]
%225 = mul nsw i64 %224, %221
br label %226
226: ; preds = %223, %237
%227 = phi i64 [ 0, %223 ], [ %239, %237 ]
%228 = add nuw nsw i64 %227, %225
%229 = getelementptr inbounds float, float* %2, i64 %228
%230 = load float, float* %229
%231 = fcmp ogt float %230, 0.000000e+00
br i1 %231, label %232, label %234
232: ; preds = %226
%233 = call float @log10(float %230)
br label %237
234: ; preds = %226
%235 = load float, float* @FLT_MAX
%236 = fneg float %235
br label %237
237: ; preds = %232, %234
%238 = phi float [ %236, %234 ], [ %233, %232 ]
store float %238, float* %229
%239 = add nuw nsw i64 %227, 1
%240 = icmp eq i64 %239, %222
br i1 %240, label %241, label %226
241: ; preds = %237
%242 = add nuw nsw i64 %224, 1
%243 = icmp eq i64 %242, %222
br i1 %243, label %247, label %223
244: ; preds = %76, %74
%245 = phi i32 [ 0, %74 ], [ 1, %76 ]
%246 = call i32 @free(i32* %20)
br label %247
247: ; preds = %241, %244, %212, %218, %13, %3
%248 = phi i32 [ 0, %3 ], [ 0, %13 ], [ %217, %212 ], [ 1, %218 ], [ %245, %244 ], [ 1, %241 ]
ret i32 %248
}