#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 */
int /*<<< orphan*/ printf(char *, double, int /*<<< orphan*/);
int /*<<< orphan*/ qCF(double);
int main(void) {
  double q = 5.0;
  for (; q <= 50000; q *= 10) {
    printf("q = %lf, qCF(q) = %lf\n", q, qCF(q));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     118d <main+0x6d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <qCF@plt>
movsd  -0x18(%rbp),%xmm0
mov    %eax,%esi
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe92(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113c <main+0x1c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xed7(%rip),%xmm0
call   1030 <qCF@plt>
lea    0xef3(%rip),%rbx
mov    %rbx,%rdi
movsd  0xec0(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xeb9(%rip),%xmm0
call   1030 <qCF@plt>
mov    %rbx,%rdi
movsd  0xea9(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xea2(%rip),%xmm0
call   1030 <qCF@plt>
mov    %rbx,%rdi
movsd  0xe92(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe8b(%rip),%xmm0
call   1030 <qCF@plt>
mov    %rbx,%rdi
movsd  0xe7b(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe74(%rip),%xmm0
call   1030 <qCF@plt>
mov    %rbx,%rdi
movsd  0xe64(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"q = %lf, qCF(q) = %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 5.000000e+00, double* %2
br label %3
3: ; preds = %11, %0
%4 = load double, double* %2
%5 = fcmp ole double %4, 5.000000e+04
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load double, double* %2
%8 = load double, double* %2
%9 = call i32 @qCF(double %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double %7, i32 %9)
br label %11
11: ; preds = %6
%12 = load double, double* %2
%13 = fmul double %12, 1.000000e+01
store double %13, double* %2
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"q = %lf, qCF(q) = %lf\0A\00"
define i32 @main() {
%1 = tail call i32 @qCF(double 5.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, i32 %1)
%3 = tail call i32 @qCF(double 5.000000e+01)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 5.000000e+01, i32 %3)
%5 = tail call i32 @qCF(double 5.000000e+02)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 5.000000e+02, i32 %5)
%7 = tail call i32 @qCF(double 5.000000e+03)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 5.000000e+03, i32 %7)
%9 = tail call i32 @qCF(double 5.000000e+04)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 5.000000e+04, i32 %9)
ret i32 0
}