#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 */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ multiply_and_add(float *, float *, float *, float *);
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char *argv[]) {
  float a[8] = {1, 1, 1, 1, 1, 1, 1, 1};
  float b[8] = {2, 2, 2, 2, 2, 2, 2, 2};
  float c[8] = {3, 3, 3, 3, 3, 3, 3, 3};
  float d[8];
  for (int j = 0; j < 0xFFFFFFF; j++) {
    multiply_and_add(a, b, c, d);
  }
  for (int i = 0; i < sizeof(d) / sizeof(float); i++) {
    printf("%f\n", d[i]);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xea8(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xea2(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x94(%rbp)
cmpl   $0xfffffff,-0x94(%rbp)
ff ff 0f
jge    1203 <main+0xe3>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x70(%rbp),%rdx
lea    -0x90(%rbp),%rcx
call   1030 <multiply_and_add@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    11c7 <main+0xa7>
movl   $0x0,-0x98(%rbp)
movslq -0x98(%rbp),%rax
cmp    $0x8,%rax
jae    124e <main+0x12e>
movslq -0x98(%rbp),%rax
movss  -0x90(%rbp,%rax,4),%xmm0
ff ff
lea    0xe2b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    120d <main+0xed>
mov    0x2d8b(%rip),%rax
mov    (%rax),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xebe(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeea(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    $0xfffffff,%ebp
lea    0x60(%rsp),%r14
lea    0x40(%rsp),%r15
lea    0x20(%rsp),%r12
mov    %rsp,%rbx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1030 <multiply_and_add@plt>
add    $0xffffffff,%ebp
jne    1190 <main+0x70>
movss  (%rsp),%xmm0
lea    0xeae(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x14(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x18(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movss  0x1c(%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.a = [8 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@__const.main.b = [8 x float] [float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00]
@__const.main.c = [8 x float] [float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00]
@.str = [4 x i8] c"%f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x float]
%7 = alloca [8 x float]
%8 = alloca [8 x float]
%9 = alloca [8 x float]
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = bitcast [8 x float]* %6 to i8*
%13 = bitcast [8 x float]* %7 to i8*
%14 = bitcast [8 x float]* %8 to i8*
store i32 0, i32* %10
br label %15
15: ; preds = %24, %2
%16 = load i32, i32* %10
%17 = icmp slt i32 %16, 268435455
br i1 %17, label %18, label %27
18: ; preds = %15
%19 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 0
%20 = getelementptr inbounds [8 x float], [8 x float]* %7, i64 0, i64 0
%21 = getelementptr inbounds [8 x float], [8 x float]* %8, i64 0, i64 0
%22 = getelementptr inbounds [8 x float], [8 x float]* %9, i64 0, i64 0
%23 = call i32 @multiply_and_add(float* %19, float* %20, float* %21, float* %22)
br label %24
24: ; preds = %18
%25 = load i32, i32* %10
%26 = add nsw i32 %25, 1
store i32 %26, i32* %10
br label %15
27: ; preds = %15
store i32 0, i32* %11
br label %28
28: ; preds = %38, %27
%29 = load i32, i32* %11
%30 = sext i32 %29 to i64
%31 = icmp ult i64 %30, 8
br i1 %31, label %32, label %41
32: ; preds = %28
%33 = load i32, i32* %11
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [8 x float], [8 x float]* %9, i64 0, i64 %34
%36 = load float, float* %35
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %36)
br label %38
38: ; preds = %32
%39 = load i32, i32* %11
%40 = add nsw i32 %39, 1
store i32 %40, i32* %11
br label %28
41: ; preds = %28
%42 = load i32, i32* @EXIT_SUCCESS
ret i32 %42
}

LLVM IR (-O2):
@__const.main.a = [8 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@__const.main.b = [8 x float] [float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00]
@__const.main.c = [8 x float] [float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00]
@.str = [4 x i8] c"%f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [8 x float]
%4 = alloca [8 x float]
%5 = alloca [8 x float]
%6 = alloca [8 x float]
%7 = bitcast [8 x float]* %3 to i8*
%8 = bitcast [8 x float]* %4 to i8*
%9 = bitcast [8 x float]* %5 to i8*
%10 = bitcast [8 x float]* %6 to i8*
%11 = getelementptr inbounds [8 x float], [8 x float]* %3, i64 0, i64 0
%12 = getelementptr inbounds [8 x float], [8 x float]* %4, i64 0, i64 0
%13 = getelementptr inbounds [8 x float], [8 x float]* %5, i64 0, i64 0
%14 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 0
br label %15
15: ; preds = %2, %15
%16 = phi i32 [ 0, %2 ], [ %18, %15 ]
%17 = call i32 @multiply_and_add(float* %11, float* %12, float* %13, float* %14)
%18 = add nuw nsw i32 %16, 1
%19 = icmp eq i32 %18, 268435455
br i1 %19, label %20, label %15
20: ; preds = %15
%21 = load float, float* %14
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %21)
%23 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 1
%24 = load float, float* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %24)
%26 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 2
%27 = load float, float* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %27)
%29 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 3
%30 = load float, float* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %30)
%32 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 4
%33 = load float, float* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %33)
%35 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 5
%36 = load float, float* %35
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %36)
%38 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 6
%39 = load float, float* %38
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %39)
%41 = getelementptr inbounds [8 x float], [8 x float]* %6, i64 0, i64 7
%42 = load float, float* %41
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %42)
%44 = load i32, i32* @EXIT_SUCCESS
ret i32 %44
}