#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*/ qFT(double);
int main(void) {
  double q = 0.0;
  for (; q <= 10; q += 0.5) {
    printf("q = %lf, qFT(q) = %lf\n", q, qFT(q));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec1(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1188 <main+0x68>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <qFT@plt>
movsd  -0x18(%rbp),%xmm0
mov    %eax,%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe8f(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1137 <main+0x17>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xorps  %xmm0,%xmm0
call   1040 <qFT@plt>
lea    0xf70(%rip),%rbx
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xebb(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xeab(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xea4(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xe94(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe8d(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xe7d(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe76(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xe66(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe5f(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xe4f(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe48(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xe38(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe31(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xe21(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe1a(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xe0a(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe03(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xdf3(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xdec(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xddc(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xdd5(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xdc5(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xdbe(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xdae(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xda7(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xd97(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xd90(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xd80(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xd79(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xd69(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xd62(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xd52(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xd4b(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xd3b(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xd34(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xd24(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xd1d(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xd0d(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xd06(%rip),%xmm0
call   1040 <qFT@plt>
mov    %rbx,%rdi
movsd  0xcf6(%rip),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"q = %lf, qFT(q) = %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
br label %3
3: ; preds = %11, %0
%4 = load double, double* %2
%5 = fcmp ole double %4, 1.000000e+01
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load double, double* %2
%8 = load double, double* %2
%9 = call i32 @qFT(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 = fadd double %12, 5.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, qFT(q) = %lf\0A\00"
define i32 @main() {
%1 = tail call i32 @qFT(double 0.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 0.000000e+00, i32 %1)
%3 = tail call i32 @qFT(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 @qFT(double 1.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, i32 %5)
%7 = tail call i32 @qFT(double 1.500000e+00)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 1.500000e+00, i32 %7)
%9 = tail call i32 @qFT(double 2.000000e+00)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 2.000000e+00, i32 %9)
%11 = tail call i32 @qFT(double 2.500000e+00)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 2.500000e+00, i32 %11)
%13 = tail call i32 @qFT(double 3.000000e+00)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, i32 %13)
%15 = tail call i32 @qFT(double 3.500000e+00)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 3.500000e+00, i32 %15)
%17 = tail call i32 @qFT(double 4.000000e+00)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 4.000000e+00, i32 %17)
%19 = tail call i32 @qFT(double 4.500000e+00)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 4.500000e+00, i32 %19)
%21 = tail call i32 @qFT(double 5.000000e+00)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, i32 %21)
%23 = tail call i32 @qFT(double 5.500000e+00)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 5.500000e+00, i32 %23)
%25 = tail call i32 @qFT(double 6.000000e+00)
%26 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 6.000000e+00, i32 %25)
%27 = tail call i32 @qFT(double 6.500000e+00)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 6.500000e+00, i32 %27)
%29 = tail call i32 @qFT(double 7.000000e+00)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 7.000000e+00, i32 %29)
%31 = tail call i32 @qFT(double 7.500000e+00)
%32 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 7.500000e+00, i32 %31)
%33 = tail call i32 @qFT(double 8.000000e+00)
%34 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 8.000000e+00, i32 %33)
%35 = tail call i32 @qFT(double 8.500000e+00)
%36 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 8.500000e+00, i32 %35)
%37 = tail call i32 @qFT(double 9.000000e+00)
%38 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 9.000000e+00, i32 %37)
%39 = tail call i32 @qFT(double 9.500000e+00)
%40 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 9.500000e+00, i32 %39)
%41 = tail call i32 @qFT(double 1.000000e+01)
%42 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), double 1.000000e+01, i32 %41)
ret i32 0
}