void machine_params(double *double_epsilon, double *double_max) {
  double eps;
  double double_min;
  double min, min_prev;
  double max;
  eps = 1.0 / 16.0;
  while (1.0 + eps > 1.0)
    eps /= 2.0;
  *double_epsilon = eps * 2.0;
  min_prev = min = 1.0;
  while (min * 1.0 > 0) {
    min_prev = min;
    min /= 32.0;
  }
  min = min_prev;
  while (min * 1.0 > 0) {
    min_prev = min;
    min /= 2.0;
  }
  double_min = min_prev / (*double_epsilon);
  max = 2.0 * (1.0 - *double_epsilon) / (double_min);
  *double_max = max;
}


x86 assembly (clang, -O0):
<machine_params>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee7(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xeda(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1153 <machine_params+0x53>
movsd  -0x18(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1119 <machine_params+0x19>
movsd  0xeb5(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe7e(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11c1 <machine_params+0xc1>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe65(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1182 <machine_params+0x82>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe35(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    120a <machine_params+0x10a>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe14(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    11cb <machine_params+0xcb>
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xde0(%rip),%xmm1
subsd  (%rax),%xmm1
movsd  0xddc(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<machine_params>:
movabs $0x3cb0000000000000,%rax
mov    %rax,(%rdi)
movsd  0xeeb(%rip),%xmm1
movsd  0xeeb(%rip),%xmm2
xorpd  %xmm3,%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm1
ucomisd %xmm3,%xmm1
ja     1130 <machine_params+0x30>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <machine_params+0x60>
movsd  0xec0(%rip),%xmm3
movapd %xmm0,%xmm2
mulsd  %xmm3,%xmm0
ucomisd %xmm1,%xmm0
ja     1150 <machine_params+0x50>
jmp    1164 <machine_params+0x64>
movapd %xmm0,%xmm2
mulsd  0xeac(%rip),%xmm2
movsd  0xeac(%rip),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @machine_params(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double* %0, double** %3
store double* %1, double** %4
store double 6.250000e-02, double* %5
br label %10
10: ; preds = %14, %2
%11 = load double, double* %5
%12 = fadd double 1.000000e+00, %11
%13 = fcmp ogt double %12, 1.000000e+00
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load double, double* %5
%16 = fdiv double %15, 2.000000e+00
store double %16, double* %5
br label %10
17: ; preds = %10
%18 = load double, double* %5
%19 = fmul double %18, 2.000000e+00
%20 = load double*, double** %3
store double %19, double* %20
store double 1.000000e+00, double* %7
store double 1.000000e+00, double* %8
br label %21
21: ; preds = %25, %17
%22 = load double, double* %7
%23 = fmul double %22, 1.000000e+00
%24 = fcmp ogt double %23, 0.000000e+00
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load double, double* %7
store double %26, double* %8
%27 = load double, double* %7
%28 = fdiv double %27, 3.200000e+01
store double %28, double* %7
br label %21
29: ; preds = %21
%30 = load double, double* %8
store double %30, double* %7
br label %31
31: ; preds = %35, %29
%32 = load double, double* %7
%33 = fmul double %32, 1.000000e+00
%34 = fcmp ogt double %33, 0.000000e+00
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load double, double* %7
store double %36, double* %8
%37 = load double, double* %7
%38 = fdiv double %37, 2.000000e+00
store double %38, double* %7
br label %31
39: ; preds = %31
%40 = load double, double* %8
%41 = load double*, double** %3
%42 = load double, double* %41
%43 = fdiv double %40, %42
store double %43, double* %6
%44 = load double*, double** %3
%45 = load double, double* %44
%46 = fsub double 1.000000e+00, %45
%47 = fmul double 2.000000e+00, %46
%48 = load double, double* %6
%49 = fdiv double %47, %48
store double %49, double* %9
%50 = load double, double* %9
%51 = load double*, double** %4
store double %50, double* %51
ret void
}

LLVM IR (-O2):
define void @machine_params(double* nocapture %0, double* nocapture writeonly %1) {
store double 0x3CB0000000000000, double* %0
br label %5
3: ; preds = %5
%4 = fcmp ogt double %6, 0.000000e+00
br i1 %4, label %9, label %13
5: ; preds = %2, %5
%6 = phi double [ 1.000000e+00, %2 ], [ %7, %5 ]
%7 = fmul double %6, 3.125000e-02
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %5, label %3
9: ; preds = %3, %9
%10 = phi double [ %11, %9 ], [ %6, %3 ]
%11 = fmul double %10, 5.000000e-01
%12 = fcmp ogt double %11, 0.000000e+00
br i1 %12, label %9, label %13
13: ; preds = %9, %3
%14 = phi double [ %6, %3 ], [ %10, %9 ]
%15 = fmul double %14, 0x4330000000000000
%16 = fdiv double 0x3FFFFFFFFFFFFFFE, %15
store double %16, double* %1
ret void
}