#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);
double sqrt(double);
double q7(double indice) {
  double A = 97.34, B = -0.01139, C = -0.04917;
  if (indice > 100)
    return 5.0;
  indice = A * exp((B * indice) + (C * sqrt(indice)));
  return indice;
}


x86 assembly (clang, -O0):
<q7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe9f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    117d <q7+0x5d>
movsd  0xead(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11ed <q7+0xcd>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q7>:
push   %rax
ucomisd 0xedf(%rip),%xmm0
jbe    1135 <q7+0x15>
movsd  0xecd(%rip),%xmm0
pop    %rax
ret
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     114c <q7+0x2c>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    115f <q7+0x3f>
movapd %xmm1,%xmm0
movsd  %xmm1,(%rsp)
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm1
mulsd  0xea9(%rip),%xmm0
mulsd  0xea9(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0xe9c(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @q7(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double 9.734000e+01, double* %4
store double -1.139000e-02, double* %5
store double -4.917000e-02, double* %6
%7 = load double, double* %3
%8 = fcmp ogt double %7, 1.000000e+02
br i1 %8, label %9, label %10
9: ; preds = %1
store double 5.000000e+00, double* %2
br label %22
10: ; preds = %1
%11 = load double, double* %4
%12 = load double, double* %5
%13 = load double, double* %3
%14 = load double, double* %6
%15 = load double, double* %3
%16 = call double @sqrt(double %15)
%17 = fmul double %14, %16
%18 = call double @llvm.fmuladd.f64(double %12, double %13, double %17)
%19 = call double @exp(double %18)
%20 = fmul double %11, %19
store double %20, double* %3
%21 = load double, double* %3
store double %21, double* %2
br label %22
22: ; preds = %10, %9
%23 = load double, double* %2
ret double %23
}

LLVM IR (-O2):
define double @q7(double %0) {
%2 = fcmp ogt double %0, 1.000000e+02
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call double @sqrt(double %0)
%5 = fmul double %4, -4.917000e-02
%6 = tail call double @llvm.fmuladd.f64(double %0, double -1.139000e-02, double %5)
%7 = tail call double @exp(double %6)
%8 = fmul double %7, 9.734000e+01
br label %9
9: ; preds = %1, %3
%10 = phi double [ %8, %3 ], [ 5.000000e+00, %1 ]
ret double %10
}