#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 const pow(double const, double const);
int exactH(const double f, const double tIN, const double r, double *H,
           double *M) {
  const double n = 3.0;
  const double H0 = 3600.0, R0 = 750000.0;
  double t0 = (15208.0 / pow(1 - f, n)) * 31556926.0;
  double lambda, alpha, beta, t0post, Rmargin;
  double t;
  t = tIN;
  if (t < t0) {
    lambda = 5.0;
    alpha = -1.0;
    beta = 2.0;
  } else {
    t0post = (t0 / 2.0) * (1.0 / 18.0);
    t = t - t0 + t0post;
    t0 = t0post;
    lambda = 0.0;
    alpha = 1.0 / 9.0;
    beta = 1.0 / 18.0;
  }
  Rmargin = R0 * pow(t / t0, beta);
  if (r < Rmargin)
    *H = H0 * pow(t / t0, -alpha) *
         pow(1.0 - pow(pow(t / t0, -beta) * (r / R0), (n + 1.0) / n),
             n / (2.0 * n + 1.0));
  else
    *H = 0.0;
  if (t > 0.1 * 31556926.0)
    *M = (lambda / t) * (*H);
  else {
    Rmargin = R0 * pow(0.1 * 31556926.0 / t0, beta);
    if (r < Rmargin)
      *M = lambda * H0 / t0;
    else
      *M = 0.0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<exactH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xeb7(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xea2(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe8a(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xe76(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11dd <exactH+0xcd>
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    123f <exactH+0x12f>
movsd  -0x48(%rbp),%xmm0
movsd  0xe56(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe3a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x78(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe0b(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xdf6(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x78(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xdc2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    133c <exactH+0x22c>
movsd  -0x78(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd77(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xd2e(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd5e(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd06(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xd3a(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1347 <exactH+0x237>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm0
movsd  0xd14(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    137d <exactH+0x26d>
movsd  -0x50(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    13eb <exactH+0x2db>
movsd  0xce3(%rip),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xc81(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13db <exactH+0x2cb>
movsd  0xc64(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    13e6 <exactH+0x2d6>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    13eb <exactH+0x2db>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exactH>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  0xecf(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  0xecb(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
movsd  0x18(%rsp),%xmm2
movsd  0xebc(%rip),%xmm3
divsd  %xmm0,%xmm3
mulsd  0xeb8(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    1185 <exactH+0x75>
movsd  0xeb2(%rip),%xmm1
movsd  0xeb2(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movsd  0xead(%rip),%xmm0
jmp    11b1 <exactH+0xa1>
subsd  %xmm3,%xmm2
mulsd  0xea7(%rip),%xmm3
movsd  0xea7(%rip),%xmm1
mulsd  %xmm1,%xmm3
addsd  %xmm3,%xmm2
movsd  0xe9f(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  %xmm2,0x18(%rsp)
movapd %xmm2,%xmm0
movsd  %xmm3,0x20(%rsp)
divsd  %xmm3,%xmm0
movsd  %xmm0,0x28(%rsp)
movapd %xmm1,0x40(%rsp)
call   1030 <pow@plt>
movapd %xmm0,%xmm1
mulsd  0xe68(%rip),%xmm1
xorpd  %xmm0,%xmm0
ucomisd 0x10(%rsp),%xmm1
jbe    1272 <exactH+0x162>
movaps 0x30(%rsp),%xmm1
xorps  0xe80(%rip),%xmm1
movsd  0x28(%rsp),%xmm0
call   1030 <pow@plt>
mulsd  0xe45(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
movaps 0xe60(%rip),%xmm1
xorps  0x40(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
call   1030 <pow@plt>
movsd  0x10(%rsp),%xmm1
divsd  0xe12(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe16(%rip),%xmm1
call   1030 <pow@plt>
movsd  0xda9(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  0xe05(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
mulsd  0x30(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x18(%rsp),%xmm1
ucomisd 0xdec(%rip),%xmm1
jbe    129a <exactH+0x18a>
movsd  0x8(%rsp),%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,%xmm1
jmp    12db <exactH+0x1cb>
movsd  0xdce(%rip),%xmm0
divsd  0x20(%rsp),%xmm0
movapd 0x40(%rsp),%xmm1
call   1030 <pow@plt>
mulsd  0xd95(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd 0x10(%rsp),%xmm0
jbe    12db <exactH+0x1cb>
movsd  0x8(%rsp),%xmm1
mulsd  0xd83(%rip),%xmm1
divsd  0x20(%rsp),%xmm1
movsd  %xmm1,(%r14)
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @exactH(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
store double 3.000000e+00, double* %11
store double 3.600000e+03, double* %12
store double 7.500000e+05, double* %13
%21 = load double, double* %6
%22 = fsub double 1.000000e+00, %21
%23 = call double @pow(double %22, double 3.000000e+00)
%24 = fdiv double 1.520800e+04, %23
%25 = fmul double %24, 0x417E1853E0000000
store double %25, double* %14
%26 = load double, double* %7
store double %26, double* %20
%27 = load double, double* %20
%28 = load double, double* %14
%29 = fcmp olt double %27, %28
br i1 %29, label %30, label %31
30: ; preds = %5
store double 5.000000e+00, double* %15
store double -1.000000e+00, double* %16
store double 2.000000e+00, double* %17
br label %41
31: ; preds = %5
%32 = load double, double* %14
%33 = fdiv double %32, 2.000000e+00
%34 = fmul double %33, 0x3FAC71C71C71C71C
store double %34, double* %18
%35 = load double, double* %20
%36 = load double, double* %14
%37 = fsub double %35, %36
%38 = load double, double* %18
%39 = fadd double %37, %38
store double %39, double* %20
%40 = load double, double* %18
store double %40, double* %14
store double 0.000000e+00, double* %15
store double 0x3FBC71C71C71C71C, double* %16
store double 0x3FAC71C71C71C71C, double* %17
br label %41
41: ; preds = %31, %30
%42 = load double, double* %20
%43 = load double, double* %14
%44 = fdiv double %42, %43
%45 = load double, double* %17
%46 = call double @pow(double %44, double %45)
%47 = fmul double 7.500000e+05, %46
store double %47, double* %19
%48 = load double, double* %8
%49 = load double, double* %19
%50 = fcmp olt double %48, %49
br i1 %50, label %51, label %73
51: ; preds = %41
%52 = load double, double* %20
%53 = load double, double* %14
%54 = fdiv double %52, %53
%55 = load double, double* %16
%56 = fneg double %55
%57 = call double @pow(double %54, double %56)
%58 = fmul double 3.600000e+03, %57
%59 = load double, double* %20
%60 = load double, double* %14
%61 = fdiv double %59, %60
%62 = load double, double* %17
%63 = fneg double %62
%64 = call double @pow(double %61, double %63)
%65 = load double, double* %8
%66 = fdiv double %65, 7.500000e+05
%67 = fmul double %64, %66
%68 = call double @pow(double %67, double 0x3FF5555555555555)
%69 = fsub double 1.000000e+00, %68
%70 = call double @pow(double %69, double 0x3FDB6DB6DB6DB6DB)
%71 = fmul double %58, %70
%72 = load double*, double** %9
store double %71, double* %72
br label %75
73: ; preds = %41
%74 = load double*, double** %9
store double 0.000000e+00, double* %74
br label %75
75: ; preds = %73, %51
%76 = load double, double* %20
%77 = fcmp ogt double %76, 0x414813764CCCCCCD
br i1 %77, label %78, label %86
78: ; preds = %75
%79 = load double, double* %15
%80 = load double, double* %20
%81 = fdiv double %79, %80
%82 = load double*, double** %9
%83 = load double, double* %82
%84 = fmul double %81, %83
%85 = load double*, double** %10
store double %84, double* %85
br label %104
86: ; preds = %75
%87 = load double, double* %14
%88 = fdiv double 0x414813764CCCCCCD, %87
%89 = load double, double* %17
%90 = call double @pow(double %88, double %89)
%91 = fmul double 7.500000e+05, %90
store double %91, double* %19
%92 = load double, double* %8
%93 = load double, double* %19
%94 = fcmp olt double %92, %93
br i1 %94, label %95, label %101
95: ; preds = %86
%96 = load double, double* %15
%97 = fmul double %96, 3.600000e+03
%98 = load double, double* %14
%99 = fdiv double %97, %98
%100 = load double*, double** %10
store double %99, double* %100
br label %103
101: ; preds = %86
%102 = load double*, double** %10
store double 0.000000e+00, double* %102
br label %103
103: ; preds = %101, %95
br label %104
104: ; preds = %103, %78
ret i32 0
}

LLVM IR (-O2):
define i32 @exactH(double %0, double %1, double %2, double* nocapture %3, double* nocapture writeonly %4) {
%6 = fsub double 1.000000e+00, %0
%7 = tail call double @pow(double %6, double 3.000000e+00)
%8 = fdiv double 1.520800e+04, %7
%9 = fmul double %8, 0x417E1853E0000000
%10 = fcmp ogt double %9, %1
br i1 %10, label %16, label %11
11: ; preds = %5
%12 = fmul double %9, 5.000000e-01
%13 = fmul double %12, 0x3FAC71C71C71C71C
%14 = fsub double %1, %9
%15 = fadd double %14, %13
br label %16
16: ; preds = %5, %11
%17 = phi double [ 0.000000e+00, %11 ], [ 5.000000e+00, %5 ]
%18 = phi double [ 0x3FBC71C71C71C71C, %11 ], [ -1.000000e+00, %5 ]
%19 = phi double [ 0x3FAC71C71C71C71C, %11 ], [ 2.000000e+00, %5 ]
%20 = phi double [ %13, %11 ], [ %9, %5 ]
%21 = phi double [ %15, %11 ], [ %1, %5 ]
%22 = fdiv double %21, %20
%23 = tail call double @pow(double %22, double %19)
%24 = fmul double %23, 7.500000e+05
%25 = fcmp ogt double %24, %2
br i1 %25, label %26, label %38
26: ; preds = %16
%27 = fneg double %18
%28 = tail call double @pow(double %22, double %27)
%29 = fmul double %28, 3.600000e+03
%30 = fneg double %19
%31 = tail call double @pow(double %22, double %30)
%32 = fdiv double %2, 7.500000e+05
%33 = fmul double %32, %31
%34 = tail call double @pow(double %33, double 0x3FF5555555555555)
%35 = fsub double 1.000000e+00, %34
%36 = tail call double @pow(double %35, double 0x3FDB6DB6DB6DB6DB)
%37 = fmul double %29, %36
br label %38
38: ; preds = %16, %26
%39 = phi double [ %37, %26 ], [ 0.000000e+00, %16 ]
store double %39, double* %3
%40 = fcmp ogt double %21, 0x414813764CCCCCCD
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = fdiv double %17, %21
%43 = fmul double %42, %39
br label %52
44: ; preds = %38
%45 = fdiv double 0x414813764CCCCCCD, %20
%46 = tail call double @pow(double %45, double %19)
%47 = fmul double %46, 7.500000e+05
%48 = fcmp ogt double %47, %2
br i1 %48, label %49, label %52
49: ; preds = %44
%50 = fmul double %17, 3.600000e+03
%51 = fdiv double %50, %20
br label %52
52: ; preds = %44, %49, %41
%53 = phi double [ %51, %49 ], [ %43, %41 ], [ 0.000000e+00, %44 ]
store double %53, double* %4
ret i32 0
}