#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*/ acceptData(float *, int *, int *);
int /*<<< orphan*/ calculateMovAvg(float *, float *, int *, int *);
int /*<<< orphan*/ printResults(float *, int *, int *);
int main() {
  float valueSet[50];
  float finalSet[50];
  valueSet[0] = 0;
  finalSet[0] = 0;
  int window = 0;
  int realSize = 0;
  acceptData(valueSet, &window, &realSize);
  calculateMovAvg(finalSet, valueSet, &realSize, &window);
  printResults(finalSet, &realSize, &window);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1a0(%rbp)
ff
movl   $0x0,-0x1a4(%rbp)
movl   $0x0,-0x1a8(%rbp)
lea    -0xd0(%rbp),%rdi
lea    -0x1a4(%rbp),%rsi
lea    -0x1a8(%rbp),%rdx
call   1030 <acceptData@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
lea    -0x1a8(%rbp),%rdx
lea    -0x1a4(%rbp),%rcx
call   1050 <calculateMovAvg@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x1a8(%rbp),%rsi
lea    -0x1a4(%rbp),%rdx
call   1040 <printResults@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1a8,%rsp
movl   $0x0,0xe0(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xe0(%rsp),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <acceptData@plt>
lea    0x10(%rsp),%r12
mov    %r12,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1050 <calculateMovAvg@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <printResults@plt>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x float]
%3 = alloca [50 x float]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [50 x float], [50 x float]* %2, i64 0, i64 0
store float 0.000000e+00, float* %6
%7 = getelementptr inbounds [50 x float], [50 x float]* %3, i64 0, i64 0
store float 0.000000e+00, float* %7
store i32 0, i32* %4
store i32 0, i32* %5
%8 = getelementptr inbounds [50 x float], [50 x float]* %2, i64 0, i64 0
%9 = call i32 @acceptData(float* %8, i32* %4, i32* %5)
%10 = getelementptr inbounds [50 x float], [50 x float]* %3, i64 0, i64 0
%11 = getelementptr inbounds [50 x float], [50 x float]* %2, i64 0, i64 0
%12 = call i32 @calculateMovAvg(float* %10, float* %11, i32* %5, i32* %4)
%13 = getelementptr inbounds [50 x float], [50 x float]* %3, i64 0, i64 0
%14 = call i32 @printResults(float* %13, i32* %5, i32* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [50 x float]
%2 = alloca [50 x float]
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [50 x float]* %1 to i8*
%6 = bitcast [50 x float]* %2 to i8*
%7 = getelementptr inbounds [50 x float], [50 x float]* %1, i64 0, i64 0
store float 0.000000e+00, float* %7
%8 = getelementptr inbounds [50 x float], [50 x float]* %2, i64 0, i64 0
store float 0.000000e+00, float* %8
%9 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%10 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%11 = call i32 @acceptData(float* %7, i32* %3, i32* %4)
%12 = call i32 @calculateMovAvg(float* %8, float* %7, i32* %4, i32* %3)
%13 = call i32 @printResults(float* %8, i32* %4, i32* %3)
ret i32 0
}