#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 meopp_value(const double r, const double *p, double *f) {
  double x[2] = {r - p[6], 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):
<meopp_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
mov    -0x10(%rbp),%rax
subsd  0x30(%rax),%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):
<meopp_value>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x28(%rsp)
movapd %xmm0,%xmm1
subsd  0x30(%rdi),%xmm1
movsd  %xmm1,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 @meopp_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
%12 = load double*, double** %5
%13 = getelementptr inbounds double, double* %12, i64 6
%14 = load double, double* %13
%15 = fsub double %11, %14
store double %15, double* %10
%16 = getelementptr inbounds double, double* %10, i64 1
%17 = load double, double* %4
store double %17, double* %16
%18 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
store double %21, double* %18
%22 = getelementptr inbounds double, double* %18, i64 1
%23 = load double*, double** %5
%24 = getelementptr inbounds double, double* %23, i64 3
%25 = load double, double* %24
store double %25, double* %22
%26 = bitcast [2 x double]* %9 to i8*
%27 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%28 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%29 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%30 = call i32 @power_m(i32 2, double* %27, double* %28, double* %29)
%31 = load double*, double** %5
%32 = getelementptr inbounds double, double* %31, i64 0
%33 = load double, double* %32
%34 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%35 = load double, double* %34
%36 = fdiv double %33, %35
%37 = load double*, double** %5
%38 = getelementptr inbounds double, double* %37, i64 2
%39 = load double, double* %38
%40 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 1
%41 = load double, double* %40
%42 = fdiv double %39, %41
%43 = load double*, double** %5
%44 = getelementptr inbounds double, double* %43, i64 4
%45 = load double, double* %44
%46 = load double, double* %4
%47 = load double*, double** %5
%48 = getelementptr inbounds double, double* %47, i64 5
%49 = load double, double* %48
%50 = call double @llvm.fmuladd.f64(double %45, double %46, double %49)
%51 = call double @cos(double %50)
%52 = call double @llvm.fmuladd.f64(double %42, double %51, double %36)
%53 = load double*, double** %6
store double %52, double* %53
ret void
}

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