#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 exactB(const double t, const double r, double *H, double *M) {
  double alpha, beta, t0, Rmargin;
  const double n = 3.0, H0 = 3600.0, R0 = 750000.0;
  alpha = 1.0 / 9.0;
  beta = 1.0 / 18.0;
  t0 = 422.45 * 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;
  *M = 0.0;
  return 0;
}


x86 assembly (clang, -O0):
<exactB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  0xef6(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe95(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe69(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1275 <exactB+0x165>
movsd  -0x8(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe36(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1030 <pow@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xdd5(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe05(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xded(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xdd9(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1280 <exactB+0x170>
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exactB>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,0x8(%rsp)
divsd  0xed5(%rip),%xmm0
movsd  0xed5(%rip),%xmm1
movsd  %xmm0,(%rsp)
call   1030 <pow@plt>
movapd %xmm0,%xmm1
mulsd  0xec7(%rip),%xmm1
xorpd  %xmm0,%xmm0
ucomisd 0x8(%rsp),%xmm1
jbe    11c9 <exactB+0xb9>
movsd  0xebb(%rip),%xmm1
movsd  (%rsp),%xmm0
call   1030 <pow@plt>
mulsd  0xeb1(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xeab(%rip),%xmm1
movsd  (%rsp),%xmm0
call   1030 <pow@plt>
movsd  0x8(%rsp),%xmm1
divsd  0xe7b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8f(%rip),%xmm1
call   1030 <pow@plt>
movsd  0xe8a(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  0xe86(%rip),%xmm1
movapd %xmm2,%xmm0
call   1030 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movq   $0x0,(%r14)
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @exactB(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
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* %13
store double 3.600000e+03, double* %14
store double 7.500000e+05, double* %15
store double 0x3FBC71C71C71C71C, double* %9
store double 0x3FAC71C71C71C71C, double* %10
store double 0x4208D4D29AE59999, double* %11
%16 = load double, double* %5
%17 = load double, double* %11
%18 = fdiv double %16, %17
%19 = load double, double* %10
%20 = call double @pow(double %18, double %19)
%21 = fmul double 7.500000e+05, %20
store double %21, double* %12
%22 = load double, double* %6
%23 = load double, double* %12
%24 = fcmp olt double %22, %23
br i1 %24, label %25, label %47
25: ; preds = %4
%26 = load double, double* %5
%27 = load double, double* %11
%28 = fdiv double %26, %27
%29 = load double, double* %9
%30 = fneg double %29
%31 = call double @pow(double %28, double %30)
%32 = fmul double 3.600000e+03, %31
%33 = load double, double* %5
%34 = load double, double* %11
%35 = fdiv double %33, %34
%36 = load double, double* %10
%37 = fneg double %36
%38 = call double @pow(double %35, double %37)
%39 = load double, double* %6
%40 = fdiv double %39, 7.500000e+05
%41 = fmul double %38, %40
%42 = call double @pow(double %41, double 0x3FF5555555555555)
%43 = fsub double 1.000000e+00, %42
%44 = call double @pow(double %43, double 0x3FDB6DB6DB6DB6DB)
%45 = fmul double %32, %44
%46 = load double*, double** %7
store double %45, double* %46
br label %49
47: ; preds = %4
%48 = load double*, double** %7
store double 0.000000e+00, double* %48
br label %49
49: ; preds = %47, %25
%50 = load double*, double** %8
store double 0.000000e+00, double* %50
ret i32 0
}

LLVM IR (-O2):
define i32 @exactB(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fdiv double %0, 0x4208D4D29AE59999
%6 = tail call double @pow(double %5, double 0x3FAC71C71C71C71C)
%7 = fmul double %6, 7.500000e+05
%8 = fcmp ogt double %7, %1
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = tail call double @pow(double %5, double 0xBFBC71C71C71C71C)
%11 = fmul double %10, 3.600000e+03
%12 = tail call double @pow(double %5, double 0xBFAC71C71C71C71C)
%13 = fdiv double %1, 7.500000e+05
%14 = fmul double %13, %12
%15 = tail call double @pow(double %14, double 0x3FF5555555555555)
%16 = fsub double 1.000000e+00, %15
%17 = tail call double @pow(double %16, double 0x3FDB6DB6DB6DB6DB)
%18 = fmul double %11, %17
br label %19
19: ; preds = %4, %9
%20 = phi double [ %18, %9 ], [ 0.000000e+00, %4 ]
store double %20, double* %2
store double 0.000000e+00, double* %3
ret i32 0
}