double createDouble(double intNeg, double intValue, double frcValue,
                    int frcDecimalCount) {
  static const double g_pow10[] = {1.0,
                                   0.1,
                                   0.01,
                                   0.001,
                                   0.0001,
                                   0.00001,
                                   0.000001,
                                   0.0000001,
                                   0.00000001,
                                   0.000000001,
                                   0.0000000001,
                                   0.00000000001,
                                   0.000000000001,
                                   0.0000000000001,
                                   0.00000000000001,
                                   0.000000000000001};
  return (intValue + (frcValue * g_pow10[frcDecimalCount])) * intNeg;
}


x86 assembly (clang, -O0):
<createDouble>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movslq -0x1c(%rbp),%rcx
lea    0xed5(%rip),%rax
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<createDouble>:
movslq %edi,%rax
lea    0xef6(%rip),%rcx
mulsd  (%rcx,%rax,8),%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
@createDouble.g_pow10 = internal constant [16 x double] [double 1.000000e+00, double 1.000000e-01, double 1.000000e-02, double 1.000000e-03, double 1.000000e-04, double 1.000000e-05, double 0x3EB0C6F7A0B5ED8D, double 0x3E7AD7F29ABCAF48, double 1.000000e-08, double 1.000000e-09, double 1.000000e-10, double 0x3DA5FD7FE1796495, double 0x3D719799812DEA11, double 1.000000e-13, double 0x3D06849B86A12B9B, double 1.000000e-15]
define double @createDouble(double %0, double %1, double %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%9 = load double, double* %6
%10 = load double, double* %7
%11 = load i32, i32* %8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [16 x double], [16 x double]* @createDouble.g_pow10, i64 0, i64 %12
%14 = load double, double* %13
%15 = call double @llvm.fmuladd.f64(double %10, double %14, double %9)
%16 = load double, double* %5
%17 = fmul double %15, %16
ret double %17
}

LLVM IR (-O2):
@createDouble.g_pow10 = internal unnamed_addr constant [16 x double] [double 1.000000e+00, double 1.000000e-01, double 1.000000e-02, double 1.000000e-03, double 1.000000e-04, double 1.000000e-05, double 0x3EB0C6F7A0B5ED8D, double 0x3E7AD7F29ABCAF48, double 1.000000e-08, double 1.000000e-09, double 1.000000e-10, double 0x3DA5FD7FE1796495, double 0x3D719799812DEA11, double 1.000000e-13, double 0x3D06849B86A12B9B, double 1.000000e-15]
define double @createDouble(double %0, double %1, double %2, i32 %3) {
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds [16 x double], [16 x double]* @createDouble.g_pow10, i64 0, i64 %5
%7 = load double, double* %6
%8 = tail call double @llvm.fmuladd.f64(double %2, double %7, double %1)
%9 = fmul double %8, %0
ret double %9
}