#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 */
scalar_t__ approximateEqual(double, double);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, const char *argv[]) {
  for (double x = 1.0; x <= 2.0 || approximateEqual(x, 2.0); x += 0.1) {
    printf("%.1lf\n", x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x1,%al
movsd  0xebb(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x19(%rbp)
jae    1177 <main+0x57>
movsd  -0x18(%rbp),%xmm0
movsd  0xea0(%rip),%xmm1
call   1030 <approximateEqual@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1187 <main+0x67>
jmp    11af <main+0x8f>
movsd  -0x18(%rbp),%xmm0
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe70(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1143 <main+0x23>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movsd  0xed3(%rip),%xmm0
movsd  0xed3(%rip),%xmm1
lea    0xedc(%rip),%rbx
jmp    1164 <main+0x44>
xchg   %ax,%ax
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
call   1040 <printf@plt>
movsd  0xeb2(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
addsd  0xeac(%rip),%xmm0
ucomisd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
jae    1140 <main+0x20>
movsd  0x8(%rsp),%xmm0
movsd  0xe8a(%rip),%xmm1
call   1030 <approximateEqual@plt>
test   %rax,%rax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.1lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e+00, double* %6
br label %7
7: ; preds = %19, %2
%8 = load double, double* %6
%9 = fcmp ole double %8, 2.000000e+00
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = load double, double* %6
%12 = call i64 @approximateEqual(double %11, double 2.000000e+00)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ true, %7 ], [ %13, %10 ]
br i1 %15, label %16, label %22
16: ; preds = %14
%17 = load double, double* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %17)
br label %19
19: ; preds = %16
%20 = load double, double* %6
%21 = fadd double %20, 1.000000e-01
store double %21, double* %6
br label %7
22: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.1lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %10, %2
%4 = phi double [ 1.000000e+00, %2 ], [ %12, %10 ]
%5 = fcmp ugt double %4, 2.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 @approximateEqual(double %4, double 2.000000e+00)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
ret i32 0
10: ; preds = %3, %6
%11 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %4)
%12 = fadd double %4, 1.000000e-01
br label %3
}