#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, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float num;
  int i;
  for (i = 0; i < 100; i++) {
    scanf("%f", &num);
    if (num <= 10)
      printf("A[%d] = %.1f\n", i, num);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1189 <main+0x69>
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xea8(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1176 <main+0x56>
mov    -0xc(%rbp),%esi
movss  -0x8(%rbp),%xmm0
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <main+0x5b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xeca(%rip),%r12
jmp    1148 <main+0x28>
nop
add    $0x1,%ebx
cmp    $0x64,%ebx
je     1172 <main+0x52>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  0xe9f(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1140 <main+0x20>
mov    %r12,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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