#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 a[100];
  int i;
  for (i = 0; i < 100; i++) {
    scanf("%f", &a[i]);
    if (a[i] <= 10) {
      printf("A[%d] = %0.1f\n", i, a[i]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1a4(%rbp)
cmpl   $0x64,-0x1a4(%rbp)
jge    11c2 <main+0xa2>
movslq -0x1a4(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe9f(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x1a4(%rbp),%rax
movss  0xe87(%rip),%xmm0
ucomiss -0x1a0(%rbp,%rax,4),%xmm0
ff
jb     11a9 <main+0x89>
mov    -0x1a4(%rbp),%esi
movslq -0x1a4(%rbp),%rax
movss  -0x1a0(%rbp,%rax,4),%xmm0
ff ff
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
jmp    11ae <main+0x8e>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    113c <main+0x1c>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x198,%rsp
xor    %r12d,%r12d
lea    0xecc(%rip),%r15
lea    0xec8(%rip),%r14
xor    %ebx,%ebx
jmp    115e <main+0x3e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
add    $0x4,%r12
cmp    $0x64,%rbx
je     1188 <main+0x68>
lea    (%rsp,%r12,1),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
movss  (%rsp,%rbx,4),%xmm0
movss  0xe89(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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