#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 floor(float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a = 0, nf[3];
  int i = 0, ni[3];
  while (i < 4) {
    printf("Enter a Number: ");
    scanf("%f", &a);
    if (a >= 0 && a <= 20.00) {
      nf[i] = a;
      ni[i] = floor(a);
      i++;
    } else
      printf("A should be in between 0 to 20.00 \nTry Again\n");
  }
  for (i = 0; i < 4; i++) {
    while (ni[i]-- > 0)
      printf("  * \t");
    printf("%.2f \n", nf[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    11e6 <main+0xb6>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     11d3 <main+0xa3>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe68(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     11d3 <main+0xa3>
movss  -0x8(%rbp),%xmm0
movslq -0x18(%rbp),%rax
movss  %xmm0,-0x14(%rbp,%rax,4)
movss  -0x8(%rbp),%xmm0
call   1050 <floor@plt>
mov    %eax,%ecx
movslq -0x18(%rbp),%rax
mov    %ecx,-0x24(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11e1 <main+0xb1>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    114e <main+0x1e>
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    1253 <main+0x123>
jmp    11fc <main+0xcc>
movslq -0x18(%rbp),%rcx
mov    -0x24(%rbp,%rcx,4),%eax
mov    %eax,%edx
add    $0xffffffff,%edx
mov    %edx,-0x24(%rbp,%rcx,4)
cmp    $0x0,%eax
jle    1229 <main+0xf9>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fc <main+0xcc>
movslq -0x18(%rbp),%rax
movss  -0x14(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe12(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11ed <main+0xbd>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movl   $0x0,0xc(%rsp)
lea    0xeab(%rip),%r14
lea    0xeb5(%rip),%r15
lea    0xc(%rsp),%r13
lea    0xeb9(%rip),%r12
xor    %ebx,%ebx
jmp    118d <main+0x4d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
call   1030 <puts@plt>
cmp    $0x4,%ebx
jge    11d8 <main+0x98>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
ucomiss 0xe55(%rip),%xmm0
jb     1180 <main+0x40>
movss  0xe47(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1180 <main+0x40>
movslq %ebx,%rbx
movss  %xmm0,0x1c(%rsp,%rbx,4)
call   1060 <floor@plt>
mov    %eax,0x10(%rsp,%rbx,4)
add    $0x1,%ebx
cmp    $0x4,%ebx
jl     118d <main+0x4d>
mov    0x10(%rsp),%ebp
test   %ebp,%ebp
jle    11ff <main+0xbf>
lea    0xe35(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    11f0 <main+0xb0>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe12(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x14(%rsp),%ebp
test   %ebp,%ebp
jle    123f <main+0xff>
lea    0xdf6(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1230 <main+0xf0>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd2(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x18(%rsp),%ebp
test   %ebp,%ebp
jle    127f <main+0x13f>
lea    0xdb6(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1270 <main+0x130>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd92(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x1c(%rsp),%ebp
test   %ebp,%ebp
jle    12bf <main+0x17f>
lea    0xd76(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    12b0 <main+0x170>
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd52(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a Number: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [46 x i8] c"A should be in between 0 to 20.00 \0ATry Again\0A\00"
@.str.3 = [6 x i8] c" * \09\00"
@.str.4 = [7 x i8] c"%.2f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca [3 x float]
%4 = alloca i32
%5 = alloca [3 x i32]
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store i32 0, i32* %4
br label %6
6: ; preds = %32, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %33
9: ; preds = %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%12 = load float, float* %2
%13 = fcmp oge float %12, 0.000000e+00
br i1 %13, label %14, label %30
14: ; preds = %9
%15 = load float, float* %2
%16 = fpext float %15 to double
%17 = fcmp ole double %16, 2.000000e+01
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = load float, float* %2
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 %21
store float %19, float* %22
%23 = load float, float* %2
%24 = call i32 @floor(float %23)
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 %26
store i32 %24, i32* %27
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %32
30: ; preds = %14, %9
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30, %18
br label %6
33: ; preds = %6
store i32 0, i32* %4
br label %34
34: ; preds = %54, %33
%35 = load i32, i32* %4
%36 = icmp slt i32 %35, 4
br i1 %36, label %37, label %57
37: ; preds = %34
br label %38
38: ; preds = %45, %37
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = add nsw i32 %42, -1
store i32 %43, i32* %41
%44 = icmp sgt i32 %42, 0
br i1 %44, label %45, label %47
45: ; preds = %38
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %38
47: ; preds = %38
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 %49
%51 = load float, float* %50
%52 = fpext float %51 to double
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %52)
br label %54
54: ; preds = %47
%55 = load i32, i32* %4
%56 = add nsw i32 %55, 1
store i32 %56, i32* %4
br label %34
57: ; preds = %34
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a Number: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [6 x i8] c" * \09\00"
@.str.4 = [7 x i8] c"%.2f \0A\00"
@str = [45 x i8] c"A should be in between 0 to 20.00 \0ATry Again\00"
define i32 @main() {
%1 = alloca float
%2 = alloca [3 x float]
%3 = alloca [3 x i32]
%4 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%5 = bitcast [3 x float]* %2 to i8*
%6 = bitcast [3 x i32]* %3 to i8*
br label %7
7: ; preds = %0, %23
%8 = phi i32 [ 0, %0 ], [ %24, %23 ]
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%11 = load float, float* %1
%12 = fcmp ult float %11, 0.000000e+00
%13 = fcmp ugt float %11, 2.000000e+01
%14 = or i1 %12, %13
br i1 %14, label %21, label %15
15: ; preds = %7
%16 = sext i32 %8 to i64
%17 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 %16
store float %11, float* %17
%18 = call i32 @floor(float %11)
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %16
store i32 %18, i32* %19
%20 = add nsw i32 %8, 1
br label %23
21: ; preds = %7
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
br label %23
23: ; preds = %21, %15
%24 = phi i32 [ %20, %15 ], [ %8, %21 ]
%25 = icmp slt i32 %24, 4
br i1 %25, label %7, label %26
26: ; preds = %23
%27 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%28 = load i32, i32* %27
%29 = icmp sgt i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %26, %30
%31 = phi i32 [ %32, %30 ], [ %28, %26 ]
%32 = add nsw i32 %31, -1
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%34 = icmp eq i32 %32, 0
br i1 %34, label %35, label %30
35: ; preds = %30, %26
%36 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%37 = load float, float* %36
%38 = fpext float %37 to double
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %38)
%40 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%41 = load i32, i32* %40
%42 = icmp sgt i32 %41, 0
br i1 %42, label %43, label %48
43: ; preds = %35, %43
%44 = phi i32 [ %45, %43 ], [ %41, %35 ]
%45 = add nsw i32 %44, -1
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%47 = icmp eq i32 %45, 0
br i1 %47, label %48, label %43
48: ; preds = %43, %35
%49 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 1
%50 = load float, float* %49
%51 = fpext float %50 to double
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %51)
%53 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%54 = load i32, i32* %53
%55 = icmp sgt i32 %54, 0
br i1 %55, label %56, label %61
56: ; preds = %48, %56
%57 = phi i32 [ %58, %56 ], [ %54, %48 ]
%58 = add nsw i32 %57, -1
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%60 = icmp eq i32 %58, 0
br i1 %60, label %61, label %56
61: ; preds = %56, %48
%62 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 2
%63 = load float, float* %62
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %64)
%66 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 3
%67 = load i32, i32* %66
%68 = icmp sgt i32 %67, 0
br i1 %68, label %69, label %74
69: ; preds = %61, %69
%70 = phi i32 [ %71, %69 ], [ %67, %61 ]
%71 = add nsw i32 %70, -1
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%73 = icmp eq i32 %71, 0
br i1 %73, label %74, label %69
74: ; preds = %69, %61
%75 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 3
%76 = load float, float* %75
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %77)
ret i32 0
}