#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 */
double const cos(double const);
int /*<<< orphan*/ power_m(int, double *, double *, double *);
void eopp_value(const double r, const double *p, double *f) {
  double x[2] = {r, r};
  double y[2] = {p[1], p[3]};
  double power[2] = {0, 0};
  power_m(2, power, x, y);
  *f = p[0] / power[0] + (p[2] / power[1]) * cos(p[4] * r + p[5]);
}


x86 assembly (clang, -O0):
<eopp_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x50(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0x2,%edi
call   1030 <power_m@plt>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x8(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <cos@plt>
movsd  -0x60(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eopp_value>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x28(%rsp)
movsd  %xmm0,0x40(%rsp)
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x38(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
lea    0x40(%rsp),%rdx
lea    0x30(%rsp),%rcx
mov    $0x2,%edi
call   1030 <power_m@plt>
movsd  (%rbx),%xmm0
movsd  0x10(%rbx),%xmm1
divsd  (%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
divsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x28(%rsp),%xmm0
mulsd  0x20(%rbx),%xmm0
addsd  0x28(%rbx),%xmm0
call   1040 <cos@plt>
mulsd  0x18(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @eopp_value(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca [2 x double]
%8 = alloca [2 x double]
%9 = alloca [2 x double]
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%10 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%11 = load double, double* %4
store double %11, double* %10
%12 = getelementptr inbounds double, double* %10, i64 1
%13 = load double, double* %4
store double %13, double* %12
%14 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double, double* %16
store double %17, double* %14
%18 = getelementptr inbounds double, double* %14, i64 1
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 3
%21 = load double, double* %20
store double %21, double* %18
%22 = bitcast [2 x double]* %9 to i8*
%23 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%24 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%25 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%26 = call i32 @power_m(i32 2, double* %23, double* %24, double* %25)
%27 = load double*, double** %5
%28 = getelementptr inbounds double, double* %27, i64 0
%29 = load double, double* %28
%30 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%31 = load double, double* %30
%32 = fdiv double %29, %31
%33 = load double*, double** %5
%34 = getelementptr inbounds double, double* %33, i64 2
%35 = load double, double* %34
%36 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 1
%37 = load double, double* %36
%38 = fdiv double %35, %37
%39 = load double*, double** %5
%40 = getelementptr inbounds double, double* %39, i64 4
%41 = load double, double* %40
%42 = load double, double* %4
%43 = load double*, double** %5
%44 = getelementptr inbounds double, double* %43, i64 5
%45 = load double, double* %44
%46 = call double @llvm.fmuladd.f64(double %41, double %42, double %45)
%47 = call double @cos(double %46)
%48 = call double @llvm.fmuladd.f64(double %38, double %47, double %32)
%49 = load double*, double** %6
store double %48, double* %49
ret void
}

LLVM IR (-O2):
define void @eopp_value(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = alloca [2 x double]
%5 = alloca [2 x double]
%6 = alloca [2 x double]
%7 = bitcast [2 x double]* %4 to i8*
%8 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
store double %0, double* %8
%9 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
store double %0, double* %9
%10 = bitcast [2 x double]* %5 to i8*
%11 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%12 = getelementptr inbounds double, double* %1, i64 1
%13 = load double, double* %12
store double %13, double* %11
%14 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
%15 = getelementptr inbounds double, double* %1, i64 3
%16 = load double, double* %15
store double %16, double* %14
%17 = bitcast [2 x double]* %6 to i8*
%18 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%19 = call i32 @power_m(i32 2, double* %18, double* %8, double* %11)
%20 = load double, double* %1
%21 = load double, double* %18
%22 = fdiv double %20, %21
%23 = getelementptr inbounds double, double* %1, i64 2
%24 = load double, double* %23
%25 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
%26 = load double, double* %25
%27 = fdiv double %24, %26
%28 = getelementptr inbounds double, double* %1, i64 4
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %1, i64 5
%31 = load double, double* %30
%32 = call double @llvm.fmuladd.f64(double %29, double %0, double %31)
%33 = call double @cos(double %32)
%34 = call double @llvm.fmuladd.f64(double %27, double %33, double %22)
store double %34, double* %2
ret void
}