#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*/ add_four_floats(float *, float *);
int /*<<< orphan*/ printf(char *, float, float, float, float);
int main() {
  float x[] = {-29.750, 244.333, 887.29, 48.1E22};
  float y[] = {29.750, 199.333, -8.29, 22.1E23};
  add_four_floats(x, y);
  printf("%f\n%f\n%f\n%f\n", x[0], x[1], x[2], x[3]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <add_four_floats@plt>
movss  -0x20(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
call   1040 <add_four_floats@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
movss  0xc(%rsp),%xmm3
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [4 x float] [float -2.975000e+01, float 0x406E8AA7E0000000, float 0x408BBA51E0000000, float 0x44D976C400000000]
@__const.main.y = [4 x float] [float 2.975000e+01, float 0x4068EAA7E0000000, float 0xC020947AE0000000, float 0x44FD3FC580000000]
@.str = [13 x i8] c"%f\0A%f\0A%f\0A%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x float]
%3 = alloca [4 x float]
store i32 0, i32* %1
%4 = bitcast [4 x float]* %2 to i8*
%5 = bitcast [4 x float]* %3 to i8*
%6 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%8 = call i32 @add_four_floats(float* %6, float* %7)
%9 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0
%10 = load float, float* %9
%11 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 1
%12 = load float, float* %11
%13 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 3
%16 = load float, float* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %10, float %12, float %14, float %16)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [4 x float] [float -2.975000e+01, float 0x406E8AA7E0000000, float 0x408BBA51E0000000, float 0x44D976C400000000]
@__const.main.y = [4 x float] [float 2.975000e+01, float 0x4068EAA7E0000000, float 0xC020947AE0000000, float 0x44FD3FC580000000]
@.str = [13 x i8] c"%f\0A%f\0A%f\0A%f\0A\00"
define i32 @main() {
%1 = alloca [4 x float]
%2 = alloca [4 x float]
%3 = bitcast [4 x float]* %1 to i8*
%4 = bitcast [4 x float]* %2 to i8*
%5 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0
%7 = call i32 @add_four_floats(float* %5, float* %6)
%8 = load float, float* %5
%9 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 1
%10 = load float, float* %9
%11 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 3
%14 = load float, float* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %8, float %10, float %12, float %14)
ret i32 0
}