#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 */
int cos(double);
int pow(double, double);
double q6(double g) {
  double q7;
  if (g > 100) {
    q7 = 5;
  } else {
    q7 = 90.37 * pow(2.7182818, (-0.0169 * g)) - 15 * cos((0.0571 * (g - 30))) +
         10,
    22 * pow(2.718281828, (-0.231 * g)) - 0.8;
  }
  return q7;
}


x86 assembly (clang, -O0):
<q6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1156 <q6+0x36>
movsd  0xefc(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11f9 <q6+0xd9>
movsd  0xee2(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xecd(%rip),%xmm0
call   1040 <pow@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeaa(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe96(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  -0x18(%rbp),%xmm0
imul   $0xf,%eax,%eax
cvtsi2sd %eax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe5a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe42(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe29(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe14(%rip),%xmm0
call   1040 <pow@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q6>:
sub    $0x18,%rsp
ucomisd 0xedc(%rip),%xmm0
jbe    113b <q6+0x1b>
movsd  0xeca(%rip),%xmm0
add    $0x18,%rsp
ret
movsd  0xecd(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm0,0x10(%rsp)
movsd  0xec3(%rip),%xmm0
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xeb1(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
mulsd  0xeab(%rip),%xmm0
call   1030 <cos@plt>
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xe93(%rip),%xmm1
subsd  %xmm0,%xmm1
addsd  0xe8f(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  0xe83(%rip),%xmm1
movsd  0xe83(%rip),%xmm0
call   1040 <pow@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @q6(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp ogt double %4, 1.000000e+02
br i1 %5, label %6, label %7
6: ; preds = %1
store double 5.000000e+00, double* %3
br label %27
7: ; preds = %1
%8 = load double, double* %2
%9 = fmul double -1.690000e-02, %8
%10 = call i32 @pow(double 0x4005BF0A87427F01, double %9)
%11 = sitofp i32 %10 to double
%12 = load double, double* %2
%13 = fsub double %12, 3.000000e+01
%14 = fmul double 5.710000e-02, %13
%15 = call i32 @cos(double %14)
%16 = mul nsw i32 15, %15
%17 = sitofp i32 %16 to double
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double 9.037000e+01, double %11, double %18)
%20 = fadd double %19, 1.000000e+01
store double %20, double* %3
%21 = load double, double* %2
%22 = fmul double -2.310000e-01, %21
%23 = call i32 @pow(double 0x4005BF0A8B04919B, double %22)
%24 = mul nsw i32 22, %23
%25 = sitofp i32 %24 to double
%26 = fsub double %25, 8.000000e-01
br label %27
27: ; preds = %7, %6
%28 = load double, double* %3
ret double %28
}

LLVM IR (-O2):
define double @q6(double %0) {
%2 = fcmp ogt double %0, 1.000000e+02
br i1 %2, label %17, label %3
3: ; preds = %1
%4 = fmul double %0, -1.690000e-02
%5 = tail call i32 @pow(double 0x4005BF0A87427F01, double %4)
%6 = sitofp i32 %5 to double
%7 = fadd double %0, -3.000000e+01
%8 = fmul double %7, 5.710000e-02
%9 = tail call i32 @cos(double %8)
%10 = mul nsw i32 %9, 15
%11 = sitofp i32 %10 to double
%12 = fneg double %11
%13 = tail call double @llvm.fmuladd.f64(double %6, double 9.037000e+01, double %12)
%14 = fadd double %13, 1.000000e+01
%15 = fmul double %0, -2.310000e-01
%16 = tail call i32 @pow(double 0x4005BF0A8B04919B, double %15)
br label %17
17: ; preds = %1, %3
%18 = phi double [ %14, %3 ], [ 5.000000e+00, %1 ]
ret double %18
}