#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*/ printf(char *, double, double, double);
main() {
  double q[3] = {0, 0, 0};
  double M[3 * 3] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
  printf("-> %lf %lf %lf \n", M[0], M[1], M[2]);
  printf("-> %lf %lf %lf \n", M[3], M[4], M[5]);
  printf("-> %lf %lf %lf \n\n", M[6], M[7], M[8]);
  printf("-> %lf %lf %lf \n", M[0, 0], M[0, 1], M[0, 2]);
  printf("-> %lf %lf %lf \n", M[1, 0], M[1, 1], M[1, 2]);
  printf("-> %lf %lf %lf \n\n", M[2, 0], M[2, 1], M[2, 2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1040 <memset@plt>
lea    -0x70(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x48,%edx
call   1050 <memcpy@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xf2d(%rip),%rbx
movsd  0xedd(%rip),%xmm0
movsd  0xedd(%rip),%xmm1
movsd  0xedd(%rip),%xmm2
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xed5(%rip),%xmm0
movsd  0xed5(%rip),%xmm1
movsd  0xed5(%rip),%xmm2
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xef7(%rip),%r14
movsd  0xec6(%rip),%xmm0
movsd  0xec6(%rip),%xmm1
movsd  0xec6(%rip),%xmm2
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
movsd  0xe73(%rip),%xmm0
movsd  0xe73(%rip),%xmm1
movsd  0xe73(%rip),%xmm2
call   1030 <printf@plt>
mov    %rbx,%rdi
movsd  0xe53(%rip),%xmm0
movsd  0xe53(%rip),%xmm1
movsd  0xe53(%rip),%xmm2
call   1030 <printf@plt>
mov    %r14,%rdi
movsd  0xe33(%rip),%xmm0
movsd  0xe33(%rip),%xmm1
movsd  0xe33(%rip),%xmm2
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.M = [9 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00, double 9.000000e+00]
@.str = [17 x i8] c"-> %lf %lf %lf \0A\00"
@.str.1 = [18 x i8] c"-> %lf %lf %lf \0A\0A\00"
define i32 @main() {
%1 = alloca [3 x double]
%2 = alloca [9 x double]
%3 = bitcast [3 x double]* %1 to i8*
%4 = bitcast [9 x double]* %2 to i8*
%5 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 0
%6 = load double, double* %5
%7 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 2
%10 = load double, double* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %6, double %8, double %10)
%12 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 3
%13 = load double, double* %12
%14 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 4
%15 = load double, double* %14
%16 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 5
%17 = load double, double* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %13, double %15, double %17)
%19 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 6
%20 = load double, double* %19
%21 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 7
%22 = load double, double* %21
%23 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 8
%24 = load double, double* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %20, double %22, double %24)
%26 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 0
%27 = load double, double* %26
%28 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 1
%29 = load double, double* %28
%30 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 2
%31 = load double, double* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %27, double %29, double %31)
%33 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 0
%34 = load double, double* %33
%35 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 1
%36 = load double, double* %35
%37 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 2
%38 = load double, double* %37
%39 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %34, double %36, double %38)
%40 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 0
%41 = load double, double* %40
%42 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 1
%43 = load double, double* %42
%44 = getelementptr inbounds [9 x double], [9 x double]* %2, i64 0, i64 2
%45 = load double, double* %44
%46 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %41, double %43, double %45)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"-> %lf %lf %lf \0A\00"
@.str.1 = [18 x i8] c"-> %lf %lf %lf \0A\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double 4.000000e+00, double 5.000000e+00, double 6.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double 7.000000e+00, double 8.000000e+00, double 9.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, double 2.000000e+00, double 3.000000e+00)
ret i32 0
}