#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 */
double DBL_MAX;
double DBL_MIN;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *);
void make_heatmap_html(double test_data[], int rows, int columns,
                       int plate_size, int plates, int precision,
                       int font_size) {
  int i = 0;
  int j = 0;
  int k = 0;
  char *gradient_iris[] = {
      "#0000FF", "#000FFF", "#001EFF", "#002DFF", "#003CFF", "#004BFF",
      "#005AFF", "#0069FF", "#0078FF", "#0087FF", "#0096FF", "#00A5FF",
      "#00B4FF", "#00C3FF", "#00D2FF", "#00E1FF", "#00F0FF", "#00FFF0",
      "#00FFE1", "#00FFD2", "#00FFC3", "#00FFB4", "#00FFA5", "#00FF96",
      "#00FF87", "#00FF78", "#00FF69", "#00FF5A", "#00FF4B", "#00FF3C",
      "#00FF2D", "#00FF1E", "#00FF0F", "#0FFF00", "#1EFF00", "#2DFF00",
      "#3CFF00", "#4BFF00", "#5AFF00", "#69FF00", "#78FF00", "#87FF00",
      "#96FF00", "#A5FF00", "#B4FF00", "#C3FF00", "#D2FF00", "#E1FF00",
      "#F0FF00", "#FFF000", "#FFE100", "#FFD200", "#FFC300", "#FFB400",
      "#FFA500", "#FF9600", "#FF8700", "#FF7800", "#FF6900", "#FF5A00",
      "#FF4B00", "#FF3C00", "#FF2D00", "#FF1E00", "#FF0F00"};
  double high[plates];
  double low[plates];
  double temp_high;
  double temp_low;
  for (i = 0; i < plates; i++) {
    temp_low = DBL_MAX;
    temp_high = DBL_MIN;
    for (j = 0; j < plate_size; j++) {
      if (temp_high < test_data[i * plate_size + j]) {
        temp_high = test_data[i * plate_size + j];
      }
      if (temp_low > test_data[i * plate_size + j]) {
        temp_low = test_data[i * plate_size + j];
      }
    }
    high[i] = temp_high;
    low[i] = temp_low;
  }
  FILE *f = fopen("heatmap1.html", "w");
  if (f == NULL) {
    printf("Error opening file!\n");
  }
  fprintf(f, "<!DOCTYPE html>\n");
  fprintf(f, "<html lang=\"en\">\n");
  fprintf(f, "<head>\n");
  fprintf(f, "<meta charset=\"UTF-8\"/>\n");
  fprintf(f, "<title>Heatmap</title>\n");
  fprintf(f, "</head>\n");
  fprintf(f, "<body style=\"font-size:%ipx\">\n", font_size);
  fprintf(f, "<h1 align=\"center\">Heatmap 384 Well Plates</h1>\n");
  int counter = 0;
  double diff = 0;
  double temp1 = 0;
  double temp2 = 0;
  double temp3 = 0;
  for (i = 0; i < plates; i++) {
    fprintf(
        f,
        "<table align=\"center\" "
        "style=\"border-collapse:collapse;\"><caption>Score %i</caption><tr>\n",
        i + 1);
    for (j = 0; j < 8; j++) {
      diff = high[i] - low[i];
      temp1 = (low[i] + j * (diff / 7));
      temp2 = (((temp1 - low[i]) / (high[i] - low[i])) * 64);
      if (temp2 > 64)
        temp2 = 64;
      if (temp2 < 0)
        temp2 = 0;
      fprintf(f, "<td bgcolor=\"%s\">%.*f</td>\n", gradient_iris[(int)temp2],
              precision, temp1);
    }
    fprintf(f, "</tr></table>");
    fprintf(
        f,
        "<table align=\"center\" bgcolor=\"silver\"  "
        "style=\"margin-bottom:40pt\"><caption>Plate %i</caption><thead><tr>\n",
        i + 1);
    fprintf(f, "<th scope=\"rowgroup\" bgcolor=\"silver\"></th>\n");
    for (j = 0; j < columns - 1; j++) {
      fprintf(f, "<th scope=\"col\" bgcolor=\"silver\">%i</th>\n", j + 1);
    }
    fprintf(f, "</tr></thead><tbody>\n");
    for (j = 0; j < rows; j++) {
      fprintf(f, "<tr>\n");
      for (k = 0; k < columns; k++) {
        if (k == 0) {
          fprintf(f, "<th scope=\"row\" bgcolor=\"silver\">%i</th>\n", j + 1);
        } else {
          temp3 = (((test_data[counter] - low[i]) / (high[i] - low[i])) * 64);
          if (temp3 > 64)
            temp3 = 64;
          if (temp3 < 0)
            temp3 = 0;
          fprintf(f, "<td bgcolor=\"%s\">%.*f</td>\n",
                  gradient_iris[(int)temp3], precision, test_data[counter]);
          counter += 1;
        }
      }
      fprintf(f, "</tr>\n");
    }
    fprintf(f, "</tbody></table>\n");
  }
  fprintf(f, "</body>\n");
  fprintf(f, "</html>\n");
  fclose(f);
  printf("heatmap1.html file created.\n");
}


