#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*/ call_f77blas(double *, int, double *);
int /*<<< orphan*/ printf(char *, double);
int main(const int argc, const char **argv) {
  double matrix[9], oACML[9], oCLAPACK[9];
  matrix[0] = 8.3;
  matrix[1] = 13;
  matrix[2] = 2301.2;
  matrix[3] = 0.213689;
  matrix[4] = 3.141592654;
  matrix[5] = 0;
  matrix[6] = 49;
  matrix[7] = 8.24;
  matrix[8] = -9.8;
  call_f77blas(matrix, 3, oCLAPACK);
  for (int i = 0; i < 9; ++i)
    printf("%d\n", oCLAPACK[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xef7(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe86(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe71(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe5c(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0x100(%rbp),%rdx
mov    $0x3,%esi
call   1030 <call_f77blas@plt>
movl   $0x0,-0x104(%rbp)
cmpl   $0x9,-0x104(%rbp)
jge    1205 <main+0xe5>
movslq -0x104(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm0
ff ff
lea    0xe54(%rip),%rdi
call   1040 <printf@plt>
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    11c8 <main+0xa8>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movsd  0xee8(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movabs $0xc02399999999999a,%rax
99 23 c0
mov    %rax,0x90(%rsp)
lea    0x50(%rsp),%rdi
mov    %rsp,%rdx
mov    $0x3,%esi
call   1030 <call_f77blas@plt>
movsd  (%rsp),%xmm0
lea    0xeac(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x20(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x28(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x30(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x38(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  0x40(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x double]
%7 = alloca [9 x double]
%8 = alloca [9 x double]
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
store double 8.300000e+00, double* %10
%11 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 1
store double 1.300000e+01, double* %11
%12 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 2
store double 2.301200e+03, double* %12
%13 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 3
store double 2.136890e-01, double* %13
%14 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 4
store double 0x400921FB54524550, double* %14
%15 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 5
store double 0.000000e+00, double* %15
%16 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 6
store double 4.900000e+01, double* %16
%17 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 7
store double 8.240000e+00, double* %17
%18 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 8
store double -9.800000e+00, double* %18
%19 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
%20 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 0
%21 = call i32 @call_f77blas(double* %19, i32 3, double* %20)
store i32 0, i32* %9
br label %22
22: ; preds = %31, %2
%23 = load i32, i32* %9
%24 = icmp slt i32 %23, 9
br i1 %24, label %25, label %34
25: ; preds = %22
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [9 x double], [9 x double]* %8, i64 0, i64 %27
%29 = load double, double* %28
%30 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %29)
br label %31
31: ; preds = %25
%32 = load i32, i32* %9
%33 = add nsw i32 %32, 1
store i32 %33, i32* %9
br label %22
34: ; preds = %22
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x double]
%4 = alloca [9 x double]
%5 = bitcast [9 x double]* %3 to i8*
%6 = bitcast [9 x double]* %4 to i8*
%7 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 0
%8 = bitcast [9 x double]* %3 to <2 x double>*
store <2 x double> <double 8.300000e+00, double 1.300000e+01>, <2 x double>* %8
%9 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 2
%10 = bitcast double* %9 to <2 x double>*
store <2 x double> <double 2.301200e+03, double 2.136890e-01>, <2 x double>* %10
%11 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 4
%12 = bitcast double* %11 to <2 x double>*
store <2 x double> <double 0x400921FB54524550, double 0.000000e+00>, <2 x double>* %12
%13 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 6
%14 = bitcast double* %13 to <2 x double>*
store <2 x double> <double 4.900000e+01, double 8.240000e+00>, <2 x double>* %14
%15 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 8
store double -9.800000e+00, double* %15
%16 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 0
%17 = call i32 @call_f77blas(double* %7, i32 3, double* %16)
%18 = load double, double* %16
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %18)
%20 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 1
%21 = load double, double* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %21)
%23 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 2
%24 = load double, double* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %24)
%26 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 3
%27 = load double, double* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %27)
%29 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 4
%30 = load double, double* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %30)
%32 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 5
%33 = load double, double* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %33)
%35 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 6
%36 = load double, double* %35
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %36)
%38 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 7
%39 = load double, double* %38
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %39)
%41 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 8
%42 = load double, double* %41
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %42)
ret i32 0
}