#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_m(int, double *, double *, double *);
void gljm_value(const double r, const double *p, double *f) {
  double x[3] = {r / p[3], r / p[3], r - p[9]};
  double y[3] = {p[1], p[2], p[10]};
  double power[3] = {0.0, 0.0, 0.0};
  power_m(3, power, x, y);
  double temp = exp(-p[11] * power[2]);
  *f = p[0] / (p[2] - p[1]) * (p[2] / power[0] - p[1] / power[1]) + p[4] +
       p[5] * (p[6] * power[2] * temp * (1.0 + p[7] * temp) + p[8]);
}


x86 assembly (clang, -O0):
<gljm_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
divsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
divsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1040 <memset@plt>
lea    -0x70(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x50(%rbp),%rcx
mov    $0x3,%edi
call   1030 <power_m@plt>
mov    -0x10(%rbp),%rax
movsd  0x58(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x60(%rbp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
divsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
divsd  -0x70(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
divsd  -0x68(%rbp),%xmm0
subsd  %xmm0,%xmm2
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm2
mulsd  -0x60(%rbp),%xmm2
mulsd  -0x78(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm4
movsd  -0x78(%rbp),%xmm3
mulsd  %xmm3,%xmm4
movsd  0xd7b(%rip),%xmm3
addsd  %xmm3,%xmm4
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gljm_value>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm1
divsd  0x18(%rdi),%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  %xmm1,0x28(%rsp)
subsd  0x48(%rdi),%xmm0
movsd  %xmm0,0x30(%rsp)
movups 0x8(%rdi),%xmm0
movaps %xmm0,0x40(%rsp)
movsd  0x50(%rdi),%xmm0
movsd  %xmm0,0x50(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0x10(%rsp)
mov    %rsp,%rsi
lea    0x20(%rsp),%rdx
lea    0x40(%rsp),%rcx
mov    $0x3,%edi
call   1030 <power_m@plt>
movsd  0x58(%rbx),%xmm0
xorpd  0xe6b(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1040 <exp@plt>
movsd  0x10(%rbx),%xmm1
movsd  (%rbx),%xmm2
movsd  0x8(%rbx),%xmm3
movapd %xmm1,%xmm4
subsd  %xmm3,%xmm4
divsd  %xmm4,%xmm2
divsd  (%rsp),%xmm1
divsd  0x8(%rsp),%xmm3
subsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm1
addsd  0x20(%rbx),%xmm1
movsd  0x30(%rbx),%xmm2
mulsd  0x10(%rsp),%xmm2
mulsd  %xmm0,%xmm2
mulsd  0x38(%rbx),%xmm0
addsd  0xe22(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0x40(%rbx),%xmm0
mulsd  0x28(%rbx),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @gljm_value(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca [3 x double]
%10 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%11 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%12 = load double, double* %4
%13 = load double*, double** %5
%14 = getelementptr inbounds double, double* %13, i64 3
%15 = load double, double* %14
%16 = fdiv double %12, %15
store double %16, double* %11
%17 = getelementptr inbounds double, double* %11, i64 1
%18 = load double, double* %4
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 3
%21 = load double, double* %20
%22 = fdiv double %18, %21
store double %22, double* %17
%23 = getelementptr inbounds double, double* %17, i64 1
%24 = load double, double* %4
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 9
%27 = load double, double* %26
%28 = fsub double %24, %27
store double %28, double* %23
%29 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%30 = load double*, double** %5
%31 = getelementptr inbounds double, double* %30, i64 1
%32 = load double, double* %31
store double %32, double* %29
%33 = getelementptr inbounds double, double* %29, i64 1
%34 = load double*, double** %5
%35 = getelementptr inbounds double, double* %34, i64 2
%36 = load double, double* %35
store double %36, double* %33
%37 = getelementptr inbounds double, double* %33, i64 1
%38 = load double*, double** %5
%39 = getelementptr inbounds double, double* %38, i64 10
%40 = load double, double* %39
store double %40, double* %37
%41 = bitcast [3 x double]* %9 to i8*
%42 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%43 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%44 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%45 = call i32 @power_m(i32 3, double* %42, double* %43, double* %44)
%46 = load double*, double** %5
%47 = getelementptr inbounds double, double* %46, i64 11
%48 = load double, double* %47
%49 = fneg double %48
%50 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 2
%51 = load double, double* %50
%52 = fmul double %49, %51
%53 = call double @exp(double %52)
store double %53, double* %10
%54 = load double*, double** %5
%55 = getelementptr inbounds double, double* %54, i64 0
%56 = load double, double* %55
%57 = load double*, double** %5
%58 = getelementptr inbounds double, double* %57, i64 2
%59 = load double, double* %58
%60 = load double*, double** %5
%61 = getelementptr inbounds double, double* %60, i64 1
%62 = load double, double* %61
%63 = fsub double %59, %62
%64 = fdiv double %56, %63
%65 = load double*, double** %5
%66 = getelementptr inbounds double, double* %65, i64 2
%67 = load double, double* %66
%68 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%69 = load double, double* %68
%70 = fdiv double %67, %69
%71 = load double*, double** %5
%72 = getelementptr inbounds double, double* %71, i64 1
%73 = load double, double* %72
%74 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 1
%75 = load double, double* %74
%76 = fdiv double %73, %75
%77 = fsub double %70, %76
%78 = load double*, double** %5
%79 = getelementptr inbounds double, double* %78, i64 4
%80 = load double, double* %79
%81 = call double @llvm.fmuladd.f64(double %64, double %77, double %80)
%82 = load double*, double** %5
%83 = getelementptr inbounds double, double* %82, i64 5
%84 = load double, double* %83
%85 = load double*, double** %5
%86 = getelementptr inbounds double, double* %85, i64 6
%87 = load double, double* %86
%88 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 2
%89 = load double, double* %88
%90 = fmul double %87, %89
%91 = load double, double* %10
%92 = fmul double %90, %91
%93 = load double*, double** %5
%94 = getelementptr inbounds double, double* %93, i64 7
%95 = load double, double* %94
%96 = load double, double* %10
%97 = call double @llvm.fmuladd.f64(double %95, double %96, double 1.000000e+00)
%98 = load double*, double** %5
%99 = getelementptr inbounds double, double* %98, i64 8
%100 = load double, double* %99
%101 = call double @llvm.fmuladd.f64(double %92, double %97, double %100)
%102 = call double @llvm.fmuladd.f64(double %84, double %101, double %81)
%103 = load double*, double** %6
store double %102, double* %103
ret void
}

LLVM IR (-O2):
define void @gljm_value(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = alloca [3 x double]
%5 = alloca [3 x double]
%6 = alloca [3 x double]
%7 = bitcast [3 x double]* %4 to i8*
%8 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%9 = getelementptr inbounds double, double* %1, i64 3
%10 = load double, double* %9
%11 = fdiv double %0, %10
store double %11, double* %8
%12 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%14 = getelementptr inbounds double, double* %1, i64 9
%15 = load double, double* %14
%16 = fsub double %0, %15
store double %16, double* %13
%17 = bitcast [3 x double]* %5 to i8*
%18 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%19 = getelementptr inbounds double, double* %1, i64 1
%20 = getelementptr inbounds double, double* %1, i64 2
%21 = bitcast double* %19 to <2 x double>*
%22 = load <2 x double>, <2 x double>* %21
%23 = bitcast [3 x double]* %5 to <2 x double>*
store <2 x double> %22, <2 x double>* %23
%24 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 2
%25 = getelementptr inbounds double, double* %1, i64 10
%26 = load double, double* %25
store double %26, double* %24
%27 = bitcast [3 x double]* %6 to i8*
%28 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%29 = call i32 @power_m(i32 3, double* %28, double* %8, double* %18)
%30 = getelementptr inbounds double, double* %1, i64 11
%31 = load double, double* %30
%32 = fneg double %31
%33 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%34 = load double, double* %33
%35 = fmul double %34, %32
%36 = call double @exp(double %35)
%37 = load double, double* %1
%38 = load double, double* %20
%39 = load double, double* %19
%40 = fsub double %38, %39
%41 = fdiv double %37, %40
%42 = load double, double* %28
%43 = fdiv double %38, %42
%44 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%45 = load double, double* %44
%46 = fdiv double %39, %45
%47 = fsub double %43, %46
%48 = getelementptr inbounds double, double* %1, i64 4
%49 = load double, double* %48
%50 = call double @llvm.fmuladd.f64(double %41, double %47, double %49)
%51 = getelementptr inbounds double, double* %1, i64 5
%52 = load double, double* %51
%53 = getelementptr inbounds double, double* %1, i64 6
%54 = load double, double* %53
%55 = load double, double* %33
%56 = fmul double %54, %55
%57 = fmul double %36, %56
%58 = getelementptr inbounds double, double* %1, i64 7
%59 = load double, double* %58
%60 = call double @llvm.fmuladd.f64(double %59, double %36, double 1.000000e+00)
%61 = getelementptr inbounds double, double* %1, i64 8
%62 = load double, double* %61
%63 = call double @llvm.fmuladd.f64(double %57, double %60, double %62)
%64 = call double @llvm.fmuladd.f64(double %52, double %63, double %50)
store double %64, double* %2
ret void
}