#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 log(double);
int pow(double, double);
double q4(double indice) {
  if (indice <= 10) {
    return (-5.1 * indice) + 100.17;
  } else {
    if (10 < indice && indice <= 60) {
      return (-22.853 * log(indice)) + 101.18;
    }
    if (60 < indice && indice <= 90) {
      return 1e10 * pow(indice, (-5.1161));
    }
    if (indice > 90) {
      return 1.0;
    }
  }
}


x86 assembly (clang, -O0):
<q4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xecb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1167 <q4+0x47>
movsd  -0x10(%rbp),%xmm0
movsd  0xef3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeef(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1241 <q4+0x121>
movsd  -0x10(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11bd <q4+0x9d>
movsd  0xe82(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11bd <q4+0x9d>
movsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
movsd  0xe8d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe89(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1241 <q4+0x121>
movsd  -0x10(%rbp),%xmm0
movsd  0xe3e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1213 <q4+0xf3>
movsd  0xe34(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1213 <q4+0xf3>
movsd  -0x10(%rbp),%xmm0
movsd  0xe34(%rip),%xmm1
call   1040 <pow@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe1b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1241 <q4+0x121>
movsd  -0x10(%rbp),%xmm0
movsd  0xdf0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    123c <q4+0x11c>
movsd  0xde6(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1241 <q4+0x121>
jmp    1241 <q4+0x121>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q4>:
push   %rax
movsd  0xed7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    115e <q4+0x3e>
ucomisd 0xec9(%rip),%xmm0
jbe    1170 <q4+0x50>
movsd  0xed7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1170 <q4+0x50>
call   1030 <log@plt>
mulsd  0xeec(%rip),%xmm0
addsd  0xeec(%rip),%xmm0
pop    %rax
ret
mulsd  0xea2(%rip),%xmm0
addsd  0xea2(%rip),%xmm0
pop    %rax
ret
ucomisd 0xea0(%rip),%xmm0
movsd  0xea0(%rip),%xmm1
jbe    11ac <q4+0x8c>
movsd  0xe9e(%rip),%xmm2
ucomisd %xmm0,%xmm2
jb     11ac <q4+0x8c>
movsd  0xe98(%rip),%xmm1
call   1040 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xe8c(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @q4(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 1.000000e+01
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = call double @llvm.fmuladd.f64(double -5.100000e+00, double %7, double 1.001700e+02)
store double %8, double* %2
br label %35
9: ; preds = %1
%10 = load double, double* %3
%11 = fcmp olt double 1.000000e+01, %10
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load double, double* %3
%14 = fcmp ole double %13, 6.000000e+01
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load double, double* %3
%17 = call double @log(double %16)
%18 = call double @llvm.fmuladd.f64(double -2.285300e+01, double %17, double 1.011800e+02)
store double %18, double* %2
br label %35
19: ; preds = %12, %9
%20 = load double, double* %3
%21 = fcmp olt double 6.000000e+01, %20
br i1 %21, label %22, label %30
22: ; preds = %19
%23 = load double, double* %3
%24 = fcmp ole double %23, 9.000000e+01
br i1 %24, label %25, label %30
25: ; preds = %22
%26 = load double, double* %3
%27 = call i32 @pow(double %26, double -5.116100e+00)
%28 = sitofp i32 %27 to double
%29 = fmul double 1.000000e+10, %28
store double %29, double* %2
br label %35
30: ; preds = %22, %19
%31 = load double, double* %3
%32 = fcmp ogt double %31, 9.000000e+01
br i1 %32, label %33, label %34
33: ; preds = %30
store double 1.000000e+00, double* %2
br label %35
34: ; preds = %30
br label %35
35: ; preds = %6, %15, %25, %33, %34
%36 = load double, double* %2
ret double %36
}

LLVM IR (-O2):
define double @q4(double %0) {
%2 = fcmp ugt double %0, 1.000000e+01
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double -5.100000e+00, double 1.001700e+02)
br label %20
5: ; preds = %1
%6 = fcmp ogt double %0, 1.000000e+01
%7 = fcmp ole double %0, 6.000000e+01
%8 = and i1 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = tail call double @log(double %0)
%11 = tail call double @llvm.fmuladd.f64(double %10, double -2.285300e+01, double 1.011800e+02)
br label %20
12: ; preds = %5
%13 = fcmp ogt double %0, 6.000000e+01
%14 = fcmp ole double %0, 9.000000e+01
%15 = and i1 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = tail call i32 @pow(double %0, double -5.116100e+00)
%18 = sitofp i32 %17 to double
%19 = fmul double %18, 1.000000e+10
br label %20
20: ; preds = %12, %3, %9, %16
%21 = phi double [ %4, %3 ], [ %11, %9 ], [ %19, %16 ], [ 1.000000e+00, %12 ]
ret double %21
}