#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 */
double modf(double, double *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 0;
  while (1) {
    i++;
    printf("%i\n", i);
    double d;
    if (modf((double)i * 0.875, &d) != 0.0)
      continue;
    if (modf((double)i * 0.8, &d) != 0.0)
      continue;
    if (modf((double)i * 0.72, &d) != 0.0)
      continue;
    if (modf((double)i * 0.64, &d) != 0.0)
      continue;
    if (modf((double)i * 0.5, &d) != 0.0)
      continue;
    if (modf((double)i * 0.4, &d) != 0.0)
      continue;
    if (modf((double)i * 0.32, &d) != 0.0)
      continue;
    if (modf((double)i * 0.25, &d) != 0.0)
      continue;
    if (modf((double)i * 0.2, &d) != 0.0)
      continue;
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeff(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xea5(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1180 <main+0x60>
jp     1180 <main+0x60>
jmp    1185 <main+0x65>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe76(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11b7 <main+0x97>
jp     11b7 <main+0x97>
jmp    11bc <main+0x9c>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe47(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11ee <main+0xce>
jp     11ee <main+0xce>
jmp    11f3 <main+0xd3>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xe18(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1225 <main+0x105>
jp     1225 <main+0x105>
jmp    122a <main+0x10a>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xde9(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    125c <main+0x13c>
jp     125c <main+0x13c>
jmp    1261 <main+0x141>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xdba(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1293 <main+0x173>
jp     1293 <main+0x173>
jmp    1298 <main+0x178>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xd8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12ca <main+0x1aa>
jp     12ca <main+0x1aa>
jmp    12cf <main+0x1af>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xd5c(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1301 <main+0x1e1>
jp     1301 <main+0x1e1>
jmp    1306 <main+0x1e6>
jmp    1136 <main+0x16>
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xd2d(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    -0x10(%rbp),%rdi
call   1040 <modf@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1338 <main+0x218>
jp     1338 <main+0x218>
jmp    133d <main+0x21d>
jmp    1136 <main+0x16>
jmp    1342 <main+0x222>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%ebx
lea    0xf1b(%rip),%r14
lea    0x8(%rsp),%r15
jmp    1143 <main+0x23>
nopl   0x0(%rax)
add    $0x1,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,(%rsp)
mulsd  0xe9f(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xe86(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xeb6(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xe6d(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xe95(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xe54(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xe74(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xe33(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xe4b(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xe12(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xe22(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xdf1(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xdf9(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xdd0(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xdd0(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
movsd  (%rsp),%xmm0
mulsd  0xdaf(%rip),%xmm0
mov    %r15,%rdi
call   1040 <modf@plt>
ucomisd 0xda7(%rip),%xmm0
jne    1140 <main+0x20>
jp     1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %0, %14, %21, %28, %35, %42, %49, %56, %63, %70
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 8.750000e-01
%12 = call double @modf(double %11, double* %3)
%13 = fcmp une double %12, 0.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %4
br label %4
15: ; preds = %4
%16 = load i32, i32* %2
%17 = sitofp i32 %16 to double
%18 = fmul double %17, 8.000000e-01
%19 = call double @modf(double %18, double* %3)
%20 = fcmp une double %19, 0.000000e+00
br i1 %20, label %21, label %22
21: ; preds = %15
br label %4
22: ; preds = %15
%23 = load i32, i32* %2
%24 = sitofp i32 %23 to double
%25 = fmul double %24, 0x3FE70A3D70A3D70A
%26 = call double @modf(double %25, double* %3)
%27 = fcmp une double %26, 0.000000e+00
br i1 %27, label %28, label %29
28: ; preds = %22
br label %4
29: ; preds = %22
%30 = load i32, i32* %2
%31 = sitofp i32 %30 to double
%32 = fmul double %31, 6.400000e-01
%33 = call double @modf(double %32, double* %3)
%34 = fcmp une double %33, 0.000000e+00
br i1 %34, label %35, label %36
35: ; preds = %29
br label %4
36: ; preds = %29
%37 = load i32, i32* %2
%38 = sitofp i32 %37 to double
%39 = fmul double %38, 5.000000e-01
%40 = call double @modf(double %39, double* %3)
%41 = fcmp une double %40, 0.000000e+00
br i1 %41, label %42, label %43
42: ; preds = %36
br label %4
43: ; preds = %36
%44 = load i32, i32* %2
%45 = sitofp i32 %44 to double
%46 = fmul double %45, 4.000000e-01
%47 = call double @modf(double %46, double* %3)
%48 = fcmp une double %47, 0.000000e+00
br i1 %48, label %49, label %50
49: ; preds = %43
br label %4
50: ; preds = %43
%51 = load i32, i32* %2
%52 = sitofp i32 %51 to double
%53 = fmul double %52, 3.200000e-01
%54 = call double @modf(double %53, double* %3)
%55 = fcmp une double %54, 0.000000e+00
br i1 %55, label %56, label %57
56: ; preds = %50
br label %4
57: ; preds = %50
%58 = load i32, i32* %2
%59 = sitofp i32 %58 to double
%60 = fmul double %59, 2.500000e-01
%61 = call double @modf(double %60, double* %3)
%62 = fcmp une double %61, 0.000000e+00
br i1 %62, label %63, label %64
63: ; preds = %57
br label %4
64: ; preds = %57
%65 = load i32, i32* %2
%66 = sitofp i32 %65 to double
%67 = fmul double %66, 2.000000e-01
%68 = call double @modf(double %67, double* %3)
%69 = fcmp une double %68, 0.000000e+00
br i1 %69, label %70, label %71
70: ; preds = %64
br label %4
71: ; preds = %64
br label %72
72: ; preds = %71
%73 = load i32, i32* %1
ret i32 %73
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
br label %3
3: ; preds = %43, %0
%4 = phi i32 [ 0, %0 ], [ %5, %43 ]
%5 = add nuw nsw i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = sitofp i32 %5 to double
%8 = fmul double %7, 8.750000e-01
%9 = call double @modf(double %8, double* %1)
%10 = fcmp une double %9, 0.000000e+00
br i1 %10, label %43, label %11
11: ; preds = %3
%12 = fmul double %7, 8.000000e-01
%13 = call double @modf(double %12, double* %1)
%14 = fcmp une double %13, 0.000000e+00
br i1 %14, label %43, label %15
15: ; preds = %11
%16 = fmul double %7, 0x3FE70A3D70A3D70A
%17 = call double @modf(double %16, double* %1)
%18 = fcmp une double %17, 0.000000e+00
br i1 %18, label %43, label %19
19: ; preds = %15
%20 = fmul double %7, 6.400000e-01
%21 = call double @modf(double %20, double* %1)
%22 = fcmp une double %21, 0.000000e+00
br i1 %22, label %43, label %23
23: ; preds = %19
%24 = fmul double %7, 5.000000e-01
%25 = call double @modf(double %24, double* %1)
%26 = fcmp une double %25, 0.000000e+00
br i1 %26, label %43, label %27
27: ; preds = %23
%28 = fmul double %7, 4.000000e-01
%29 = call double @modf(double %28, double* %1)
%30 = fcmp une double %29, 0.000000e+00
br i1 %30, label %43, label %31
31: ; preds = %27
%32 = fmul double %7, 3.200000e-01
%33 = call double @modf(double %32, double* %1)
%34 = fcmp une double %33, 0.000000e+00
br i1 %34, label %43, label %35
35: ; preds = %31
%36 = fmul double %7, 2.500000e-01
%37 = call double @modf(double %36, double* %1)
%38 = fcmp une double %37, 0.000000e+00
br i1 %38, label %43, label %39
39: ; preds = %35
%40 = fmul double %7, 2.000000e-01
%41 = call double @modf(double %40, double* %1)
%42 = fcmp une double %41, 0.000000e+00
br i1 %42, label %43, label %44
43: ; preds = %39, %35, %31, %27, %23, %19, %15, %11, %3
br label %3
44: ; preds = %39
ret i32 0
}