#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*/ M_E;
float cos(float);
float pow(int /*<<< orphan*/, float);
float sqrt(int);
float JellyCenterAnimation(float p) {
  float A = 1.0;
  float hz = 30;
  float zu = 0.1;
  float wd = hz * sqrt(1 - zu * zu);
  float v = 0.1;
  float x = p;
  float result = A * pow(M_E, -zu * hz * x) * cos(wd * x + v);
  return result;
}


x86 assembly (clang, -O0):
<JellyCenterAnimation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb6(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xea1(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xe73(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe49(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    0x2e09(%rip),%rax
mov    (%rax),%edi
movss  -0x10(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0xc(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JellyCenterAnimation>:
sub    $0x18,%rsp
movss  %xmm0,0xc(%rsp)
xor    %edi,%edi
call   1050 <sqrt@plt>
mulss  0xeb7(%rip),%xmm0
movss  %xmm0,0x14(%rsp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
movss  0xea4(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
call   1040 <pow@plt>
movss  %xmm0,0x10(%rsp)
movss  0x14(%rsp),%xmm0
mulss  0xc(%rsp),%xmm0
addss  0xe83(%rip),%xmm0
call   1030 <cos@plt>
mulss  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_E = global i32 0
define float @JellyCenterAnimation(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %2
store float 1.000000e+00, float* %3
store float 3.000000e+01, float* %4
store float 0x3FB99999A0000000, float* %5
%10 = load float, float* %4
%11 = load float, float* %5
%12 = load float, float* %5
%13 = fneg float %11
%14 = call float @llvm.fmuladd.f32(float %13, float %12, float 1.000000e+00)
%15 = fptosi float %14 to i32
%16 = call float @sqrt(i32 %15)
%17 = fmul float %10, %16
store float %17, float* %6
store float 0x3FB99999A0000000, float* %7
%18 = load float, float* %2
store float %18, float* %8
%19 = load float, float* %3
%20 = load i32, i32* @M_E
%21 = load float, float* %5
%22 = fneg float %21
%23 = load float, float* %4
%24 = fmul float %22, %23
%25 = load float, float* %8
%26 = fmul float %24, %25
%27 = call float @pow(i32 %20, float %26)
%28 = fmul float %19, %27
%29 = load float, float* %6
%30 = load float, float* %8
%31 = load float, float* %7
%32 = call float @llvm.fmuladd.f32(float %29, float %30, float %31)
%33 = call float @cos(float %32)
%34 = fmul float %28, %33
store float %34, float* %9
%35 = load float, float* %9
ret float %35
}

LLVM IR (-O2):
@M_E = global i32 0
define float @JellyCenterAnimation(float %0) {
%2 = tail call float @sqrt(i32 0)
%3 = fmul float %2, 3.000000e+01
%4 = load i32, i32* @M_E
%5 = fmul float %0, -3.000000e+00
%6 = tail call float @pow(i32 %4, float %5)
%7 = tail call float @llvm.fmuladd.f32(float %3, float %0, float 0x3FB99999A0000000)
%8 = tail call float @cos(float %7)
%9 = fmul float %6, %8
ret float %9
}