#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 exp(double const);
int /*<<< orphan*/ power_1(double *, double *, double const *);
void mishin_value(const double r, const double *p, double *f) {
  double z = r - p[3];
  double temp = exp(-p[5] * r);
  double power = 0;
  power_1(&power, &z, &p[4]);
  *f = p[0] * power * temp * (1.0 + p[1] * temp) + p[2];
}


x86 assembly (clang, -O0):
<mishin_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rdx
add    $0x20,%rdx
lea    -0x30(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <power_1@plt>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe40(%rip),%xmm1
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mishin_value>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm1
subsd  0x18(%rdi),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x28(%rdi),%xmm1
xorpd  0xeb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movq   $0x0,(%rsp)
lea    0x20(%rbx),%rdx
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
call   1030 <power_1@plt>
movsd  (%rbx),%xmm0
mulsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0x8(%rbx),%xmm1
addsd  0xe7f(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rbx),%xmm1
movsd  %xmm1,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mishin_value(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%10 = load double, double* %4
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 3
%13 = load double, double* %12
%14 = fsub double %10, %13
store double %14, double* %7
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 5
%17 = load double, double* %16
%18 = fneg double %17
%19 = load double, double* %4
%20 = fmul double %18, %19
%21 = call double @exp(double %20)
store double %21, double* %8
store double 0.000000e+00, double* %9
%22 = load double*, double** %5
%23 = getelementptr inbounds double, double* %22, i64 4
%24 = call i32 @power_1(double* %9, double* %7, double* %23)
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 0
%27 = load double, double* %26
%28 = load double, double* %9
%29 = fmul double %27, %28
%30 = load double, double* %8
%31 = fmul double %29, %30
%32 = load double*, double** %5
%33 = getelementptr inbounds double, double* %32, i64 1
%34 = load double, double* %33
%35 = load double, double* %8
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double 1.000000e+00)
%37 = load double*, double** %5
%38 = getelementptr inbounds double, double* %37, i64 2
%39 = load double, double* %38
%40 = call double @llvm.fmuladd.f64(double %31, double %36, double %39)
%41 = load double*, double** %6
store double %40, double* %41
ret void
}

LLVM IR (-O2):
define void @mishin_value(double %0, double* %1, double* nocapture writeonly %2) {
%4 = alloca double
%5 = alloca double
%6 = bitcast double* %4 to i8*
%7 = getelementptr inbounds double, double* %1, i64 3
%8 = load double, double* %7
%9 = fsub double %0, %8
store double %9, double* %4
%10 = getelementptr inbounds double, double* %1, i64 5
%11 = load double, double* %10
%12 = fneg double %11
%13 = fmul double %12, %0
%14 = tail call double @exp(double %13)
%15 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%16 = getelementptr inbounds double, double* %1, i64 4
%17 = call i32 @power_1(double* %5, double* %4, double* %16)
%18 = load double, double* %1
%19 = load double, double* %5
%20 = fmul double %18, %19
%21 = fmul double %14, %20
%22 = getelementptr inbounds double, double* %1, i64 1
%23 = load double, double* %22
%24 = call double @llvm.fmuladd.f64(double %23, double %14, double 1.000000e+00)
%25 = getelementptr inbounds double, double* %1, i64 2
%26 = load double, double* %25
%27 = call double @llvm.fmuladd.f64(double %21, double %24, double %26)
store double %27, double* %2
ret void
}