#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 abs(double);
double exp(double);
double log10(double);
double pow(double, double);
double sigma_pp_nd(double Pp) {
  double a[9] = {0.57,   0.1176, 0.3829, 23.10,  6.454,
                 -5.764, -23.63, 94.75,  0.02667};
  double b[2] = {11.34, 23.72};
  double c[3] = {28.5, -6.133, 1.464};
  double x, sigma;
  x = log10(Pp);
  sigma = 0;
  if ((Pp >= 1) && (Pp < 1.3)) {
    sigma = a[0] * pow(x / a[1], 1.2) *
            (a[3] + x * x * (a[4] + a[5] * x) +
             a[6] * exp(-a[7] * (x + a[8]) * (x + a[8])));
  } else if ((Pp >= 1.3) && (Pp < 2.4)) {
    sigma = (b[0] * abs(a[2] - x) + b[1] * abs(a[1] - x)) / (a[2] - a[1]);
  } else if ((Pp >= 2.4) && (Pp <= 10.0)) {
    sigma = a[3] + x * x * (a[4] + a[5] * x) +
            a[6] * exp(-a[7] * (x + a[8]) * (x + a[8]));
  } else if (Pp > 10.0) {
    sigma = c[0] + c[1] * x + c[2] * x * x;
  }
  return sigma;
}


