#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 exactC(const double t, const double r, double *H, double *M) {
  double lambda, alpha, beta, t0, Rmargin;
  const double n = 3.0, H0 = 3600.0, R0 = 750000.0;
  lambda = 5.0;
  alpha = -1.0;
  beta = 2.0;
  t0 = 15208.0 * 31556926.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) / n),
             n / (2 * n + 1));
  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 = 5 * H0 / t0;
    else
      *M = 0.0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<exactC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  0xefe(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xec7(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeb2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe9d(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe88(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe5c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1282 <exactC+0x172>
movsd  -0x8(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe31(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xdc8(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe00(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xde8(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xdd4(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    128d <exactC+0x17d>
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  0xdb6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12c3 <exactC+0x1b3>
movsd  -0x28(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    132c <exactC+0x21c>
movsd  0xd85(%rip),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd1b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    131c <exactC+0x20c>
movsd  0xd4e(%rip),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1327 <exactC+0x217>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    132c <exactC+0x21c>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exactC>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movapd %xmm0,%xmm4
movapd %xmm0,%xmm2
divsd  0xed9(%rip),%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm2,%xmm3
mulsd  0xed1(%rip),%xmm3
mov    %rsi,%r14
mov    %rdi,%rbx
xorpd  %xmm0,%xmm0
movapd %xmm1,0x10(%rsp)
ucomisd %xmm1,%xmm3
jbe    11bc <exactC+0xac>
movsd  0xebb(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,(%rsp)
movsd  0xeb2(%rip),%xmm1
movapd %xmm2,%xmm0
movsd  %xmm4,0x8(%rsp)
call   1030 <pow@plt>
movapd 0x10(%rsp),%xmm1
divsd  0xe85(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe91(%rip),%xmm1
call   1030 <pow@plt>
movsd  0xe8c(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  0xe88(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
movsd  0x8(%rsp),%xmm4
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
ucomisd 0xe70(%rip),%xmm4
jbe    11dc <exactC+0xcc>
movsd  0xe7e(%rip),%xmm1
divsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm1
jmp    11f7 <exactC+0xe7>
movapd 0x10(%rsp),%xmm0
cmpltsd 0xe55(%rip),%xmm0
movsd  0xe55(%rip),%xmm1
andpd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @exactC(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%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
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
store double 3.000000e+00, double* %14
store double 3.600000e+03, double* %15
store double 7.500000e+05, double* %16
store double 5.000000e+00, double* %9
store double -1.000000e+00, double* %10
store double 2.000000e+00, double* %11
store double 0x425BEF54DACC0000, double* %12
%17 = load double, double* %5
%18 = load double, double* %12
%19 = fdiv double %17, %18
%20 = load double, double* %11
%21 = call double @pow(double %19, double %20)
%22 = fmul double 7.500000e+05, %21
store double %22, double* %13
%23 = load double, double* %6
%24 = load double, double* %13
%25 = fcmp olt double %23, %24
br i1 %25, label %26, label %48
26: ; preds = %4
%27 = load double, double* %5
%28 = load double, double* %12
%29 = fdiv double %27, %28
%30 = load double, double* %10
%31 = fneg double %30
%32 = call double @pow(double %29, double %31)
%33 = fmul double 3.600000e+03, %32
%34 = load double, double* %5
%35 = load double, double* %12
%36 = fdiv double %34, %35
%37 = load double, double* %11
%38 = fneg double %37
%39 = call double @pow(double %36, double %38)
%40 = load double, double* %6
%41 = fdiv double %40, 7.500000e+05
%42 = fmul double %39, %41
%43 = call double @pow(double %42, double 0x3FF5555555555555)
%44 = fsub double 1.000000e+00, %43
%45 = call double @pow(double %44, double 0x3FDB6DB6DB6DB6DB)
%46 = fmul double %33, %45
%47 = load double*, double** %7
store double %46, double* %47
br label %50
48: ; preds = %4
%49 = load double*, double** %7
store double 0.000000e+00, double* %49
br label %50
50: ; preds = %48, %26
%51 = load double, double* %5
%52 = fcmp ogt double %51, 0x414813764CCCCCCD
br i1 %52, label %53, label %61
53: ; preds = %50
%54 = load double, double* %9
%55 = load double, double* %5
%56 = fdiv double %54, %55
%57 = load double*, double** %7
%58 = load double, double* %57
%59 = fmul double %56, %58
%60 = load double*, double** %8
store double %59, double* %60
br label %77
61: ; preds = %50
%62 = load double, double* %12
%63 = fdiv double 0x414813764CCCCCCD, %62
%64 = load double, double* %11
%65 = call double @pow(double %63, double %64)
%66 = fmul double 7.500000e+05, %65
store double %66, double* %13
%67 = load double, double* %6
%68 = load double, double* %13
%69 = fcmp olt double %67, %68
br i1 %69, label %70, label %74
70: ; preds = %61
%71 = load double, double* %12
%72 = fdiv double 1.800000e+04, %71
%73 = load double*, double** %8
store double %72, double* %73
br label %76
74: ; preds = %61
%75 = load double*, double** %8
store double 0.000000e+00, double* %75
br label %76
76: ; preds = %74, %70
br label %77
77: ; preds = %76, %53
ret i32 0
}

LLVM IR (-O2):
define i32 @exactC(double %0, double %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = fdiv double %0, 0x425BEF54DACC0000
%6 = fmul double %5, %5
%7 = fmul double %6, 7.500000e+05
%8 = fcmp ogt double %7, %1
br i1 %8, label %9, label %18
9: ; preds = %4
%10 = fmul double %5, 3.600000e+03
%11 = tail call double @pow(double %5, double -2.000000e+00)
%12 = fdiv double %1, 7.500000e+05
%13 = fmul double %12, %11
%14 = tail call double @pow(double %13, double 0x3FF5555555555555)
%15 = fsub double 1.000000e+00, %14
%16 = tail call double @pow(double %15, double 0x3FDB6DB6DB6DB6DB)
%17 = fmul double %10, %16
br label %18
18: ; preds = %4, %9
%19 = phi double [ %17, %9 ], [ 0.000000e+00, %4 ]
store double %19, double* %2
%20 = fcmp ogt double %0, 0x414813764CCCCCCD
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = fdiv double 5.000000e+00, %0
%23 = fmul double %22, %19
br label %27
24: ; preds = %18
%25 = fcmp olt double %1, 0x3F0100619ECB1411
%26 = select i1 %25, double 0x3E6422D821EA3344, double 0.000000e+00
br label %27
27: ; preds = %24, %21
%28 = phi double [ %23, %21 ], [ %26, %24 ]
store double %28, double* %3
ret i32 0
}