#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);
int main() {
  int fred[3] = {12, 34, 56};
  double joe[] = {23.4, 56.7, 89.0};
  printf("%d %d %d\n", fred[0], fred[1], fred[2]);
  printf("%f %f %f\n", joe[0], joe[1], joe[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x20(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm2
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf18(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
movsd  0xee0(%rip),%xmm2
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
movsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm1
movsd  0xed4(%rip),%xmm2
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.fred = [3 x i32] [i32 12, i32 34, i32 56]
@__const.main.joe = [3 x double] [double 2.340000e+01, double 5.670000e+01, double 8.900000e+01]
@.str = [10 x i8] c"%d %d %d\0A\00"
@.str.1 = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [3 x double]
store i32 0, i32* %1
%4 = bitcast [3 x i32]* %2 to i8*
%5 = bitcast [3 x double]* %3 to i8*
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%10 = load i32, i32* %9
%11 = sitofp i32 %10 to double
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%13 = load i32, i32* %12
%14 = sitofp i32 %13 to double
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %8, double %11, double %14)
%16 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%17 = load double, double* %16
%18 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%19 = load double, double* %18
%20 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%21 = load double, double* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %17, double %19, double %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
@.str.1 = [10 x i8] c"%f %f %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 1.200000e+01, double 3.400000e+01, double 5.600000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double 2.340000e+01, double 5.670000e+01, double 8.900000e+01)
ret i32 0
}