#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);
int /*<<< orphan*/ putchar(char);
int main(void) {
  float x = 0.0F;
  double y = 0.0;
  long double z = 0.0L;
  int i = 0;
  for (; x <= 1.0; x += 0.01) {
    printf("x = %f\n", x);
  }
  putchar('\n');
  for (; i <= 100; i++) {
    x = i / 100.0;
    printf("x = %f\n", x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
fldz
fstpt  -0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea5(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1199 <main+0x79>
movss  -0x8(%rbp),%xmm0
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe89(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    114a <main+0x2a>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x64,-0x24(%rbp)
jg     11e6 <main+0xc6>
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  0xe4e(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xe45(%rip),%rdi
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a3 <main+0x83>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xorps  %xmm0,%xmm0
lea    0xeef(%rip),%rbx
nopl   (%rax)
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xeaf(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0xebb(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1130 <main+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
xorps  %xmm0,%xmm0
mov    $0x65,%ebp
lea    0xea1(%rip),%rbx
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
divsd  0xe76(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xe65(%rip),%xmm0
add    $0xffffffff,%ebp
jne    1180 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

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