x86 assembly (clang, -O0):
<make_heatmap_html>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2a0,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
lea    0x2a71(%rip),%rsi
lea    -0x230(%rbp),%rdi
mov    $0x208,%edx
call   1060 <memcpy@plt>
mov    -0x18(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x238(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x298(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x240(%rbp)
mov    -0x18(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x290(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x248(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    131b <make_heatmap_html+0x1cb>
mov    0x2dc8(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x258(%rbp)
ff
mov    0x2dad(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x250(%rbp)
ff
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12dd <make_heatmap_html+0x18d>
movsd  -0x250(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1288 <make_heatmap_html+0x138>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x250(%rbp)
ff
movsd  -0x258(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    12ca <make_heatmap_html+0x17a>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x258(%rbp)
ff
jmp    12cf <make_heatmap_html+0x17f>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1236 <make_heatmap_html+0xe6>
mov    -0x290(%rbp),%rax
mov    -0x298(%rbp),%rcx
movsd  -0x250(%rbp),%xmm0
ff
movslq -0x20(%rbp),%rdx
movsd  %xmm0,(%rcx,%rdx,8)
movsd  -0x258(%rbp),%xmm0
ff
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11fd <make_heatmap_html+0xad>
lea    0xef6(%rip),%rdi
lea    0xefd(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x260(%rbp)
cmpq   $0x0,-0x260(%rbp)
jne    134f <make_heatmap_html+0x1ff>
lea    0xede(%rip),%rdi
call   1040 <printf@plt>
mov    -0x260(%rbp),%rdi
lea    0xee0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
mov    0x10(%rbp),%edx
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x264(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x270(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x278(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x280(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x288(%rbp)
ff
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    17c3 <make_heatmap_html+0x673>
mov    -0x260(%rbp),%rdi
mov    -0x20(%rbp),%edx
add    $0x1,%edx
lea    0xe9b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x8,-0x24(%rbp)
jge    158a <make_heatmap_html+0x43a>
mov    -0x290(%rbp),%rax
mov    -0x298(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
movslq -0x20(%rbp),%rdx
subsd  (%rax,%rdx,8),%xmm0
movsd  %xmm0,-0x270(%rbp)
ff
movslq -0x20(%rbp),%rdx
movsd  (%rax,%rdx,8),%xmm1
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  -0x270(%rbp),%xmm2
ff
movsd  0xb53(%rip),%xmm3
divsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x278(%rbp)
ff
movsd  -0x278(%rbp),%xmm0
ff
movslq -0x20(%rbp),%rdx
subsd  (%rax,%rdx,8),%xmm0
movslq -0x20(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm1
movslq -0x20(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  0xb08(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x280(%rbp)
ff
movsd  -0x280(%rbp),%xmm0
ff
movsd  0xaec(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    152e <make_heatmap_html+0x3de>
movsd  0xada(%rip),%xmm0
movsd  %xmm0,-0x280(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x280(%rbp),%xmm0
ff
jbe    154a <make_heatmap_html+0x3fa>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x280(%rbp)
ff
mov    -0x260(%rbp),%rdi
cvttsd2si -0x280(%rbp),%eax
ff
cltq
mov    -0x230(%rbp,%rax,8),%rdx
ff
mov    -0x1c(%rbp),%ecx
movsd  -0x278(%rbp),%xmm0
ff
lea    0xdd6(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1465 <make_heatmap_html+0x315>
mov    -0x260(%rbp),%rdi
lea    0xdcf(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
mov    -0x20(%rbp),%edx
add    $0x1,%edx
lea    0xdc2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xe18(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1610 <make_heatmap_html+0x4c0>
mov    -0x260(%rbp),%rdi
mov    -0x24(%rbp),%edx
add    $0x1,%edx
lea    0xe12(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    15d6 <make_heatmap_html+0x486>
mov    -0x260(%rbp),%rdi
lea    0xe19(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    17a0 <make_heatmap_html+0x650>
mov    -0x260(%rbp),%rdi
lea    0xd94(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    177d <make_heatmap_html+0x62d>
cmpl   $0x0,-0x28(%rbp)
jne    168a <make_heatmap_html+0x53a>
mov    -0x260(%rbp),%rdi
mov    -0x24(%rbp),%edx
add    $0x1,%edx
lea    0xdcf(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    176a <make_heatmap_html+0x61a>
mov    -0x290(%rbp),%rax
mov    -0x298(%rbp),%rcx
mov    -0x8(%rbp),%rdx
movslq -0x264(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm0
movslq -0x20(%rbp),%rdx
subsd  (%rax,%rdx,8),%xmm0
movslq -0x20(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm1
movslq -0x20(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  0x931(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x288(%rbp)
ff
movsd  -0x288(%rbp),%xmm0
ff
movsd  0x915(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1705 <make_heatmap_html+0x5b5>
movsd  0x903(%rip),%xmm0
movsd  %xmm0,-0x288(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x288(%rbp),%xmm0
ff
jbe    1721 <make_heatmap_html+0x5d1>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x288(%rbp)
ff
mov    -0x260(%rbp),%rdi
cvttsd2si -0x288(%rbp),%eax
ff
cltq
mov    -0x230(%rbp,%rax,8),%rdx
ff
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq -0x264(%rbp),%rsi
movsd  (%rax,%rsi,8),%xmm0
lea    0xbf7(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x264(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x264(%rbp)
jmp    176f <make_heatmap_html+0x61f>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1654 <make_heatmap_html+0x504>
mov    -0x260(%rbp),%rdi
lea    0xcec(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    162c <make_heatmap_html+0x4dc>
mov    -0x260(%rbp),%rdi
lea    0xcd0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1437 <make_heatmap_html+0x2e7>
mov    -0x260(%rbp),%rdi
lea    0xcbf(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
lea    0xcb3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x260(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xca2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x238(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_heatmap_html>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %rdx,-0x38(%rbp)
mov    %esi,-0x30(%rbp)
mov    0x10(%rbp),%r13d
mov    %r8d,%eax
mov    %rsp,%rdx
mov    %rax,-0x60(%rbp)
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
mov    %rsp,%rdx
sub    %rax,%rdx
mov    %rdx,-0x50(%rbp)
mov    %rdx,%rsp
test   %r8d,%r8d
jle    12a2 <make_heatmap_html+0x152>
mov    0x2e29(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2e16(%rip),%rax
movsd  (%rax),%xmm1
movslq %ecx,%r8
mov    %r8d,%r9d
mov    %r9d,%esi
and    $0xfffffffe,%esi
lea    0x8(%rdi),%rbx
lea    0x0(,%r8,8),%r10
xor    %r11d,%r11d
jmp    1205 <make_heatmap_html+0xb5>
nopl   0x0(%rax,%rax,1)
mov    -0x58(%rbp),%rax
movsd  %xmm2,(%rax,%r11,8)
mov    -0x50(%rbp),%rax
movsd  %xmm3,(%rax,%r11,8)
add    $0x1,%r11
add    %r10,%rbx
cmp    -0x60(%rbp),%r11
je     12a2 <make_heatmap_html+0x152>
movapd %xmm1,%xmm2
movapd %xmm0,%xmm3
test   %ecx,%ecx
jle    11e0 <make_heatmap_html+0x90>
xor    %edx,%edx
cmp    $0x1,%ecx
jne    1230 <make_heatmap_html+0xe0>
movapd %xmm0,%xmm3
movapd %xmm1,%xmm2
jmp    1270 <make_heatmap_html+0x120>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm0,%xmm4
movapd %xmm1,%xmm2
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%rbx,%rdx,8),%xmm5
movsd  (%rbx,%rdx,8),%xmm3
movapd %xmm5,%xmm6
maxsd  %xmm2,%xmm6
minsd  %xmm4,%xmm5
movapd %xmm3,%xmm2
maxsd  %xmm6,%xmm2
minsd  %xmm5,%xmm3
add    $0x2,%rdx
movapd %xmm3,%xmm4
cmp    %rdx,%rsi
jne    1240 <make_heatmap_html+0xf0>
test   $0x1,%r9b
je     11e0 <make_heatmap_html+0x90>
mov    %r11,%rax
imul   %r8,%rax
add    %rax,%rdx
movsd  (%rdi,%rdx,8),%xmm4
movapd %xmm4,%xmm5
maxsd  %xmm2,%xmm5
minsd  %xmm3,%xmm4
movapd %xmm5,%xmm2
movapd %xmm4,%xmm3
jmp    11e0 <make_heatmap_html+0x90>
mov    %rdi,-0x88(%rbp)
lea    0xf70(%rip),%rdi
lea    0xf77(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r12
test   %rax,%rax
jne    12d0 <make_heatmap_html+0x180>
lea    0x11e6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf59(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
lea    0xf51(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
lea    0xf4a(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
lea    0xf39(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
lea    0xf39(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
lea    0xf38(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
lea    0xf28(%rip),%rsi
mov    %r12,%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xf33(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
test   %r15d,%r15d
mov    -0x38(%rbp),%rax
jle    1659 <make_heatmap_html+0x509>
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
xor    %ebx,%ebx
xor    %r15d,%r15d
mov    %r14d,-0x2c(%rbp)
mov    %r12,-0x70(%rbp)
jmp    13eb <make_heatmap_html+0x29b>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x11,%esi
mov    $0x1,%edx
lea    0x10a0(%rip),%rdi
mov    %r12,%rcx
call   1070 <fwrite@plt>
mov    -0x68(%rbp),%rbx
cmp    -0x60(%rbp),%rbx
mov    -0x2c(%rbp),%r14d
je     1659 <make_heatmap_html+0x509>
lea    0x1(%rbx),%rdx
mov    %r12,%rdi
lea    0xeec(%rip),%rsi
mov    %rdx,-0x68(%rbp)
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    -0x58(%rbp),%rax
movsd  (%rax,%rbx,8),%xmm0
mov    -0x50(%rbp),%rax
movsd  (%rax,%rbx,8),%xmm1
movsd  %xmm1,-0x78(%rbp)
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
divsd  0xbd4(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    $0x8,%ebx
xorpd  %xmm1,%xmm1
mov    %r14d,%r13d
lea    0x27b9(%rip),%r14
nopw   0x0(%rax,%rax,1)
movsd  %xmm1,-0x40(%rbp)
movapd %xmm1,%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm2
addsd  %xmm2,%xmm0
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  0xb89(%rip),%xmm2
mulsd  %xmm2,%xmm1
minsd  %xmm1,%xmm2
xorpd  %xmm1,%xmm1
maxsd  %xmm2,%xmm1
cvttsd2si %xmm1,%eax
cltq
mov    (%r14,%rax,8),%rdx
mov    %r12,%rdi
lea    0xe9b(%rip),%rsi
mov    %r13d,%ecx
mov    $0x1,%al
call   1050 <fprintf@plt>
movsd  -0x40(%rbp),%xmm1
addsd  0xb56(%rip),%xmm1
add    $0xffffffff,%ebx
jne    1450 <make_heatmap_html+0x300>
mov    $0xd,%esi
mov    $0x1,%edx
lea    0xe8a(%rip),%rdi
mov    %r12,%rcx
call   1070 <fwrite@plt>
mov    %r12,%rdi
lea    0xe86(%rip),%rsi
mov    -0x68(%rbp),%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x2c,%esi
mov    $0x1,%edx
lea    0xed5(%rip),%rdi
mov    %r12,%rcx
call   1070 <fwrite@plt>
mov    -0x38(%rbp),%r14
cmp    $0x2,%r14d
lea    0xeeb(%rip),%r13
jl     1537 <make_heatmap_html+0x3e7>
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r13,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x1,%ebx
cmp    %ebx,%r14d
jne    1520 <make_heatmap_html+0x3d0>
mov    $0x15,%esi
mov    $0x1,%edx
lea    0xee2(%rip),%rdi
mov    %r12,%rcx
call   1070 <fwrite@plt>
cmpl   $0x0,-0x30(%rbp)
jle    13c0 <make_heatmap_html+0x270>
xor    %r14d,%r14d
mov    -0x38(%rbp),%rbx
lea    0xf02(%rip),%r13
jmp    1593 <make_heatmap_html+0x443>
nopw   0x0(%rax,%rax,1)
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r13,%rdi
mov    %r12,%rcx
call   1070 <fwrite@plt>
mov    -0x40(%rbp),%r14d
cmp    -0x30(%rbp),%r14d
je     13c0 <make_heatmap_html+0x270>
mov    $0x5,%esi
mov    $0x1,%edx
lea    0xe29(%rip),%rdi
mov    %r12,%rcx
call   1070 <fwrite@plt>
add    $0x1,%r14d
test   %ebx,%ebx
mov    %r14d,-0x40(%rbp)
jle    1570 <make_heatmap_html+0x420>
mov    %r12,%rdi
lea    0xe7e(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
cmp    $0x1,%ebx
je     1570 <make_heatmap_html+0x420>
movslq %r15d,%r15
mov    -0x44(%rbp),%ebx
lea    0x2622(%rip),%r12
mov    -0x88(%rbp),%r13
mov    -0x2c(%rbp),%r14d
nopl   0x0(%rax)
movsd  0x0(%r13,%r15,8),%xmm0
movapd %xmm0,%xmm1
subsd  -0x78(%rbp),%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  0x9fb(%rip),%xmm2
mulsd  %xmm2,%xmm1
minsd  %xmm1,%xmm2
xorpd  %xmm1,%xmm1
maxsd  %xmm2,%xmm1
cvttsd2si %xmm1,%eax
cltq
mov    (%r12,%rax,8),%rdx
mov    -0x70(%rbp),%rdi
lea    0xd0c(%rip),%rsi
mov    %r14d,%ecx
mov    $0x1,%al
call   1050 <fprintf@plt>
add    $0x1,%r15
add    $0xffffffff,%ebx
jne    15f0 <make_heatmap_html+0x4a0>
mov    -0x38(%rbp),%rbx
mov    -0x70(%rbp),%r12
lea    0xe16(%rip),%r13
jmp    1570 <make_heatmap_html+0x420>
lea    0xe23(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
lea    0xe13(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1070 <fwrite@plt>
mov    %r12,%rdi
call   1040 <fclose@plt>
lea    0xdfb(%rip),%rdi
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"FF\00"
@.str.1 = [8 x i8] c"FFF\00"
@.str.2 = [8 x i8] c"EFF\00"
@.str.3 = [8 x i8] c"DFF\00"
@.str.4 = [8 x i8] c"CFF\00"
@.str.5 = [8 x i8] c"BFF\00"
@.str.6 = [8 x i8] c"AFF\00"
@.str.7 = [8 x i8] c"FF\00"
@.str.8 = [8 x i8] c"FF\00"
@.str.9 = [8 x i8] c"FF\00"
@.str.10 = [8 x i8] c"FF\00"
@.str.11 = [8 x i8] c"A5FF\00"
@.str.12 = [8 x i8] c"B4FF\00"
@.str.13 = [8 x i8] c"C3FF\00"
@.str.14 = [8 x i8] c"D2FF\00"
@.str.15 = [8 x i8] c"E1FF\00"
@.str.16 = [8 x i8] c"F0FF\00"
@.str.17 = [8 x i8] c"FFF0\00"
@.str.18 = [8 x i8] c"FFE1\00"
@.str.19 = [8 x i8] c"FFD2\00"
@.str.20 = [8 x i8] c"FFC3\00"
@.str.21 = [8 x i8] c"FFB4\00"
@.str.22 = [8 x i8] c"FFA5\00"
@.str.23 = [8 x i8] c"FF96\00"
@.str.24 = [8 x i8] c"FF87\00"
@.str.25 = [8 x i8] c"FF78\00"
@.str.26 = [8 x i8] c"FF69\00"
@.str.27 = [8 x i8] c"FF5A\00"
@.str.28 = [8 x i8] c"FF4B\00"
@.str.29 = [8 x i8] c"FF3C\00"
@.str.30 = [8 x i8] c"FF2D\00"
@.str.31 = [8 x i8] c"FF1E\00"
@.str.32 = [8 x i8] c"FF0F\00"
@.str.33 = [8 x i8] c"FFF00\00"
@.str.34 = [8 x i8] c"EFF00\00"
@.str.35 = [8 x i8] c"DFF00\00"
@.str.36 = [8 x i8] c"CFF00\00"
@.str.37 = [8 x i8] c"BFF00\00"
@.str.38 = [8 x i8] c"AFF00\00"
@.str.39 = [8 x i8] c"FF00\00"
@.str.40 = [8 x i8] c"FF00\00"
@.str.41 = [8 x i8] c"FF00\00"
@.str.42 = [8 x i8] c"FF00\00"
@.str.43 = [8 x i8] c"#A5FF00\00"
@.str.44 = [8 x i8] c"#B4FF00\00"
@.str.45 = [8 x i8] c"#C3FF00\00"
@.str.46 = [8 x i8] c"#D2FF00\00"
@.str.47 = [8 x i8] c"#E1FF00\00"
@.str.48 = [8 x i8] c"#F0FF00\00"
@.str.49 = [8 x i8] c"#FFF000\00"
@.str.50 = [8 x i8] c"#FFE100\00"
@.str.51 = [8 x i8] c"#FFD200\00"
@.str.52 = [8 x i8] c"#FFC300\00"
@.str.53 = [8 x i8] c"#FFB400\00"
@.str.54 = [8 x i8] c"#FFA500\00"
@.str.55 = [8 x i8] c"#FF9600\00"
@.str.56 = [8 x i8] c"#FF8700\00"
@.str.57 = [8 x i8] c"#FF7800\00"
@.str.58 = [8 x i8] c"#FF6900\00"
@.str.59 = [8 x i8] c"#FF5A00\00"
@.str.60 = [8 x i8] c"#FF4B00\00"
@.str.61 = [8 x i8] c"#FF3C00\00"
@.str.62 = [8 x i8] c"#FF2D00\00"
@.str.63 = [8 x i8] c"#FF1E00\00"
@.str.64 = [8 x i8] c"#FF0F00\00"
@__const.make_heatmap_html.gradient_iris = [65 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.33, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.39, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.40, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.41, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.42, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.43, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.44, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.45, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.46, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.47, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.48, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.49, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.50, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.51, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.52, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.53, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.54, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.55, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.56, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.57, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.58, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.59, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.60, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.61, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.62, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.63, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.64, i32 0, i32 0)]
@DBL_MAX = global double 0.000000e+00
@DBL_MIN = global double 0.000000e+00
@.str.65 = [14 x i8] c"heatmap1.html\00"
@.str.66 = [2 x i8] c"w\00"
@.str.67 = [21 x i8] c"Error opening file!\0A\00"
@.str.68 = [17 x i8] c"<!DOCTYPE html>\0A\00"
@.str.69 = [18 x i8] c"<html lang=\22en\22>\0A\00"
@.str.70 = [8 x i8] c"<head>\0A\00"
@.str.71 = [25 x i8] c"<meta charset=\22UTF-8\22/>\0A\00"
@.str.72 = [24 x i8] c"<title>Heatmap</title>\0A\00"
@.str.73 = [9 x i8] c"</head>\0A\00"
@.str.74 = [31 x i8] c"<body style=\22font-size:%ipx\22>\0A\00"
@.str.75 = [49 x i8] c"<h1 align=\22center\22>Heatmap 384 Well Plates</h1>\0A\00"
@.str.76 = [89 x i8] c"<table align=\22center\22 style=\22border-collapse:collapse;\22><caption>Score %i</caption><tr>\0A\00"
@.str.77 = [28 x i8] c"<td bgcolor=\22%s\22>%.*f</td>\0A\00"
@.str.78 = [14 x i8] c"</tr></table>\00"
@.str.79 = [107 x i8] c"<table align=\22center\22 bgcolor=\22silver\22 style=\22margin-bottom:40pt\22><caption>Plate %i</caption><thead><tr>\0A\00"
@.str.80 = [45 x i8] c"<th scope=\22rowgroup\22 bgcolor=\22silver\22></th>\0A\00"
@.str.81 = [42 x i8] c"<th scope=\22col\22 bgcolor=\22silver\22>%i</th>\0A\00"
@.str.82 = [22 x i8] c"</tr></thead><tbody>\0A\00"
@.str.83 = [6 x i8] c"<tr>\0A\00"
@.str.84 = [42 x i8] c"<th scope=\22row\22 bgcolor=\22silver\22>%i</th>\0A\00"
@.str.85 = [7 x i8] c"</tr>\0A\00"
@.str.86 = [18 x i8] c"</tbody></table>\0A\00"
@.str.87 = [9 x i8] c"</body>\0A\00"
@.str.88 = [9 x i8] c"</html>\0A\00"
@.str.89 = [29 x i8] c"heatmap1.html file created.\0A\00"
define void @make_heatmap_html(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca [65 x i8*]
%19 = alloca i8*
%20 = alloca i64
%21 = alloca i64
%22 = alloca double
%23 = alloca double
%24 = alloca i32*
%25 = alloca i32
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
store double* %0, double** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
%30 = bitcast [65 x i8*]* %18 to i8*
%31 = load i32, i32* %12
%32 = zext i32 %31 to i64
%33 = call i8* @llvm.stacksave()
store i8* %33, i8** %19
%34 = alloca double, i64 %32
store i64 %32, i64* %20
%35 = load i32, i32* %12
%36 = zext i32 %35 to i64
%37 = alloca double, i64 %36
store i64 %36, i64* %21
store i32 0, i32* %15
br label %38
38: ; preds = %106, %7
%39 = load i32, i32* %15
%40 = load i32, i32* %12
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %109
42: ; preds = %38
%43 = load double, double* @DBL_MAX
store double %43, double* %23
%44 = load double, double* @DBL_MIN
store double %44, double* %22
store i32 0, i32* %16
br label %45
45: ; preds = %94, %42
%46 = load i32, i32* %16
%47 = load i32, i32* %11
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %97
49: ; preds = %45
%50 = load double, double* %22
%51 = load double*, double** %8
%52 = load i32, i32* %15
%53 = load i32, i32* %11
%54 = mul nsw i32 %52, %53
%55 = load i32, i32* %16
%56 = add nsw i32 %54, %55
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %51, i64 %57
%59 = load double, double* %58
%60 = fcmp olt double %50, %59
br i1 %60, label %61, label %71
61: ; preds = %49
%62 = load double*, double** %8
%63 = load i32, i32* %15
%64 = load i32, i32* %11
%65 = mul nsw i32 %63, %64
%66 = load i32, i32* %16
%67 = add nsw i32 %65, %66
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %62, i64 %68
%70 = load double, double* %69
store double %70, double* %22
br label %71
71: ; preds = %61, %49
%72 = load double, double* %23
%73 = load double*, double** %8
%74 = load i32, i32* %15
%75 = load i32, i32* %11
%76 = mul nsw i32 %74, %75
%77 = load i32, i32* %16
%78 = add nsw i32 %76, %77
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double, double* %73, i64 %79
%81 = load double, double* %80
%82 = fcmp ogt double %72, %81
br i1 %82, label %83, label %93
83: ; preds = %71
%84 = load double*, double** %8
%85 = load i32, i32* %15
%86 = load i32, i32* %11
%87 = mul nsw i32 %85, %86
%88 = load i32, i32* %16
%89 = add nsw i32 %87, %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %84, i64 %90
%92 = load double, double* %91
store double %92, double* %23
br label %93
93: ; preds = %83, %71
br label %94
94: ; preds = %93
%95 = load i32, i32* %16
%96 = add nsw i32 %95, 1
store i32 %96, i32* %16
br label %45
97: ; preds = %45
%98 = load double, double* %22
%99 = load i32, i32* %15
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %34, i64 %100
store double %98, double* %101
%102 = load double, double* %23
%103 = load i32, i32* %15
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %37, i64 %104
store double %102, double* %105
br label %106
106: ; preds = %97
%107 = load i32, i32* %15
%108 = add nsw i32 %107, 1
store i32 %108, i32* %15
br label %38
109: ; preds = %38
%110 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.65, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.66, i64 0, i64 0))
store i32* %110, i32** %24
%111 = load i32*, i32** %24
%112 = icmp eq i32* %111, null
br i1 %112, label %113, label %115
113: ; preds = %109
%114 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.67, i64 0, i64 0))
br label %115
115: ; preds = %113, %109
%116 = load i32*, i32** %24
%117 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.68, i64 0, i64 0))
%118 = load i32*, i32** %24
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.69, i64 0, i64 0))
%120 = load i32*, i32** %24
%121 = call i32 (i32*, i8*, ...) @fprintf(i32* %120, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.70, i64 0, i64 0))
%122 = load i32*, i32** %24
%123 = call i32 (i32*, i8*, ...) @fprintf(i32* %122, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.71, i64 0, i64 0))
%124 = load i32*, i32** %24
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %124, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.72, i64 0, i64 0))
%126 = load i32*, i32** %24
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %126, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.73, i64 0, i64 0))
%128 = load i32*, i32** %24
%129 = load i32, i32* %14
%130 = call i32 (i32*, i8*, ...) @fprintf(i32* %128, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.74, i64 0, i64 0), i32 %129)
%131 = load i32*, i32** %24
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.75, i64 0, i64 0))
store i32 0, i32* %25
store double 0.000000e+00, double* %26
store double 0.000000e+00, double* %27
store double 0.000000e+00, double* %28
store double 0.000000e+00, double* %29
store i32 0, i32* %15
br label %133
133: ; preds = %303, %115
%134 = load i32, i32* %15
%135 = load i32, i32* %12
%136 = icmp slt i32 %134, %135
br i1 %136, label %137, label %306
137: ; preds = %133
%138 = load i32*, i32** %24
%139 = load i32, i32* %15
%140 = add nsw i32 %139, 1
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %138, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.76, i64 0, i64 0), i32 %140)
store i32 0, i32* %16
br label %142
142: ; preds = %198, %137
%143 = load i32, i32* %16
%144 = icmp slt i32 %143, 8
br i1 %144, label %145, label %201
145: ; preds = %142
%146 = load i32, i32* %15
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds double, double* %34, i64 %147
%149 = load double, double* %148
%150 = load i32, i32* %15
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %37, i64 %151
%153 = load double, double* %152
%154 = fsub double %149, %153
store double %154, double* %26
%155 = load i32, i32* %15
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds double, double* %37, i64 %156
%158 = load double, double* %157
%159 = load i32, i32* %16
%160 = sitofp i32 %159 to double
%161 = load double, double* %26
%162 = fdiv double %161, 7.000000e+00
%163 = call double @llvm.fmuladd.f64(double %160, double %162, double %158)
store double %163, double* %27
%164 = load double, double* %27
%165 = load i32, i32* %15
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %37, i64 %166
%168 = load double, double* %167
%169 = fsub double %164, %168
%170 = load i32, i32* %15
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds double, double* %34, i64 %171
%173 = load double, double* %172
%174 = load i32, i32* %15
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double, double* %37, i64 %175
%177 = load double, double* %176
%178 = fsub double %173, %177
%179 = fdiv double %169, %178
%180 = fmul double %179, 6.400000e+01
store double %180, double* %28
%181 = load double, double* %28
%182 = fcmp ogt double %181, 6.400000e+01
br i1 %182, label %183, label %184
183: ; preds = %145
store double 6.400000e+01, double* %28
br label %184
184: ; preds = %183, %145
%185 = load double, double* %28
%186 = fcmp olt double %185, 0.000000e+00
br i1 %186, label %187, label %188
187: ; preds = %184
store double 0.000000e+00, double* %28
br label %188
188: ; preds = %187, %184
%189 = load i32*, i32** %24
%190 = load double, double* %28
%191 = fptosi double %190 to i32
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds [65 x i8*], [65 x i8*]* %18, i64 0, i64 %192
%194 = load i8*, i8** %193
%195 = load i32, i32* %13
%196 = load double, double* %27
%197 = call i32 (i32*, i8*, ...) @fprintf(i32* %189, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.77, i64 0, i64 0), i8* %194, i32 %195, double %196)
br label %198
198: ; preds = %188
%199 = load i32, i32* %16
%200 = add nsw i32 %199, 1
store i32 %200, i32* %16
br label %142
201: ; preds = %142
%202 = load i32*, i32** %24
%203 = call i32 (i32*, i8*, ...) @fprintf(i32* %202, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.78, i64 0, i64 0))
%204 = load i32*, i32** %24
%205 = load i32, i32* %15
%206 = add nsw i32 %205, 1
%207 = call i32 (i32*, i8*, ...) @fprintf(i32* %204, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.79, i64 0, i64 0), i32 %206)
%208 = load i32*, i32** %24
%209 = call i32 (i32*, i8*, ...) @fprintf(i32* %208, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.80, i64 0, i64 0))
store i32 0, i32* %16
br label %210
210: ; preds = %220, %201
%211 = load i32, i32* %16
%212 = load i32, i32* %10
%213 = sub nsw i32 %212, 1
%214 = icmp slt i32 %211, %213
br i1 %214, label %215, label %223
215: ; preds = %210
%216 = load i32*, i32** %24
%217 = load i32, i32* %16
%218 = add nsw i32 %217, 1
%219 = call i32 (i32*, i8*, ...) @fprintf(i32* %216, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.81, i64 0, i64 0), i32 %218)
br label %220
220: ; preds = %215
%221 = load i32, i32* %16
%222 = add nsw i32 %221, 1
store i32 %222, i32* %16
br label %210
223: ; preds = %210
%224 = load i32*, i32** %24
%225 = call i32 (i32*, i8*, ...) @fprintf(i32* %224, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.82, i64 0, i64 0))
store i32 0, i32* %16
br label %226
226: ; preds = %297, %223
%227 = load i32, i32* %16
%228 = load i32, i32* %9
%229 = icmp slt i32 %227, %228
br i1 %229, label %230, label %300
230: ; preds = %226
%231 = load i32*, i32** %24
%232 = call i32 (i32*, i8*, ...) @fprintf(i32* %231, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.83, i64 0, i64 0))
store i32 0, i32* %17
br label %233
233: ; preds = %291, %230
%234 = load i32, i32* %17
%235 = load i32, i32* %10
%236 = icmp slt i32 %234, %235
br i1 %236, label %237, label %294
237: ; preds = %233
%238 = load i32, i32* %17
%239 = icmp eq i32 %238, 0
br i1 %239, label %240, label %245
240: ; preds = %237
%241 = load i32*, i32** %24
%242 = load i32, i32* %16
%243 = add nsw i32 %242, 1
%244 = call i32 (i32*, i8*, ...) @fprintf(i32* %241, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.84, i64 0, i64 0), i32 %243)
br label %290
245: ; preds = %237
%246 = load double*, double** %8
%247 = load i32, i32* %25
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds double, double* %246, i64 %248
%250 = load double, double* %249
%251 = load i32, i32* %15
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds double, double* %37, i64 %252
%254 = load double, double* %253
%255 = fsub double %250, %254
%256 = load i32, i32* %15
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds double, double* %34, i64 %257
%259 = load double, double* %258
%260 = load i32, i32* %15
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %37, i64 %261
%263 = load double, double* %262
%264 = fsub double %259, %263
%265 = fdiv double %255, %264
%266 = fmul double %265, 6.400000e+01
store double %266, double* %29
%267 = load double, double* %29
%268 = fcmp ogt double %267, 6.400000e+01
br i1 %268, label %269, label %270
269: ; preds = %245
store double 6.400000e+01, double* %29
br label %270
270: ; preds = %269, %245
%271 = load double, double* %29
%272 = fcmp olt double %271, 0.000000e+00
br i1 %272, label %273, label %274
273: ; preds = %270
store double 0.000000e+00, double* %29
br label %274
274: ; preds = %273, %270
%275 = load i32*, i32** %24
%276 = load double, double* %29
%277 = fptosi double %276 to i32
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [65 x i8*], [65 x i8*]* %18, i64 0, i64 %278
%280 = load i8*, i8** %279
%281 = load i32, i32* %13
%282 = load double*, double** %8
%283 = load i32, i32* %25
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds double, double* %282, i64 %284
%286 = load double, double* %285
%287 = call i32 (i32*, i8*, ...) @fprintf(i32* %275, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.77, i64 0, i64 0), i8* %280, i32 %281, double %286)
%288 = load i32, i32* %25
%289 = add nsw i32 %288, 1
store i32 %289, i32* %25
br label %290
290: ; preds = %274, %240
br label %291
291: ; preds = %290
%292 = load i32, i32* %17
%293 = add nsw i32 %292, 1
store i32 %293, i32* %17
br label %233
294: ; preds = %233
%295 = load i32*, i32** %24
%296 = call i32 (i32*, i8*, ...) @fprintf(i32* %295, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.85, i64 0, i64 0))
br label %297
297: ; preds = %294
%298 = load i32, i32* %16
%299 = add nsw i32 %298, 1
store i32 %299, i32* %16
br label %226
300: ; preds = %226
%301 = load i32*, i32** %24
%302 = call i32 (i32*, i8*, ...) @fprintf(i32* %301, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.86, i64 0, i64 0))
br label %303
303: ; preds = %300
%304 = load i32, i32* %15
%305 = add nsw i32 %304, 1
store i32 %305, i32* %15
br label %133
306: ; preds = %133
%307 = load i32*, i32** %24
%308 = call i32 (i32*, i8*, ...) @fprintf(i32* %307, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.87, i64 0, i64 0))
%309 = load i32*, i32** %24
%310 = call i32 (i32*, i8*, ...) @fprintf(i32* %309, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.88, i64 0, i64 0))
%311 = load i32*, i32** %24
%312 = call i32 @fclose(i32* %311)
%313 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.89, i64 0, i64 0))
%314 = load i8*, i8** %19
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"FF\00"
@.str.1 = [8 x i8] c"FFF\00"
@.str.2 = [8 x i8] c"EFF\00"
@.str.3 = [8 x i8] c"DFF\00"
@.str.4 = [8 x i8] c"CFF\00"
@.str.5 = [8 x i8] c"BFF\00"
@.str.6 = [8 x i8] c"AFF\00"
@.str.7 = [8 x i8] c"FF\00"
@.str.8 = [8 x i8] c"FF\00"
@.str.9 = [8 x i8] c"FF\00"
@.str.10 = [8 x i8] c"FF\00"
@.str.11 = [8 x i8] c"A5FF\00"
@.str.12 = [8 x i8] c"B4FF\00"
@.str.13 = [8 x i8] c"C3FF\00"
@.str.14 = [8 x i8] c"D2FF\00"
@.str.15 = [8 x i8] c"E1FF\00"
@.str.16 = [8 x i8] c"F0FF\00"
@.str.17 = [8 x i8] c"FFF0\00"
@.str.18 = [8 x i8] c"FFE1\00"
@.str.19 = [8 x i8] c"FFD2\00"
@.str.20 = [8 x i8] c"FFC3\00"
@.str.21 = [8 x i8] c"FFB4\00"
@.str.22 = [8 x i8] c"FFA5\00"
@.str.23 = [8 x i8] c"FF96\00"
@.str.24 = [8 x i8] c"FF87\00"
@.str.25 = [8 x i8] c"FF78\00"
@.str.26 = [8 x i8] c"FF69\00"
@.str.27 = [8 x i8] c"FF5A\00"
@.str.28 = [8 x i8] c"FF4B\00"
@.str.29 = [8 x i8] c"FF3C\00"
@.str.30 = [8 x i8] c"FF2D\00"
@.str.31 = [8 x i8] c"FF1E\00"
@.str.32 = [8 x i8] c"FF0F\00"
@.str.33 = [8 x i8] c"FFF00\00"
@.str.34 = [8 x i8] c"EFF00\00"
@.str.35 = [8 x i8] c"DFF00\00"
@.str.36 = [8 x i8] c"CFF00\00"
@.str.37 = [8 x i8] c"BFF00\00"
@.str.38 = [8 x i8] c"AFF00\00"
@.str.39 = [8 x i8] c"FF00\00"
@.str.40 = [8 x i8] c"FF00\00"
@.str.41 = [8 x i8] c"FF00\00"
@.str.42 = [8 x i8] c"FF00\00"
@.str.43 = [8 x i8] c"#A5FF00\00"
@.str.44 = [8 x i8] c"#B4FF00\00"
@.str.45 = [8 x i8] c"#C3FF00\00"
@.str.46 = [8 x i8] c"#D2FF00\00"
@.str.47 = [8 x i8] c"#E1FF00\00"
@.str.48 = [8 x i8] c"#F0FF00\00"
@.str.49 = [8 x i8] c"#FFF000\00"
@.str.50 = [8 x i8] c"#FFE100\00"
@.str.51 = [8 x i8] c"#FFD200\00"
@.str.52 = [8 x i8] c"#FFC300\00"
@.str.53 = [8 x i8] c"#FFB400\00"
@.str.54 = [8 x i8] c"#FFA500\00"
@.str.55 = [8 x i8] c"#FF9600\00"
@.str.56 = [8 x i8] c"#FF8700\00"
@.str.57 = [8 x i8] c"#FF7800\00"
@.str.58 = [8 x i8] c"#FF6900\00"
@.str.59 = [8 x i8] c"#FF5A00\00"
@.str.60 = [8 x i8] c"#FF4B00\00"
@.str.61 = [8 x i8] c"#FF3C00\00"
@.str.62 = [8 x i8] c"#FF2D00\00"
@.str.63 = [8 x i8] c"#FF1E00\00"
@.str.64 = [8 x i8] c"#FF0F00\00"
@__const.make_heatmap_html.gradient_iris = [65 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.33, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.39, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.40, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.41, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.42, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.43, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.44, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.45, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.46, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.47, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.48, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.49, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.50, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.51, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.52, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.53, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.54, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.55, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.56, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.57, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.58, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.59, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.60, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.61, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.62, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.63, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.64, i32 0, i32 0)]
@DBL_MAX = global double 0.000000e+00
@DBL_MIN = global double 0.000000e+00
@.str.65 = [14 x i8] c"heatmap1.html\00"
@.str.66 = [2 x i8] c"w\00"
@.str.68 = [17 x i8] c"<!DOCTYPE html>\0A\00"
@.str.69 = [18 x i8] c"<html lang=\22en\22>\0A\00"
@.str.70 = [8 x i8] c"<head>\0A\00"
@.str.71 = [25 x i8] c"<meta charset=\22UTF-8\22/>\0A\00"
@.str.72 = [24 x i8] c"<title>Heatmap</title>\0A\00"
@.str.73 = [9 x i8] c"</head>\0A\00"
@.str.74 = [31 x i8] c"<body style=\22font-size:%ipx\22>\0A\00"
@.str.75 = [49 x i8] c"<h1 align=\22center\22>Heatmap 384 Well Plates</h1>\0A\00"
@.str.76 = [89 x i8] c"<table align=\22center\22 style=\22border-collapse:collapse;\22><caption>Score %i</caption><tr>\0A\00"
@.str.77 = [28 x i8] c"<td bgcolor=\22%s\22>%.*f</td>\0A\00"
@.str.78 = [14 x i8] c"</tr></table>\00"
@.str.79 = [107 x i8] c"<table align=\22center\22 bgcolor=\22silver\22 style=\22margin-bottom:40pt\22><caption>Plate %i</caption><thead><tr>\0A\00"
@.str.80 = [45 x i8] c"<th scope=\22rowgroup\22 bgcolor=\22silver\22></th>\0A\00"
@.str.81 = [42 x i8] c"<th scope=\22col\22 bgcolor=\22silver\22>%i</th>\0A\00"
@.str.82 = [22 x i8] c"</tr></thead><tbody>\0A\00"
@.str.83 = [6 x i8] c"<tr>\0A\00"
@.str.84 = [42 x i8] c"<th scope=\22row\22 bgcolor=\22silver\22>%i</th>\0A\00"
@.str.85 = [7 x i8] c"</tr>\0A\00"
@.str.86 = [18 x i8] c"</tbody></table>\0A\00"
@.str.87 = [9 x i8] c"</body>\0A\00"
@.str.88 = [9 x i8] c"</html>\0A\00"
@str = [28 x i8] c"heatmap1.html file created.\00"
@str.90 = [20 x i8] c"Error opening file!\00"
define void @make_heatmap_html(double* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = zext i32 %4 to i64
%9 = alloca double, i64 %8
%10 = alloca double, i64 %8
%11 = icmp sgt i32 %4, 0
br i1 %11, label %12, label %70
12: ; preds = %7
%13 = load double, double* @DBL_MAX
%14 = load double, double* @DBL_MIN
%15 = icmp sgt i32 %3, 0
%16 = sext i32 %3 to i64
%17 = zext i32 %3 to i64
%18 = and i64 %17, 1
%19 = icmp eq i32 %3, 1
%20 = and i64 %17, 4294967294
%21 = icmp eq i64 %18, 0
br label %22
22: ; preds = %12, %63
%23 = phi i64 [ 0, %12 ], [ %68, %63 ]
br i1 %15, label %24, label %63
24: ; preds = %22
%25 = mul nsw i64 %23, %16
br i1 %19, label %49, label %26
26: ; preds = %24, %26
%27 = phi i64 [ %46, %26 ], [ 0, %24 ]
%28 = phi double [ %45, %26 ], [ %13, %24 ]
%29 = phi double [ %43, %26 ], [ %14, %24 ]
%30 = phi i64 [ %47, %26 ], [ 0, %24 ]
%31 = add nsw i64 %27, %25
%32 = getelementptr inbounds double, double* %0, i64 %31
%33 = load double, double* %32
%34 = fcmp olt double %29, %33
%35 = select i1 %34, double %33, double %29
%36 = fcmp ogt double %28, %33
%37 = select i1 %36, double %33, double %28
%38 = or i64 %27, 1
%39 = add nsw i64 %38, %25
%40 = getelementptr inbounds double, double* %0, i64 %39
%41 = load double, double* %40
%42 = fcmp olt double %35, %41
%43 = select i1 %42, double %41, double %35
%44 = fcmp ogt double %37, %41
%45 = select i1 %44, double %41, double %37
%46 = add nuw nsw i64 %27, 2
%47 = add i64 %30, 2
%48 = icmp eq i64 %47, %20
br i1 %48, label %49, label %26
49: ; preds = %26, %24
%50 = phi double [ undef, %24 ], [ %43, %26 ]
%51 = phi double [ undef, %24 ], [ %45, %26 ]
%52 = phi i64 [ 0, %24 ], [ %46, %26 ]
%53 = phi double [ %13, %24 ], [ %45, %26 ]
%54 = phi double [ %14, %24 ], [ %43, %26 ]
br i1 %21, label %63, label %55
55: ; preds = %49
%56 = add nsw i64 %52, %25
%57 = getelementptr inbounds double, double* %0, i64 %56
%58 = load double, double* %57
%59 = fcmp olt double %54, %58
%60 = select i1 %59, double %58, double %54
%61 = fcmp ogt double %53, %58
%62 = select i1 %61, double %58, double %53
br label %63
63: ; preds = %55, %49, %22
%64 = phi double [ %14, %22 ], [ %50, %49 ], [ %60, %55 ]
%65 = phi double [ %13, %22 ], [ %51, %49 ], [ %62, %55 ]
%66 = getelementptr inbounds double, double* %9, i64 %23
store double %64, double* %66
%67 = getelementptr inbounds double, double* %10, i64 %23
store double %65, double* %67
%68 = add nuw nsw i64 %23, 1
%69 = icmp eq i64 %68, %8
br i1 %69, label %70, label %22
70: ; preds = %63, %7
%71 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.65, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.66, i64 0, i64 0))
%72 = icmp eq i32* %71, null
br i1 %72, label %73, label %75
73: ; preds = %70
%74 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.90, i64 0, i64 0))
br label %75
75: ; preds = %73, %70
%76 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.68, i64 0, i64 0), i64 16, i64 1, i32* %71)
%77 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.69, i64 0, i64 0), i64 17, i64 1, i32* %71)
%78 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.70, i64 0, i64 0), i64 7, i64 1, i32* %71)
%79 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.71, i64 0, i64 0), i64 24, i64 1, i32* %71)
%80 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.72, i64 0, i64 0), i64 23, i64 1, i32* %71)
%81 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.73, i64 0, i64 0), i64 8, i64 1, i32* %71)
%82 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.74, i64 0, i64 0), i32 %6)
%83 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.75, i64 0, i64 0), i64 48, i64 1, i32* %71)
br i1 %11, label %84, label %167
84: ; preds = %75
%85 = add i32 %2, -1
%86 = icmp sgt i32 %2, 1
%87 = icmp sgt i32 %1, 0
%88 = icmp sgt i32 %2, 0
%89 = icmp eq i32 %2, 1
br label %90
90: ; preds = %84, %163
%91 = phi i64 [ 0, %84 ], [ %93, %163 ]
%92 = phi i32 [ 0, %84 ], [ %164, %163 ]
%93 = add nuw nsw i64 %91, 1
%94 = trunc i64 %93 to i32
%95 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.76, i64 0, i64 0), i32 %94)
%96 = getelementptr inbounds double, double* %9, i64 %91
%97 = load double, double* %96
%98 = getelementptr inbounds double, double* %10, i64 %91
%99 = load double, double* %98
%100 = fsub double %97, %99
%101 = fdiv double %100, 7.000000e+00
br label %102
102: ; preds = %90, %102
%103 = phi i32 [ 0, %90 ], [ %118, %102 ]
%104 = sitofp i32 %103 to double
%105 = tail call double @llvm.fmuladd.f64(double %104, double %101, double %99)
%106 = fsub double %105, %99
%107 = fdiv double %106, %100
%108 = fmul double %107, 6.400000e+01
%109 = fcmp ogt double %108, 6.400000e+01
%110 = select i1 %109, double 6.400000e+01, double %108
%111 = fcmp olt double %110, 0.000000e+00
%112 = select i1 %111, double 0.000000e+00, double %110
%113 = fptosi double %112 to i32
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [65 x i8*], [65 x i8*]* @__const.make_heatmap_html.gradient_iris, i64 0, i64 %114
%116 = load i8*, i8** %115
%117 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.77, i64 0, i64 0), i8* %116, i32 %5, double %105)
%118 = add nuw nsw i32 %103, 1
%119 = icmp eq i32 %118, 8
br i1 %119, label %120, label %102
120: ; preds = %102
%121 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.78, i64 0, i64 0), i64 13, i64 1, i32* %71)
%122 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.79, i64 0, i64 0), i32 %94)
%123 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.80, i64 0, i64 0), i64 44, i64 1, i32* %71)
br i1 %86, label %124, label %129
124: ; preds = %120, %124
%125 = phi i32 [ %126, %124 ], [ 0, %120 ]
%126 = add nuw nsw i32 %125, 1
%127 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.81, i64 0, i64 0), i32 %126)
%128 = icmp eq i32 %126, %85
br i1 %128, label %129, label %124
129: ; preds = %124, %120
%130 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.82, i64 0, i64 0), i64 21, i64 1, i32* %71)
br i1 %87, label %131, label %163
131: ; preds = %129, %159
%132 = phi i32 [ %160, %159 ], [ %92, %129 ]
%133 = phi i32 [ %135, %159 ], [ 0, %129 ]
%134 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.83, i64 0, i64 0), i64 5, i64 1, i32* %71)
%135 = add nuw nsw i32 %133, 1
br i1 %88, label %136, label %159
136: ; preds = %131
%137 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.84, i64 0, i64 0), i32 %135)
br i1 %89, label %159, label %138
138: ; preds = %136, %138
%139 = phi i32 [ %156, %138 ], [ %132, %136 ]
%140 = phi i32 [ %157, %138 ], [ 1, %136 ]
%141 = sext i32 %139 to i64
%142 = getelementptr inbounds double, double* %0, i64 %141
%143 = load double, double* %142
%144 = fsub double %143, %99
%145 = fdiv double %144, %100
%146 = fmul double %145, 6.400000e+01
%147 = fcmp ogt double %146, 6.400000e+01
%148 = select i1 %147, double 6.400000e+01, double %146
%149 = fcmp olt double %148, 0.000000e+00
%150 = select i1 %149, double 0.000000e+00, double %148
%151 = fptosi double %150 to i32
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [65 x i8*], [65 x i8*]* @__const.make_heatmap_html.gradient_iris, i64 0, i64 %152
%154 = load i8*, i8** %153
%155 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %71, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.77, i64 0, i64 0), i8* %154, i32 %5, double %143)
%156 = add nsw i32 %139, 1
%157 = add nuw nsw i32 %140, 1
%158 = icmp eq i32 %157, %2
br i1 %158, label %159, label %138
159: ; preds = %138, %131, %136
%160 = phi i32 [ %132, %136 ], [ %132, %131 ], [ %156, %138 ]
%161 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.85, i64 0, i64 0), i64 6, i64 1, i32* %71)
%162 = icmp eq i32 %135, %1
br i1 %162, label %163, label %131
163: ; preds = %159, %129
%164 = phi i32 [ %92, %129 ], [ %160, %159 ]
%165 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.86, i64 0, i64 0), i64 17, i64 1, i32* %71)
%166 = icmp eq i64 %93, %8
br i1 %166, label %167, label %90
167: ; preds = %163, %75
%168 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.87, i64 0, i64 0), i64 8, i64 1, i32* %71)
%169 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.88, i64 0, i64 0), i64 8, i64 1, i32* %71)
%170 = tail call i32 @fclose(i32* %71)
%171 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}