#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*/ power_1(double *, double const *, double const *);
void sheng_F_value(const double r, const double *p, double *f) {
  double power = 0;
  power_1(&power, &r, &p[1]);
  *f = p[0] * power + p[2] * r + p[3];
}


x86 assembly (clang, -O0):
<sheng_F_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
lea    -0x20(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <power_1@plt>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x20(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
addsd  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sheng_F_value>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rdi),%rdx
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <power_1@plt>
movsd  (%rbx),%xmm0
movsd  0x10(%rbx),%xmm1
mulsd  0x10(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
addsd  0x18(%rbx),%xmm0
movsd  %xmm0,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sheng_F_value(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
store double 0.000000e+00, double* %7
%8 = load double*, double** %5
%9 = getelementptr inbounds double, double* %8, i64 1
%10 = call i32 @power_1(double* %7, double* %4, double* %9)
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double, double* %7
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 2
%17 = load double, double* %16
%18 = load double, double* %4
%19 = fmul double %17, %18
%20 = call double @llvm.fmuladd.f64(double %13, double %14, double %19)
%21 = load double*, double** %5
%22 = getelementptr inbounds double, double* %21, i64 3
%23 = load double, double* %22
%24 = fadd double %20, %23
%25 = load double*, double** %6
store double %24, double* %25
ret void
}

LLVM IR (-O2):
define void @sheng_F_value(double %0, double* %1, double* nocapture writeonly %2) {
%4 = alloca double
%5 = alloca double
store double %0, double* %4
%6 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = call i32 @power_1(double* %5, double* %4, double* %7)
%9 = load double, double* %1
%10 = load double, double* %5
%11 = getelementptr inbounds double, double* %1, i64 2
%12 = load double, double* %11
%13 = load double, double* %4
%14 = fmul double %12, %13
%15 = call double @llvm.fmuladd.f64(double %9, double %10, double %14)
%16 = getelementptr inbounds double, double* %1, i64 3
%17 = load double, double* %16
%18 = fadd double %17, %15
store double %18, double* %2
ret void
}