void testFunctionConstant() {
  double zero = 0.0;
  UnitTest_expect_eq_double((0.0), (Function_constant(123.0, &zero)), (0.0),
                            __func__, 13);
  double one = 1.0;
  UnitTest_expect_eq_double((1.0), (Function_constant(27.0, &one)), (0.0),
                            __func__, 16);
}


x86 assembly (clang, -O0):
<testFunctionConstant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed8(%rip),%xmm0
lea    -0x8(%rbp),%rdi
mov    $0x1,%al
call   1030 <Function_constant@plt>
mov    %eax,%edi
xorps  %xmm1,%xmm1
lea    0xec9(%rip),%rsi
mov    $0xd,%edx
movaps %xmm1,%xmm0
mov    $0x2,%al
call   1040 <UnitTest_expect_eq_double@plt>
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe95(%rip),%xmm0
lea    -0x10(%rbp),%rdi
mov    $0x1,%al
call   1030 <Function_constant@plt>
mov    %eax,%edi
movsd  0xe78(%rip),%xmm0
xorps  %xmm1,%xmm1
lea    0xe86(%rip),%rsi
mov    $0x10,%edx
mov    $0x2,%al
call   1040 <UnitTest_expect_eq_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFunctionConstant>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
movsd  0xeca(%rip),%xmm0
lea    0x8(%rsp),%rdi
mov    $0x1,%al
call   1030 <Function_constant@plt>
lea    0xecf(%rip),%rbx
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0xd,%edx
mov    $0x2,%al
call   1040 <UnitTest_expect_eq_double@plt>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rsp)
movsd  0xe92(%rip),%xmm0
mov    %rsp,%rdi
mov    $0x1,%al
call   1030 <Function_constant@plt>
movsd  0xe88(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0x10,%edx
mov    $0x2,%al
call   1040 <UnitTest_expect_eq_double@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__func__.testFunctionConstant = [21 x i8] c"testFunctionConstant\00"
define void @testFunctionConstant() {
%1 = alloca double
%2 = alloca double
store double 0.000000e+00, double* %1
%3 = call i32 (double, double*, ...) bitcast (i32 (...)* @Function_constant to i32 (double, double*, ...)*)(double 1.230000e+02, double* %1)
%4 = call i32 (double, i32, double, i8*, i32, ...) bitcast (i32 (...)* @UnitTest_expect_eq_double to i32 (double, i32, double, i8*, i32, ...)*)(double 0.000000e+00, i32 %3, double 0.000000e+00, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.testFunctionConstant, i64 0, i64 0), i32 13)
store double 1.000000e+00, double* %2
%5 = call i32 (double, double*, ...) bitcast (i32 (...)* @Function_constant to i32 (double, double*, ...)*)(double 2.700000e+01, double* %2)
%6 = call i32 (double, i32, double, i8*, i32, ...) bitcast (i32 (...)* @UnitTest_expect_eq_double to i32 (double, i32, double, i8*, i32, ...)*)(double 1.000000e+00, i32 %5, double 0.000000e+00, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.testFunctionConstant, i64 0, i64 0), i32 16)
ret void
}

LLVM IR (-O2):
@__func__.testFunctionConstant = [21 x i8] c"testFunctionConstant\00"
define void @testFunctionConstant() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%4 = call i32 (double, double*, ...) bitcast (i32 (...)* @Function_constant to i32 (double, double*, ...)*)(double 1.230000e+02, double* %1)
%5 = call i32 (double, i32, double, i8*, i32, ...) bitcast (i32 (...)* @UnitTest_expect_eq_double to i32 (double, i32, double, i8*, i32, ...)*)(double 0.000000e+00, i32 %4, double 0.000000e+00, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.testFunctionConstant, i64 0, i64 0), i32 13)
%6 = bitcast double* %2 to i8*
store double 1.000000e+00, double* %2
%7 = call i32 (double, double*, ...) bitcast (i32 (...)* @Function_constant to i32 (double, double*, ...)*)(double 2.700000e+01, double* %2)
%8 = call i32 (double, i32, double, i8*, i32, ...) bitcast (i32 (...)* @UnitTest_expect_eq_double to i32 (double, i32, double, i8*, i32, ...)*)(double 1.000000e+00, i32 %7, double 0.000000e+00, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.testFunctionConstant, i64 0, i64 0), i32 16)
ret void
}