#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*/ alphabgfilter(int, double *, double, double, double, double,
                                 double *);
int /*<<< orphan*/ alphabgrnd(int, double *);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, ...);
main() {
  double x[20], y[20], z[20];
  double a = 0.271, b = 0.0285, g = 0.0005;
  double t, dt = 0.05;
  int i, k;
  k = 20;
  alphabgrnd(20, y);
  for (i = 0; i < 20; i++) {
    t = (i + 1) * dt;
    z[i] = 3.0 * t * t - 2.0 * t + 5.0;
    x[i] = z[i] + y[i];
  }
  alphabgfilter(20, x, dt, a, b, g, y);
  for (i = 0; i < 20; i = i + 5) {
    t = (i + 1) * dt;
    printf("\n t=%5.2f x(t)=%5.2f  y(t)=%5.2f  z(t)=%5.2f  ", t, x[i], y[i],
           z[i]);
  }
  printf("\n");
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xebe(%rip),%xmm0
movsd  %xmm0,-0x1f8(%rbp)
ff
movsd  0xea6(%rip),%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
movsd  0xe76(%rip),%xmm0
movsd  %xmm0,-0x218(%rbp)
ff
movl   $0x14,-0x220(%rbp)
lea    -0x150(%rbp),%rsi
mov    $0x14,%edi
call   1030 <alphabgrnd@plt>
movl   $0x0,-0x21c(%rbp)
cmpl   $0x14,-0x21c(%rbp)
jge    1288 <main+0x148>
mov    -0x21c(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x218(%rbp),%xmm0
ff
movsd  %xmm0,-0x210(%rbp)
ff
movsd  0xe47(%rip),%xmm0
mulsd  -0x210(%rbp),%xmm0
ff
movsd  -0x210(%rbp),%xmm2
ff
movsd  0xe27(%rip),%xmm1
mulsd  -0x210(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdf0(%rip),%xmm1
addsd  %xmm1,%xmm0
movslq -0x21c(%rbp),%rax
movsd  %xmm0,-0x1f0(%rbp,%rax,8)
ff ff
movslq -0x21c(%rbp),%rax
movsd  -0x1f0(%rbp,%rax,8),%xmm0
ff ff
movslq -0x21c(%rbp),%rax
addsd  -0x150(%rbp,%rax,8),%xmm0
ff ff
movslq -0x21c(%rbp),%rax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x21c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x21c(%rbp)
jmp    11b7 <main+0x77>
lea    -0xb0(%rbp),%rsi
movsd  -0x218(%rbp),%xmm0
ff
movsd  -0x1f8(%rbp),%xmm1
ff
movsd  -0x200(%rbp),%xmm2
ff
movsd  -0x208(%rbp),%xmm3
ff
lea    -0x150(%rbp),%rdx
mov    $0x14,%edi
call   1060 <alphabgfilter@plt>
movl   $0x0,-0x21c(%rbp)
cmpl   $0x14,-0x21c(%rbp)
jge    134e <main+0x20e>
mov    -0x21c(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x218(%rbp),%xmm0
ff
movsd  %xmm0,-0x210(%rbp)
ff
movsd  -0x210(%rbp),%xmm0
ff
movslq -0x21c(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm1
ff ff
movslq -0x21c(%rbp),%rax
movsd  -0x150(%rbp,%rax,8),%xmm2
ff ff
movslq -0x21c(%rbp),%rax
movsd  -0x1f0(%rbp,%rax,8),%xmm3
ff ff
lea    0xd05(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    -0x21c(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x21c(%rbp)
jmp    12ca <main+0x18a>
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1e0,%rsp
mov    %rsp,%rbx
mov    $0x14,%edi
mov    %rbx,%rsi
call   1040 <alphabgrnd@plt>
movapd 0xe90(%rip),%xmm0
movapd %xmm0,0x140(%rsp)
addpd  (%rsp),%xmm0
movapd %xmm0,0xa0(%rsp)
movapd 0xe81(%rip),%xmm0
movapd %xmm0,0x150(%rsp)
addpd  0x10(%rsp),%xmm0
movapd %xmm0,0xb0(%rsp)
movapd 0xe71(%rip),%xmm0
movapd %xmm0,0x160(%rsp)
addpd  0x20(%rsp),%xmm0
movapd 0xe6a(%rip),%xmm1
movapd %xmm1,0x170(%rsp)
addpd  0x30(%rsp),%xmm1
movapd %xmm0,0xc0(%rsp)
movapd %xmm1,0xd0(%rsp)
movapd 0xe51(%rip),%xmm0
movapd %xmm0,0x180(%rsp)
addpd  0x40(%rsp),%xmm0
movapd %xmm0,0xe0(%rsp)
movapd 0xe41(%rip),%xmm0
movapd %xmm0,0x190(%rsp)
addpd  0x50(%rsp),%xmm0
movapd %xmm0,0xf0(%rsp)
movapd 0xe31(%rip),%xmm0
movapd %xmm0,0x1a0(%rsp)
addpd  0x60(%rsp),%xmm0
movapd 0xe2a(%rip),%xmm1
movapd %xmm1,0x1b0(%rsp)
addpd  0x70(%rsp),%xmm1
movapd %xmm0,0x100(%rsp)
movapd %xmm1,0x110(%rsp)
movapd 0xe11(%rip),%xmm0
movapd %xmm0,0x1c0(%rsp)
addpd  0x80(%rsp),%xmm0
movapd %xmm0,0x120(%rsp)
movapd 0xdfe(%rip),%xmm0
movapd %xmm0,0x1d0(%rsp)
addpd  0x90(%rsp),%xmm0
movapd %xmm0,0x130(%rsp)
lea    0xa0(%rsp),%rsi
movsd  0xde3(%rip),%xmm0
movsd  0xde3(%rip),%xmm1
movsd  0xde3(%rip),%xmm2
movsd  0xde3(%rip),%xmm3
mov    $0x14,%edi
mov    %rbx,%rdx
call   1070 <alphabgfilter@plt>
movsd  0xa0(%rsp),%xmm1
movsd  (%rsp),%xmm2
movsd  0x140(%rsp),%xmm3
lea    0xdd8(%rip),%rbx
mov    %rbx,%rdi
movsd  0xd95(%rip),%xmm0
mov    $0x4,%al
call   1050 <printf@plt>
movsd  0xc8(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
movsd  0x168(%rsp),%xmm3
movsd  0xd8e(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x4,%al
call   1050 <printf@plt>
movsd  0xf0(%rsp),%xmm1
movsd  0x50(%rsp),%xmm2
movsd  0x190(%rsp),%xmm3
movsd  0xd6c(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x4,%al
call   1050 <printf@plt>
movsd  0x118(%rsp),%xmm1
movsd  0x78(%rsp),%xmm2
movsd  0x1b8(%rsp),%xmm3
movsd  0xd4a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x4,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x1e0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\0A t=%5.2f x(t)=%5.2f y(t)=%5.2f z(t)=%5.2f \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x double]
%3 = alloca [20 x double]
%4 = alloca [20 x double]
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store double 2.710000e-01, double* %5
store double 2.850000e-02, double* %6
store double 5.000000e-04, double* %7
store double 5.000000e-02, double* %9
store i32 20, i32* %11
%12 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 0
%13 = call i32 @alphabgrnd(i32 20, double* %12)
store i32 0, i32* %10
br label %14
14: ; preds = %46, %0
%15 = load i32, i32* %10
%16 = icmp slt i32 %15, 20
br i1 %16, label %17, label %49
17: ; preds = %14
%18 = load i32, i32* %10
%19 = add nsw i32 %18, 1
%20 = sitofp i32 %19 to double
%21 = load double, double* %9
%22 = fmul double %20, %21
store double %22, double* %8
%23 = load double, double* %8
%24 = fmul double 3.000000e+00, %23
%25 = load double, double* %8
%26 = load double, double* %8
%27 = fmul double 2.000000e+00, %26
%28 = fneg double %27
%29 = call double @llvm.fmuladd.f64(double %24, double %25, double %28)
%30 = fadd double %29, 5.000000e+00
%31 = load i32, i32* %10
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [20 x double], [20 x double]* %4, i64 0, i64 %32
store double %30, double* %33
%34 = load i32, i32* %10
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [20 x double], [20 x double]* %4, i64 0, i64 %35
%37 = load double, double* %36
%38 = load i32, i32* %10
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 %39
%41 = load double, double* %40
%42 = fadd double %37, %41
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 %44
store double %42, double* %45
br label %46
46: ; preds = %17
%47 = load i32, i32* %10
%48 = add nsw i32 %47, 1
store i32 %48, i32* %10
br label %14
49: ; preds = %14
%50 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 0
%51 = load double, double* %9
%52 = load double, double* %5
%53 = load double, double* %6
%54 = load double, double* %7
%55 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 0
%56 = call i32 @alphabgfilter(i32 20, double* %50, double %51, double %52, double %53, double %54, double* %55)
store i32 0, i32* %10
br label %57
57: ; preds = %80, %49
%58 = load i32, i32* %10
%59 = icmp slt i32 %58, 20
br i1 %59, label %60, label %83
60: ; preds = %57
%61 = load i32, i32* %10
%62 = add nsw i32 %61, 1
%63 = sitofp i32 %62 to double
%64 = load double, double* %9
%65 = fmul double %63, %64
store double %65, double* %8
%66 = load double, double* %8
%67 = load i32, i32* %10
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 %68
%70 = load double, double* %69
%71 = load i32, i32* %10
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 %72
%74 = load double, double* %73
%75 = load i32, i32* %10
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [20 x double], [20 x double]* %4, i64 0, i64 %76
%78 = load double, double* %77
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double %66, double %70, double %74, double %78)
br label %80
80: ; preds = %60
%81 = load i32, i32* %10
%82 = add nsw i32 %81, 5
store i32 %82, i32* %10
br label %57
83: ; preds = %57
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%85 = call i32 (...) @getch()
%86 = load i32, i32* %1
ret i32 %86
}

LLVM IR (-O2):
@.str = [47 x i8] c"\0A t=%5.2f x(t)=%5.2f y(t)=%5.2f z(t)=%5.2f \00"
define i32 @main() {
%1 = alloca [20 x double]
%2 = alloca [20 x double]
%3 = alloca [20 x double]
%4 = bitcast [20 x double]* %1 to i8*
%5 = bitcast [20 x double]* %2 to i8*
%6 = bitcast [20 x double]* %3 to i8*
%7 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 0
%8 = call i32 @alphabgrnd(i32 20, double* %7)
%9 = bitcast [20 x double]* %3 to <2 x double>*
store <2 x double> <double 4.907500e+00, double 4.830000e+00>, <2 x double>* %9
%10 = bitcast [20 x double]* %2 to <2 x double>*
%11 = load <2 x double>, <2 x double>* %10
%12 = fadd <2 x double> %11, <double 4.907500e+00, double 4.830000e+00>
%13 = bitcast [20 x double]* %1 to <2 x double>*
store <2 x double> %12, <2 x double>* %13
%14 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 2
%15 = bitcast double* %14 to <2 x double>*
store <2 x double> <double 4.767500e+00, double 4.720000e+00>, <2 x double>* %15
%16 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 2
%17 = bitcast double* %16 to <2 x double>*
%18 = load <2 x double>, <2 x double>* %17
%19 = fadd <2 x double> %18, <double 4.767500e+00, double 4.720000e+00>
%20 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 2
%21 = bitcast double* %20 to <2 x double>*
store <2 x double> %19, <2 x double>* %21
%22 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 4
%23 = bitcast double* %22 to <2 x double>*
store <2 x double> <double 4.687500e+00, double 4.670000e+00>, <2 x double>* %23
%24 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 4
%25 = bitcast double* %24 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = fadd <2 x double> %26, <double 4.687500e+00, double 4.670000e+00>
%28 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 4
%29 = bitcast double* %28 to <2 x double>*
store <2 x double> %27, <2 x double>* %29
%30 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 6
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> <double 4.667500e+00, double 4.680000e+00>, <2 x double>* %31
%32 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 6
%33 = bitcast double* %32 to <2 x double>*
%34 = load <2 x double>, <2 x double>* %33
%35 = fadd <2 x double> %34, <double 4.667500e+00, double 4.680000e+00>
%36 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 6
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> %35, <2 x double>* %37
%38 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 8
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> <double 4.707500e+00, double 4.750000e+00>, <2 x double>* %39
%40 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 8
%41 = bitcast double* %40 to <2 x double>*
%42 = load <2 x double>, <2 x double>* %41
%43 = fadd <2 x double> %42, <double 4.707500e+00, double 4.750000e+00>
%44 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 8
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> %43, <2 x double>* %45
%46 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 10
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> <double 4.807500e+00, double 4.880000e+00>, <2 x double>* %47
%48 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 10
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = fadd <2 x double> %50, <double 4.807500e+00, double 4.880000e+00>
%52 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 10
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> %51, <2 x double>* %53
%54 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 12
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> <double 4.967500e+00, double 5.070000e+00>, <2 x double>* %55
%56 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 12
%57 = bitcast double* %56 to <2 x double>*
%58 = load <2 x double>, <2 x double>* %57
%59 = fadd <2 x double> %58, <double 4.967500e+00, double 5.070000e+00>
%60 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 12
%61 = bitcast double* %60 to <2 x double>*
store <2 x double> %59, <2 x double>* %61
%62 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 14
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> <double 5.187500e+00, double 5.320000e+00>, <2 x double>* %63
%64 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 14
%65 = bitcast double* %64 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = fadd <2 x double> %66, <double 5.187500e+00, double 5.320000e+00>
%68 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 14
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> %67, <2 x double>* %69
%70 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 16
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> <double 5.467500e+00, double 5.630000e+00>, <2 x double>* %71
%72 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 16
%73 = bitcast double* %72 to <2 x double>*
%74 = load <2 x double>, <2 x double>* %73
%75 = fadd <2 x double> %74, <double 5.467500e+00, double 5.630000e+00>
%76 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 16
%77 = bitcast double* %76 to <2 x double>*
store <2 x double> %75, <2 x double>* %77
%78 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 18
%79 = bitcast double* %78 to <2 x double>*
store <2 x double> <double 5.807500e+00, double 6.000000e+00>, <2 x double>* %79
%80 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 18
%81 = bitcast double* %80 to <2 x double>*
%82 = load <2 x double>, <2 x double>* %81
%83 = fadd <2 x double> %82, <double 5.807500e+00, double 6.000000e+00>
%84 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 18
%85 = bitcast double* %84 to <2 x double>*
store <2 x double> %83, <2 x double>* %85
%86 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 0
%87 = call i32 @alphabgfilter(i32 20, double* %86, double 5.000000e-02, double 2.710000e-01, double 2.850000e-02, double 5.000000e-04, double* %7)
%88 = load double, double* %86
%89 = load double, double* %7
%90 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 0
%91 = load double, double* %90
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 5.000000e-02, double %88, double %89, double %91)
%93 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 5
%94 = load double, double* %93
%95 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 5
%96 = load double, double* %95
%97 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 5
%98 = load double, double* %97
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 0x3FD3333333333334, double %94, double %96, double %98)
%100 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 10
%101 = load double, double* %100
%102 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 10
%103 = load double, double* %102
%104 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 10
%105 = load double, double* %104
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 5.500000e-01, double %101, double %103, double %105)
%107 = getelementptr inbounds [20 x double], [20 x double]* %1, i64 0, i64 15
%108 = load double, double* %107
%109 = getelementptr inbounds [20 x double], [20 x double]* %2, i64 0, i64 15
%110 = load double, double* %109
%111 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 15
%112 = load double, double* %111
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 8.000000e-01, double %108, double %110, double %112)
%114 = call i32 @putchar(i32 10)
%115 = call i32 (...) @getch()
ret i32 0
}