#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 pow(double, double);
double sin(double);
double q7(double h) {
  double q8;
  if (h > 500) {
    q8 = 30;
  } else {
    q8 = 133.17 * (pow(2.7182818, (-0.0027 * h))) -
         53.17 * (pow(2.7182818, (-0.0141 * h))) +
         ((-6.2 * (pow(2.7182818, (-0.00462 * h)))) * sin(0.0146 * h));
  }
  return q8;
}


x86 assembly (clang, -O0):
<q7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1156 <q7+0x36>
movsd  0xefc(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1229 <q7+0x109>
movsd  0xee2(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xead(%rip),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xebb(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe8e(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movsd  0xe91(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe66(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe49(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe34(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe1c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe03(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q7>:
sub    $0x18,%rsp
ucomisd 0xed4(%rip),%xmm0
jbe    113b <q7+0x1b>
movsd  0xf12(%rip),%xmm0
add    $0x18,%rsp
ret
movsd  0xec5(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xec1(%rip),%xmm2
movsd  %xmm0,0x8(%rsp)
movaps %xmm2,%xmm0
call   1040 <pow@plt>
movsd  %xmm0,(%rsp)
movsd  0xeae(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  0xe98(%rip),%xmm0
call   1040 <pow@plt>
mulsd  0xe9b(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xe96(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe8d(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  0xe5f(%rip),%xmm0
call   1040 <pow@plt>
mulsd  0xe7a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xe6e(%rip),%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
addsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @q7(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp ogt double %4, 5.000000e+02
br i1 %5, label %6, label %7
6: ; preds = %1
store double 3.000000e+01, double* %3
br label %25
7: ; preds = %1
%8 = load double, double* %2
%9 = fmul double -2.700000e-03, %8
%10 = call double @pow(double 0x4005BF0A87427F01, double %9)
%11 = load double, double* %2
%12 = fmul double -1.410000e-02, %11
%13 = call double @pow(double 0x4005BF0A87427F01, double %12)
%14 = fmul double 5.317000e+01, %13
%15 = fneg double %14
%16 = call double @llvm.fmuladd.f64(double 1.331700e+02, double %10, double %15)
%17 = load double, double* %2
%18 = fmul double -4.620000e-03, %17
%19 = call double @pow(double 0x4005BF0A87427F01, double %18)
%20 = fmul double -6.200000e+00, %19
%21 = load double, double* %2
%22 = fmul double 1.460000e-02, %21
%23 = call double @sin(double %22)
%24 = call double @llvm.fmuladd.f64(double %20, double %23, double %16)
store double %24, double* %3
br label %25
25: ; preds = %7, %6
%26 = load double, double* %3
ret double %26
}

LLVM IR (-O2):
define double @q7(double %0) {
%2 = fcmp ogt double %0, 5.000000e+02
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = fmul double %0, -2.700000e-03
%5 = tail call double @pow(double 0x4005BF0A87427F01, double %4)
%6 = fmul double %0, -1.410000e-02
%7 = tail call double @pow(double 0x4005BF0A87427F01, double %6)
%8 = fmul double %7, -5.317000e+01
%9 = tail call double @llvm.fmuladd.f64(double %5, double 1.331700e+02, double %8)
%10 = fmul double %0, -4.620000e-03
%11 = tail call double @pow(double 0x4005BF0A87427F01, double %10)
%12 = fmul double %11, -6.200000e+00
%13 = fmul double %0, 1.460000e-02
%14 = tail call double @sin(double %13)
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %9)
br label %16
16: ; preds = %1, %3
%17 = phi double [ %15, %3 ], [ 3.000000e+01, %1 ]
ret double %17
}