#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ make_heatmap_html(double *, int, int, int, int, int, int);
void test_sequence() {
  int i = 0;
  double test_data[768];
  int rows = 16;
  int columns = 24 + 1;
  int plate_size = 384;
  int plates = 2;
  int precision = 1;
  int font_size = 10;
  for (i = 0; i < 768; i++) {
    test_data[i] = (double)i;
  }
  make_heatmap_html(test_data, rows, columns, plate_size, plates, precision,
                    font_size);
}


x86 assembly (clang, -O0):
<test_sequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1830,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x10,-0x1814(%rbp)
movl   $0x19,-0x1818(%rbp)
movl   $0x180,-0x181c(%rbp)
movl   $0x2,-0x1820(%rbp)
movl   $0x1,-0x1824(%rbp)
movl   $0xa,-0x1828(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x300,-0x4(%rbp)
jge    1192 <test_sequence+0x82>
cvtsi2sdl -0x4(%rbp),%xmm0
movslq -0x4(%rbp),%rax
movsd  %xmm0,-0x1810(%rbp,%rax,8)
ff ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <test_sequence+0x55>
lea    -0x1810(%rbp),%rdi
mov    -0x1814(%rbp),%esi
mov    -0x1818(%rbp),%edx
mov    -0x181c(%rbp),%ecx
mov    -0x1820(%rbp),%r8d
mov    -0x1824(%rbp),%r9d
mov    -0x1828(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <make_heatmap_html@plt>
add    $0x1830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sequence>:
sub    $0x1818,%rsp
movdqa 0xee1(%rip),%xmm0
mov    $0xa,%eax
movdqa 0xee3(%rip),%xmm8
movdqa 0xeeb(%rip),%xmm2
movdqa 0xef3(%rip),%xmm3
movdqa 0xefb(%rip),%xmm4
movdqa 0xf03(%rip),%xmm5
movdqa 0xf0b(%rip),%xmm6
cs nopw 0x0(%rax,%rax,1)
nop
movdqa %xmm0,%xmm7
cvtdq2pd %xmm0,%xmm1
paddd  %xmm8,%xmm7
cvtdq2pd %xmm7,%xmm7
movaps %xmm1,-0x40(%rsp,%rax,8)
movaps %xmm7,-0x30(%rsp,%rax,8)
movdqa %xmm0,%xmm1
paddd  %xmm2,%xmm1
movdqa %xmm0,%xmm7
cvtdq2pd %xmm1,%xmm1
paddd  %xmm3,%xmm7
cvtdq2pd %xmm7,%xmm7
movaps %xmm1,-0x20(%rsp,%rax,8)
movaps %xmm7,-0x10(%rsp,%rax,8)
movdqa %xmm0,%xmm1
paddd  %xmm4,%xmm1
movdqa %xmm0,%xmm7
cvtdq2pd %xmm1,%xmm1
paddd  %xmm5,%xmm7
cvtdq2pd %xmm7,%xmm7
movaps %xmm1,(%rsp,%rax,8)
movaps %xmm7,0x10(%rsp,%rax,8)
paddd  %xmm6,%xmm0
add    $0xc,%rax
cmp    $0x30a,%rax
jne    1160 <test_sequence+0x50>
movl   $0xa,(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x10,%esi
mov    $0x19,%edx
mov    $0x180,%ecx
mov    $0x2,%r8d
mov    $0x1,%r9d
call   1030 <make_heatmap_html@plt>
add    $0x1818,%rsp
ret

LLVM IR (-O0):
define void @test_sequence() {
%1 = alloca i32
%2 = alloca [768 x double]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 16, i32* %3
store i32 25, i32* %4
store i32 384, i32* %5
store i32 2, i32* %6
store i32 1, i32* %7
store i32 10, i32* %8
store i32 0, i32* %1
br label %9
9: ; preds = %18, %0
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 768
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i32, i32* %1
%14 = sitofp i32 %13 to double
%15 = load i32, i32* %1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [768 x double], [768 x double]* %2, i64 0, i64 %16
store double %14, double* %17
br label %18
18: ; preds = %12
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %9
21: ; preds = %9
%22 = getelementptr inbounds [768 x double], [768 x double]* %2, i64 0, i64 0
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = load i32, i32* %6
%27 = load i32, i32* %7
%28 = load i32, i32* %8
%29 = call i32 @make_heatmap_html(double* %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %28)
ret void
}

LLVM IR (-O2):
define void @test_sequence() {
%1 = alloca [768 x double]
%2 = bitcast [768 x double]* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = phi i64 [ 0, %0 ], [ %31, %3 ]
%5 = phi <2 x i32> [ <i32 0, i32 1>, %0 ], [ %32, %3 ]
%6 = add <2 x i32> %5, <i32 2, i32 2>
%7 = sitofp <2 x i32> %5 to <2 x double>
%8 = sitofp <2 x i32> %6 to <2 x double>
%9 = getelementptr inbounds [768 x double], [768 x double]* %1, i64 0, i64 %4
%10 = bitcast double* %9 to <2 x double>*
store <2 x double> %7, <2 x double>* %10
%11 = getelementptr inbounds double, double* %9, i64 2
%12 = bitcast double* %11 to <2 x double>*
store <2 x double> %8, <2 x double>* %12
%13 = add nuw nsw i64 %4, 4
%14 = add <2 x i32> %5, <i32 4, i32 4>
%15 = add <2 x i32> %5, <i32 6, i32 6>
%16 = sitofp <2 x i32> %14 to <2 x double>
%17 = sitofp <2 x i32> %15 to <2 x double>
%18 = getelementptr inbounds [768 x double], [768 x double]* %1, i64 0, i64 %13
%19 = bitcast double* %18 to <2 x double>*
store <2 x double> %16, <2 x double>* %19
%20 = getelementptr inbounds double, double* %18, i64 2
%21 = bitcast double* %20 to <2 x double>*
store <2 x double> %17, <2 x double>* %21
%22 = add nuw nsw i64 %4, 8
%23 = add <2 x i32> %5, <i32 8, i32 8>
%24 = add <2 x i32> %5, <i32 10, i32 10>
%25 = sitofp <2 x i32> %23 to <2 x double>
%26 = sitofp <2 x i32> %24 to <2 x double>
%27 = getelementptr inbounds [768 x double], [768 x double]* %1, i64 0, i64 %22
%28 = bitcast double* %27 to <2 x double>*
store <2 x double> %25, <2 x double>* %28
%29 = getelementptr inbounds double, double* %27, i64 2
%30 = bitcast double* %29 to <2 x double>*
store <2 x double> %26, <2 x double>* %30
%31 = add nuw nsw i64 %4, 12
%32 = add <2 x i32> %5, <i32 12, i32 12>
%33 = icmp eq i64 %31, 768
br i1 %33, label %34, label %3
34: ; preds = %3
%35 = getelementptr inbounds [768 x double], [768 x double]* %1, i64 0, i64 0
%36 = call i32 @make_heatmap_html(double* %35, i32 16, i32 25, i32 384, i32 2, i32 1, i32 10)
ret void
}