char *eng(double value, int places) {
  const char *const prefixes[] = {
      "\\yocto ", "\\zepto ", "\\atto ", "\\femto ", "\\pico ", "\\nano ",
      "\\micro ", "\\milli ", "",        "\\kilo ",  "\\mega ", "\\giga ",
      "\\tera ",  "\\peta ",  "\\exa ",  "\\zeta ",  "\\yotta "};
  int p = 8;
  static char result[30];
  char *res = result;
  *res++ = (value >= 0) ? ' ' : '-';
  value = (value >= 0) ? value : -value;
  for (; p > 0 && value != 0 && value < 1.0; --p)
    value *= 1000.0;
  for (; p < 14 && value != 0 && value > 1000.0; ++p)
    value /= 1000.0;
  places = (value >= 100.0)  ? places - 2
           : (value >= 10.0) ? places - 1
                             : places;
  sprintf(res, "%.*f %s", places - 1, value, prefixes[p]);
  return result;
}


x86 assembly (clang, -O0):
<eng>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0x2c4f(%rip),%rsi
mov    $0x88,%edx
call   1030 <memcpy@plt>
movl   $0x8,-0xa4(%rbp)
lea    0x2ee4(%rip),%rax
mov    %rax,-0xb0(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    $0x2d,%eax
mov    $0x20,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
mov    %al,%cl
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %cl,(%rax)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b9 <eng+0x99>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    11dd <eng+0xbd>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xa4(%rbp)
mov    %al,-0xb9(%rbp)
jle    123a <eng+0x11a>
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xb9(%rbp)
jne    1224 <eng+0x104>
jp     1224 <eng+0x104>
jmp    123a <eng+0x11a>
movsd  0xdd4(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
mov    %al,-0xb9(%rbp)
mov    -0xb9(%rbp),%al
test   $0x1,%al
jne    124d <eng+0x12d>
jmp    1273 <eng+0x153>
movsd  0xdb3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0xa4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa4(%rbp)
jmp    11ea <eng+0xca>
jmp    1278 <eng+0x158>
xor    %eax,%eax
cmpl   $0xe,-0xa4(%rbp)
mov    %al,-0xba(%rbp)
jge    12cc <eng+0x1ac>
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xba(%rbp)
jne    12b2 <eng+0x192>
jp     12b2 <eng+0x192>
jmp    12cc <eng+0x1ac>
movsd  -0x8(%rbp),%xmm0
movsd  0xd49(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0xba(%rbp)
mov    -0xba(%rbp),%al
test   $0x1,%al
jne    12df <eng+0x1bf>
jmp    1309 <eng+0x1e9>
movsd  -0x8(%rbp),%xmm0
movsd  0xd1c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1278 <eng+0x158>
movsd  -0x8(%rbp),%xmm0
movsd  0xcfa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1331 <eng+0x211>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc0(%rbp)
jmp    136e <eng+0x24e>
movsd  -0x8(%rbp),%xmm0
movsd  0xcda(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1359 <eng+0x239>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1362 <eng+0x242>
mov    -0xc(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xb0(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
movsd  -0x8(%rbp),%xmm0
movslq -0xa4(%rbp),%rax
mov    -0xa0(%rbp,%rax,8),%rcx
ff
lea    0xcf6(%rip),%rsi
mov    $0x1,%al
call   1040 <sprintf@plt>
lea    0x2c93(%rip),%rax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eng>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    $0x20,%eax
mov    $0x2d,%ecx
cmovae %eax,%ecx
mov    %cl,0x2f14(%rip)
jae    1136 <eng+0x26>
xorpd  0xeca(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    $0x8,%eax
jne    1147 <eng+0x37>
jnp    125b <eng+0x14b>
movsd  0xec1(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    125b <eng+0x14b>
mulsd  0xeb7(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
mov    $0x7,%eax
jne    1176 <eng+0x66>
jnp    125b <eng+0x14b>
ucomisd %xmm0,%xmm1
jbe    125b <eng+0x14b>
mulsd  0xe90(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
mov    $0x6,%eax
jne    119d <eng+0x8d>
jnp    125b <eng+0x14b>
ucomisd %xmm0,%xmm1
jbe    125b <eng+0x14b>
mulsd  0xe69(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
mov    $0x5,%eax
jne    11c4 <eng+0xb4>
jnp    125b <eng+0x14b>
ucomisd %xmm0,%xmm1
jbe    125b <eng+0x14b>
mulsd  0xe42(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
mov    $0x4,%eax
jne    11e7 <eng+0xd7>
jnp    125b <eng+0x14b>
ucomisd %xmm0,%xmm1
jbe    125b <eng+0x14b>
mulsd  0xe23(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
mov    $0x3,%eax
jne    1206 <eng+0xf6>
jnp    125b <eng+0x14b>
ucomisd %xmm0,%xmm1
jbe    125b <eng+0x14b>
mulsd  0xe04(%rip),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
mov    $0x2,%eax
jne    1225 <eng+0x115>
jnp    125b <eng+0x14b>
ucomisd %xmm0,%xmm1
jbe    125b <eng+0x14b>
movsd  0xde5(%rip),%xmm2
mulsd  %xmm2,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
setp   %al
setne  %cl
or     %al,%cl
ucomisd %xmm0,%xmm1
seta   %al
and    %cl,%al
je     1256 <eng+0x146>
mulsd  %xmm2,%xmm0
xor    $0x1,%al
movzbl %al,%eax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1267 <eng+0x157>
jnp    129c <eng+0x18c>
ucomisd 0xda9(%rip),%xmm0
jbe    129c <eng+0x18c>
movsd  0xd9f(%rip),%xmm1
xorpd  %xmm2,%xmm2
nopl   (%rax)
mov    %eax,%ecx
divsd  %xmm1,%xmm0
lea    0x1(%rcx),%eax
cmp    $0xc,%ecx
ja     129c <eng+0x18c>
ucomisd %xmm2,%xmm0
jne    1296 <eng+0x186>
jnp    129c <eng+0x18c>
ucomisd %xmm1,%xmm0
ja     1280 <eng+0x170>
xor    %ecx,%ecx
ucomisd 0xd7a(%rip),%xmm0
adc    $0xffffffff,%ecx
ucomisd 0xd77(%rip),%xmm0
mov    $0xfffffffe,%edx
cmovb  %ecx,%edx
add    %edi,%edx
add    $0xffffffff,%edx
cltq
lea    0xde9(%rip),%rsi
movslq (%rsi,%rax,4),%rcx
add    %rsi,%rcx
lea    0x2d6c(%rip),%rdi
lea    0xdc9(%rip),%rsi
mov    $0x1,%al
call   1030 <sprintf@plt>
lea    0x2d56(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\\yocto \00"
@.str.1 = [8 x i8] c"\\zepto \00"
@.str.2 = [7 x i8] c"\\atto \00"
@.str.3 = [8 x i8] c"\\femto \00"
@.str.4 = [7 x i8] c"\\pico \00"
@.str.5 = [7 x i8] c"\\nano \00"
@.str.6 = [8 x i8] c"\\micro \00"
@.str.7 = [8 x i8] c"\\milli \00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [7 x i8] c"\\kilo \00"
@.str.10 = [7 x i8] c"\\mega \00"
@.str.11 = [7 x i8] c"\\giga \00"
@.str.12 = [7 x i8] c"\\tera \00"
@.str.13 = [7 x i8] c"\\peta \00"
@.str.14 = [6 x i8] c"\\exa \00"
@.str.15 = [7 x i8] c"\\zeta \00"
@.str.16 = [8 x i8] c"\\yotta \00"
@__const.eng.prefixes = [17 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i32 0, i32 0)]
@eng.result = internal global [30 x i8] zeroinitializer
@.str.17 = [8 x i8] c"%.*f %s\00"
define i8* @eng(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca [17 x i8*]
%6 = alloca i32
%7 = alloca i8*
store double %0, double* %3
store i32 %1, i32* %4
%8 = bitcast [17 x i8*]* %5 to i8*
store i32 8, i32* %6
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @eng.result, i64 0, i64 0), i8** %7
%9 = load double, double* %3
%10 = fcmp oge double %9, 0.000000e+00
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 32, i32 45
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %7
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %7
store i8 %13, i8* %14
%16 = load double, double* %3
%17 = fcmp oge double %16, 0.000000e+00
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = load double, double* %3
br label %23
20: ; preds = %2
%21 = load double, double* %3
%22 = fneg double %21
br label %23
23: ; preds = %20, %18
%24 = phi double [ %19, %18 ], [ %22, %20 ]
store double %24, double* %3
br label %25
25: ; preds = %39, %23
%26 = load i32, i32* %6
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %25
%29 = load double, double* %3
%30 = fcmp une double %29, 0.000000e+00
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load double, double* %3
%33 = fcmp olt double %32, 1.000000e+00
br label %34
34: ; preds = %31, %28, %25
%35 = phi i1 [ false, %28 ], [ false, %25 ], [ %33, %31 ]
br i1 %35, label %36, label %42
36: ; preds = %34
%37 = load double, double* %3
%38 = fmul double %37, 1.000000e+03
store double %38, double* %3
br label %39
39: ; preds = %36
%40 = load i32, i32* %6
%41 = add nsw i32 %40, -1
store i32 %41, i32* %6
br label %25
42: ; preds = %34
br label %43
43: ; preds = %57, %42
%44 = load i32, i32* %6
%45 = icmp slt i32 %44, 14
br i1 %45, label %46, label %52
46: ; preds = %43
%47 = load double, double* %3
%48 = fcmp une double %47, 0.000000e+00
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = load double, double* %3
%51 = fcmp ogt double %50, 1.000000e+03
br label %52
52: ; preds = %49, %46, %43
%53 = phi i1 [ false, %46 ], [ false, %43 ], [ %51, %49 ]
br i1 %53, label %54, label %60
54: ; preds = %52
%55 = load double, double* %3
%56 = fdiv double %55, 1.000000e+03
store double %56, double* %3
br label %57
57: ; preds = %54
%58 = load i32, i32* %6
%59 = add nsw i32 %58, 1
store i32 %59, i32* %6
br label %43
60: ; preds = %52
%61 = load double, double* %3
%62 = fcmp oge double %61, 1.000000e+02
br i1 %62, label %63, label %66
63: ; preds = %60
%64 = load i32, i32* %4
%65 = sub nsw i32 %64, 2
br label %76
66: ; preds = %60
%67 = load double, double* %3
%68 = fcmp oge double %67, 1.000000e+01
br i1 %68, label %69, label %72
69: ; preds = %66
%70 = load i32, i32* %4
%71 = sub nsw i32 %70, 1
br label %74
72: ; preds = %66
%73 = load i32, i32* %4
br label %74
74: ; preds = %72, %69
%75 = phi i32 [ %71, %69 ], [ %73, %72 ]
br label %76
76: ; preds = %74, %63
%77 = phi i32 [ %65, %63 ], [ %75, %74 ]
store i32 %77, i32* %4
%78 = load i8*, i8** %7
%79 = load i32, i32* %4
%80 = sub nsw i32 %79, 1
%81 = load double, double* %3
%82 = load i32, i32* %6
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [17 x i8*], [17 x i8*]* %5, i64 0, i64 %83
%85 = load i8*, i8** %84
%86 = call i32 (i8*, i8*, ...) @sprintf(i8* %78, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i32 %80, double %81, i8* %85)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @eng.result, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"\\yocto \00"
@.str.1 = [8 x i8] c"\\zepto \00"
@.str.2 = [7 x i8] c"\\atto \00"
@.str.3 = [8 x i8] c"\\femto \00"
@.str.4 = [7 x i8] c"\\pico \00"
@.str.5 = [7 x i8] c"\\nano \00"
@.str.6 = [8 x i8] c"\\micro \00"
@.str.7 = [8 x i8] c"\\milli \00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [7 x i8] c"\\kilo \00"
@.str.10 = [7 x i8] c"\\mega \00"
@.str.11 = [7 x i8] c"\\giga \00"
@.str.12 = [7 x i8] c"\\tera \00"
@.str.13 = [7 x i8] c"\\peta \00"
@.str.14 = [6 x i8] c"\\exa \00"
@.str.15 = [7 x i8] c"\\zeta \00"
@.str.16 = [8 x i8] c"\\yotta \00"
@reltable.eng = [17 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.3 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.4 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.5 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.6 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([1 x i8]* @.str.8 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.9 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.10 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.11 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.12 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.13 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.14 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.15 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.16 to i64), i64 ptrtoint ([17 x i32]* @reltable.eng to i64)) to i32)]
@eng.result = internal global [30 x i8] zeroinitializer
@.str.17 = [8 x i8] c"%.*f %s\00"
define i8* @eng(double %0, i32 %1) {
%3 = fcmp oge double %0, 0.000000e+00
%4 = select i1 %3, i8 32, i8 45
store i8 %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @eng.result, i64 0, i64 0)
%5 = fneg double %0
%6 = select i1 %3, double %0, double %5
%7 = fcmp une double %6, 0.000000e+00
%8 = fcmp olt double %6, 1.000000e+00
%9 = and i1 %7, %8
br i1 %9, label %16, label %10
10: ; preds = %46, %16, %21, %26, %31, %36, %41, %2
%11 = phi double [ %6, %2 ], [ %17, %16 ], [ %22, %21 ], [ %27, %26 ], [ %32, %31 ], [ %37, %36 ], [ %42, %41 ], [ %52, %46 ]
%12 = phi i32 [ 8, %2 ], [ 7, %16 ], [ 6, %21 ], [ 5, %26 ], [ 4, %31 ], [ 3, %36 ], [ 2, %41 ], [ %53, %46 ]
%13 = fcmp une double %11, 0.000000e+00
%14 = fcmp ogt double %11, 1.000000e+03
%15 = and i1 %13, %14
br i1 %15, label %54, label %64
16: ; preds = %2
%17 = fmul double %6, 1.000000e+03
%18 = fcmp une double %17, 0.000000e+00
%19 = fcmp olt double %17, 1.000000e+00
%20 = and i1 %18, %19
br i1 %20, label %21, label %10
21: ; preds = %16
%22 = fmul double %17, 1.000000e+03
%23 = fcmp une double %22, 0.000000e+00
%24 = fcmp olt double %22, 1.000000e+00
%25 = and i1 %23, %24
br i1 %25, label %26, label %10
26: ; preds = %21
%27 = fmul double %22, 1.000000e+03
%28 = fcmp une double %27, 0.000000e+00
%29 = fcmp olt double %27, 1.000000e+00
%30 = and i1 %28, %29
br i1 %30, label %31, label %10
31: ; preds = %26
%32 = fmul double %27, 1.000000e+03
%33 = fcmp une double %32, 0.000000e+00
%34 = fcmp olt double %32, 1.000000e+00
%35 = and i1 %33, %34
br i1 %35, label %36, label %10
36: ; preds = %31
%37 = fmul double %32, 1.000000e+03
%38 = fcmp une double %37, 0.000000e+00
%39 = fcmp olt double %37, 1.000000e+00
%40 = and i1 %38, %39
br i1 %40, label %41, label %10
41: ; preds = %36
%42 = fmul double %37, 1.000000e+03
%43 = fcmp une double %42, 0.000000e+00
%44 = fcmp olt double %42, 1.000000e+00
%45 = and i1 %43, %44
br i1 %45, label %46, label %10
46: ; preds = %41
%47 = fmul double %42, 1.000000e+03
%48 = fcmp une double %47, 0.000000e+00
%49 = fcmp olt double %47, 1.000000e+00
%50 = and i1 %48, %49
%51 = fmul double %47, 1.000000e+03
%52 = select i1 %50, double %51, double %47
%53 = select i1 %50, i32 0, i32 1
br label %10
54: ; preds = %10, %54
%55 = phi i32 [ %58, %54 ], [ %12, %10 ]
%56 = phi double [ %57, %54 ], [ %11, %10 ]
%57 = fdiv double %56, 1.000000e+03
%58 = add nuw nsw i32 %55, 1
%59 = icmp ult i32 %55, 13
%60 = fcmp une double %57, 0.000000e+00
%61 = select i1 %59, i1 %60, i1 false
%62 = fcmp ogt double %57, 1.000000e+03
%63 = select i1 %61, i1 %62, i1 false
br i1 %63, label %54, label %64
64: ; preds = %54, %10
%65 = phi double [ %11, %10 ], [ %57, %54 ]
%66 = phi i32 [ %12, %10 ], [ %58, %54 ]
%67 = fcmp ult double %65, 1.000000e+02
%68 = fcmp oge double %65, 1.000000e+01
%69 = sext i1 %68 to i32
%70 = select i1 %67, i32 %69, i32 -2
%71 = add i32 %1, -1
%72 = add i32 %71, %70
%73 = sext i32 %66 to i64
%74 = shl i64 %73, 2
%75 = call i8* @llvm.load.relative.i64(i8* bitcast ([17 x i32]* @reltable.eng to i8*), i64 %74)
%76 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @eng.result, i64 0, i64 1), i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i32 %72, double %65, i8* %75)
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @eng.result, i64 0, i64 0)
}