#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 *, float, float);
int main(void) {
  float x = 0.0;
  float y = 0.0;
  int i = 0;
  for (x = 0.0; x <= 1.0; x += 0.01) {
    y = i / 100.0;
    i++;
    printf("x = %f\tx = %f\n", x, y);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     11b5 <main+0xa5>
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xea2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe6d(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113e <main+0x2e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xorps  %xmm0,%xmm0
xor    %ebp,%ebp
lea    0xef5(%rip),%rbx
nop
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
divsd  0xec5(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
add    $0x1,%ebp
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xeb1(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0xead(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"x = %f\09x = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
store i32 0, i32* %4
store float 0.000000e+00, float* %2
br label %5
5: ; preds = %19, %0
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fcmp ole double %7, 1.000000e+00
br i1 %8, label %9, label %24
9: ; preds = %5
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = fdiv double %11, 1.000000e+02
%13 = fptrunc double %12 to float
store float %13, float* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
%16 = load float, float* %2
%17 = load float, float* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), float %16, float %17)
br label %19
19: ; preds = %9
%20 = load float, float* %2
%21 = fpext float %20 to double
%22 = fadd double %21, 1.000000e-02
%23 = fptrunc double %22 to float
store float %23, float* %2
br label %5
24: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"x = %f\09x = %f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %8, %1 ]
%3 = phi float [ 0.000000e+00, %0 ], [ %11, %1 ]
%4 = fpext float %3 to double
%5 = sitofp i32 %2 to double
%6 = fdiv double %5, 1.000000e+02
%7 = fptrunc double %6 to float
%8 = add nuw nsw i32 %2, 1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), float %3, float %7)
%10 = fadd double %4, 1.000000e-02
%11 = fptrunc double %10 to float
%12 = fcmp ugt float %11, 1.000000e+00
br i1 %12, label %13, label %1
13: ; preds = %1
ret i32 0
}