#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 *, int, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double a, b, ar[100];
  int i;
  scanf("%lf", &a);
  for (i = 0; i < 100; i++) {
    printf("N[%d] = %.4lf\n", i, a);
    a = a / 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x350,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecf(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x344(%rbp)
cmpl   $0x64,-0x344(%rbp)
jge    119a <main+0x7a>
mov    -0x344(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe83(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x344(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x344(%rbp)
jmp    114c <main+0x2c>
xor    %eax,%eax
add    $0x350,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xedd(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
xor    %ebx,%ebx
movsd  (%rsp),%xmm0
lea    0xecb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
mulsd  0xe99(%rip),%xmm0
movsd  %xmm0,(%rsp)
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [15 x i8] c"N[%d] = %.4lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca [100 x double]
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
store i32 0, i32* %5
br label %7
7: ; preds = %16, %0
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 100
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i32, i32* %5
%12 = load double, double* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %11, double %12)
%14 = load double, double* %2
%15 = fdiv double %14, 2.000000e+00
store double %15, double* %2
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %7
19: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [15 x i8] c"N[%d] = %.4lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
br label %5
5: ; preds = %0, %5
%6 = phi double [ %4, %0 ], [ %10, %5 ]
%7 = phi i32 [ 0, %0 ], [ %11, %5 ]
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %7, double %6)
%9 = load double, double* %1
%10 = fmul double %9, 5.000000e-01
store double %10, double* %1
%11 = add nuw nsw i32 %7, 1
%12 = icmp eq i32 %11, 100
br i1 %12, label %13, label %5
13: ; preds = %5
ret i32 0
}