x86 assembly (clang, -O0):
<sigma_pp_nd>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec5(%rip),%rsi
mov    $0x48,%edx
call   1040 <memcpy@plt>
mov    0xf24(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xf21(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xee8(%rip),%rax
mov    %rax,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1070 <log10@plt>
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  0xe2a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12f4 <sigma_pp_nd+0x1a4>
movsd  0xe20(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    12f4 <sigma_pp_nd+0x1a4>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x48(%rbp),%xmm0
movsd  0xe0b(%rip),%xmm1
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x38(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  -0x30(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm4
ff
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1050 <exp@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    14ec <sigma_pp_nd+0x39c>
movsd  -0x8(%rbp),%xmm0
movsd  0xd07(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     13a6 <sigma_pp_nd+0x256>
movsd  0xcfd(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    13a6 <sigma_pp_nd+0x256>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
call   1030 <abs@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
call   1030 <abs@plt>
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
subsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    14e7 <sigma_pp_nd+0x397>
movsd  -0x8(%rbp),%xmm0
movsd  0xc5d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1487 <sigma_pp_nd+0x337>
movsd  0xc53(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1487 <sigma_pp_nd+0x337>
movsd  -0x38(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
movsd  -0x30(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm4
ff
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1050 <exp@plt>
movsd  -0xd8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    14e2 <sigma_pp_nd+0x392>
movsd  -0x8(%rbp),%xmm0
movsd  0xb84(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14dd <sigma_pp_nd+0x38d>
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    14e2 <sigma_pp_nd+0x392>
jmp    14e7 <sigma_pp_nd+0x397>
jmp    14ec <sigma_pp_nd+0x39c>
movsd  -0x90(%rbp),%xmm0
ff
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma_pp_nd>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
call   1060 <log10@plt>
movsd  (%rsp),%xmm1
movapd %xmm0,%xmm2
ucomisd 0xea1(%rip),%xmm1
jb     120c <sigma_pp_nd+0xcc>
movsd  0xe9b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    120c <sigma_pp_nd+0xcc>
movapd %xmm2,%xmm0
divsd  0xeed(%rip),%xmm0
movsd  0xf05(%rip),%xmm1
movsd  %xmm2,(%rsp)
call   1050 <pow@plt>
mulsd  0xefb(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xe80(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe7c(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe78(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
addsd  0xe72(%rip),%xmm2
movsd  0xe72(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
call   1040 <exp@plt>
mulsd  0xe65(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret
ucomisd 0xdf4(%rip),%xmm1
jb     127d <sigma_pp_nd+0x13d>
movsd  0xdf2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    127d <sigma_pp_nd+0x13d>
movsd  0xe3c(%rip),%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm2,(%rsp)
call   1030 <abs@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe28(%rip),%xmm0
subsd  (%rsp),%xmm0
call   1030 <abs@plt>
mulsd  0xe1e(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xe18(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
divsd  0xe10(%rip),%xmm0
add    $0x18,%rsp
ret
ucomisd 0xd8b(%rip),%xmm1
jb     12f1 <sigma_pp_nd+0x1b1>
movsd  0xd89(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     12f1 <sigma_pp_nd+0x1b1>
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xd93(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xd8f(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xd8b(%rip),%xmm1
movsd  %xmm1,(%rsp)
addsd  0xd86(%rip),%xmm2
movsd  0xd86(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
call   1040 <exp@plt>
mulsd  0xd79(%rip),%xmm0
addsd  (%rsp),%xmm0
add    $0x18,%rsp
ret
xorpd  %xmm0,%xmm0
ucomisd 0xd1b(%rip),%xmm1
jbe    1327 <sigma_pp_nd+0x1e7>
movsd  0xd19(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xd15(%rip),%xmm1
movsd  0xd15(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.sigma_pp_nd.a = [9 x double] [double 5.700000e-01, double 1.176000e-01, double 3.829000e-01, double 2.310000e+01, double 6.454000e+00, double -5.764000e+00, double -2.363000e+01, double 9.475000e+01, double 2.667000e-02]
@__const.sigma_pp_nd.b = [2 x double] [double 1.134000e+01, double 2.372000e+01]
@__const.sigma_pp_nd.c = [3 x double] [double 2.850000e+01, double -6.133000e+00, double 1.464000e+00]
define double @sigma_pp_nd(double %0) {
%2 = alloca double
%3 = alloca [9 x double]
%4 = alloca [2 x double]
%5 = alloca [3 x double]
%6 = alloca double
%7 = alloca double
store double %0, double* %2
%8 = bitcast [9 x double]* %3 to i8*
%9 = bitcast [2 x double]* %4 to i8*
%10 = bitcast [3 x double]* %5 to i8*
%11 = load double, double* %2
%12 = call double @log10(double %11)
store double %12, double* %6
store double 0.000000e+00, double* %7
%13 = load double, double* %2
%14 = fcmp oge double %13, 1.000000e+00
br i1 %14, label %15, label %57
15: ; preds = %1
%16 = load double, double* %2
%17 = fcmp olt double %16, 1.300000e+00
br i1 %17, label %18, label %57
18: ; preds = %15
%19 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 0
%20 = load double, double* %19
%21 = load double, double* %6
%22 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 1
%23 = load double, double* %22
%24 = fdiv double %21, %23
%25 = call double @pow(double %24, double 1.200000e+00)
%26 = fmul double %20, %25
%27 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 3
%28 = load double, double* %27
%29 = load double, double* %6
%30 = load double, double* %6
%31 = fmul double %29, %30
%32 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 4
%33 = load double, double* %32
%34 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 5
%35 = load double, double* %34
%36 = load double, double* %6
%37 = call double @llvm.fmuladd.f64(double %35, double %36, double %33)
%38 = call double @llvm.fmuladd.f64(double %31, double %37, double %28)
%39 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 6
%40 = load double, double* %39
%41 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 7
%42 = load double, double* %41
%43 = fneg double %42
%44 = load double, double* %6
%45 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 8
%46 = load double, double* %45
%47 = fadd double %44, %46
%48 = fmul double %43, %47
%49 = load double, double* %6
%50 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 8
%51 = load double, double* %50
%52 = fadd double %49, %51
%53 = fmul double %48, %52
%54 = call double @exp(double %53)
%55 = call double @llvm.fmuladd.f64(double %40, double %54, double %38)
%56 = fmul double %26, %55
store double %56, double* %7
br label %141
57: ; preds = %15, %1
%58 = load double, double* %2
%59 = fcmp oge double %58, 1.300000e+00
br i1 %59, label %60, label %86
60: ; preds = %57
%61 = load double, double* %2
%62 = fcmp olt double %61, 2.400000e+00
br i1 %62, label %63, label %86
63: ; preds = %60
%64 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%65 = load double, double* %64
%66 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 2
%67 = load double, double* %66
%68 = load double, double* %6
%69 = fsub double %67, %68
%70 = call double @abs(double %69)
%71 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%72 = load double, double* %71
%73 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 1
%74 = load double, double* %73
%75 = load double, double* %6
%76 = fsub double %74, %75
%77 = call double @abs(double %76)
%78 = fmul double %72, %77
%79 = call double @llvm.fmuladd.f64(double %65, double %70, double %78)
%80 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 2
%81 = load double, double* %80
%82 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 1
%83 = load double, double* %82
%84 = fsub double %81, %83
%85 = fdiv double %79, %84
store double %85, double* %7
br label %140
86: ; preds = %60, %57
%87 = load double, double* %2
%88 = fcmp oge double %87, 2.400000e+00
br i1 %88, label %89, label %122
89: ; preds = %86
%90 = load double, double* %2
%91 = fcmp ole double %90, 1.000000e+01
br i1 %91, label %92, label %122
92: ; preds = %89
%93 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 3
%94 = load double, double* %93
%95 = load double, double* %6
%96 = load double, double* %6
%97 = fmul double %95, %96
%98 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 4
%99 = load double, double* %98
%100 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 5
%101 = load double, double* %100
%102 = load double, double* %6
%103 = call double @llvm.fmuladd.f64(double %101, double %102, double %99)
%104 = call double @llvm.fmuladd.f64(double %97, double %103, double %94)
%105 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 6
%106 = load double, double* %105
%107 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 7
%108 = load double, double* %107
%109 = fneg double %108
%110 = load double, double* %6
%111 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 8
%112 = load double, double* %111
%113 = fadd double %110, %112
%114 = fmul double %109, %113
%115 = load double, double* %6
%116 = getelementptr inbounds [9 x double], [9 x double]* %3, i64 0, i64 8
%117 = load double, double* %116
%118 = fadd double %115, %117
%119 = fmul double %114, %118
%120 = call double @exp(double %119)
%121 = call double @llvm.fmuladd.f64(double %106, double %120, double %104)
store double %121, double* %7
br label %139
122: ; preds = %89, %86
%123 = load double, double* %2
%124 = fcmp ogt double %123, 1.000000e+01
br i1 %124, label %125, label %138
125: ; preds = %122
%126 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%127 = load double, double* %126
%128 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 1
%129 = load double, double* %128
%130 = load double, double* %6
%131 = call double @llvm.fmuladd.f64(double %129, double %130, double %127)
%132 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 2
%133 = load double, double* %132
%134 = load double, double* %6
%135 = fmul double %133, %134
%136 = load double, double* %6
%137 = call double @llvm.fmuladd.f64(double %135, double %136, double %131)
store double %137, double* %7
br label %138
138: ; preds = %125, %122
br label %139
139: ; preds = %138, %92
br label %140
140: ; preds = %139, %63
br label %141
141: ; preds = %140, %18
%142 = load double, double* %7
ret double %142
}

LLVM IR (-O2):
define double @sigma_pp_nd(double %0) {
%2 = tail call double @log10(double %0)
%3 = fcmp oge double %0, 1.000000e+00
%4 = fcmp olt double %0, 1.300000e+00
%5 = and i1 %3, %4
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = fdiv double %2, 1.176000e-01
%8 = tail call double @pow(double %7, double 1.200000e+00)
%9 = fmul double %8, 5.700000e-01
%10 = fmul double %2, %2
%11 = tail call double @llvm.fmuladd.f64(double %2, double -5.764000e+00, double 6.454000e+00)
%12 = tail call double @llvm.fmuladd.f64(double %10, double %11, double 2.310000e+01)
%13 = fadd double %2, 2.667000e-02
%14 = fmul double %13, -9.475000e+01
%15 = fmul double %13, %14
%16 = tail call double @exp(double %15)
%17 = tail call double @llvm.fmuladd.f64(double %16, double -2.363000e+01, double %12)
%18 = fmul double %9, %17
br label %50
19: ; preds = %1
%20 = fcmp oge double %0, 1.300000e+00
%21 = fcmp olt double %0, 2.400000e+00
%22 = and i1 %20, %21
br i1 %22, label %23, label %31
23: ; preds = %19
%24 = fsub double 3.829000e-01, %2
%25 = tail call double @abs(double %24)
%26 = fsub double 1.176000e-01, %2
%27 = tail call double @abs(double %26)
%28 = fmul double %27, 2.372000e+01
%29 = tail call double @llvm.fmuladd.f64(double %25, double 1.134000e+01, double %28)
%30 = fdiv double %29, 0x3FD0FAACD9E83E43
br label %50
31: ; preds = %19
%32 = fcmp oge double %0, 2.400000e+00
%33 = fcmp ole double %0, 1.000000e+01
%34 = and i1 %32, %33
br i1 %34, label %35, label %44
35: ; preds = %31
%36 = fmul double %2, %2
%37 = tail call double @llvm.fmuladd.f64(double %2, double -5.764000e+00, double 6.454000e+00)
%38 = tail call double @llvm.fmuladd.f64(double %36, double %37, double 2.310000e+01)
%39 = fadd double %2, 2.667000e-02
%40 = fmul double %39, -9.475000e+01
%41 = fmul double %39, %40
%42 = tail call double @exp(double %41)
%43 = tail call double @llvm.fmuladd.f64(double %42, double -2.363000e+01, double %38)
br label %50
44: ; preds = %31
%45 = fcmp ogt double %0, 1.000000e+01
br i1 %45, label %46, label %50
46: ; preds = %44
%47 = tail call double @llvm.fmuladd.f64(double %2, double -6.133000e+00, double 2.850000e+01)
%48 = fmul double %2, 1.464000e+00
%49 = tail call double @llvm.fmuladd.f64(double %48, double %2, double %47)
br label %50
50: ; preds = %23, %44, %46, %35, %6
%51 = phi double [ %18, %6 ], [ %30, %23 ], [ %43, %35 ], [ %49, %46 ], [ 0.000000e+00, %44 ]
ret double %51
}