#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 /*<<< orphan*/ scanf(char *, float *);
int main() {
  int i, n, y[3] = {0, 0, 0};
  float x;
  char z[] = "*";
  for (i = 0; i < 10; i++) {
    scanf("%f", &x);
    y[(int)x]++;
  }
  printf("Interval | Frequency\n");
  printf("---------+----------\n");
  for (n = 0; n < 3; n++) {
    printf("[%d, %d)   | ", n, n + 1);
    for (i = 0; i < y[n]; i++) {
      printf("%s", z);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1040 <memset@plt>
mov    0xeaa(%rip),%ax
mov    %ax,-0x1e(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    119b <main+0x6b>
lea    0xe90(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
cvttss2si -0x1c(%rbp),%eax
cltq
mov    -0x18(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1161 <main+0x31>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1233 <main+0x103>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x18(%rbp,%rcx,4),%eax
jge    1217 <main+0xe7>
lea    -0x1e(%rbp),%rsi
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e6 <main+0xb6>
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11be <main+0x8e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
movl   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movw   $0x2a,0xe(%rsp)
lea    0xe99(%rip),%rbx
lea    0x8(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cvttss2si 0x8(%rsp),%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
lea    0xdb1(%rip),%rdi
call   1040 <puts@plt>
lea    0xdba(%rip),%rdi
call   1040 <puts@plt>
lea    0xd88(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%rsp),%ebp
test   %ebp,%ebp
jle    12b2 <main+0x172>
lea    0xd79(%rip),%r14
lea    0xe(%rsp),%rbx
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%ebp
jne    12a0 <main+0x160>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd40(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%ebp
test   %ebp,%ebp
jle    1302 <main+0x1c2>
lea    0xd2e(%rip),%r14
lea    0xe(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%ebp
jne    12f0 <main+0x1b0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcf0(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rsp),%ebp
test   %ebp,%ebp
jle    1352 <main+0x212>
lea    0xcde(%rip),%r14
lea    0xe(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%ebp
jne    1340 <main+0x200>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.z = [2 x i8] c"*\00"
@.str = [3 x i8] c"%f\00"
@.str.1 = [22 x i8] c"Interval | Frequency\0A\00"
@.str.2 = [22 x i8] c"---------+----------\0A\00"
@.str.3 = [14 x i8] c"[%d, %d) | \00"
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x i32]
%5 = alloca float
%6 = alloca [2 x i8]
store i32 0, i32* %1
%7 = bitcast [3 x i32]* %4 to i8*
%8 = bitcast [2 x i8]* %6 to i8*
store i32 0, i32* %2
br label %9
9: ; preds = %20, %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %5)
%14 = load float, float* %5
%15 = fptosi float %14 to i32
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
store i32 %19, i32* %17
br label %20
20: ; preds = %12
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %9
23: ; preds = %9
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %26
26: ; preds = %49, %23
%27 = load i32, i32* %3
%28 = icmp slt i32 %27, 3
br i1 %28, label %29, label %52
29: ; preds = %26
%30 = load i32, i32* %3
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %30, i32 %32)
store i32 0, i32* %2
br label %34
34: ; preds = %44, %29
%35 = load i32, i32* %2
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = icmp slt i32 %35, %39
br i1 %40, label %41, label %47
41: ; preds = %34
%42 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %42)
br label %44
44: ; preds = %41
%45 = load i32, i32* %2
%46 = add nsw i32 %45, 1
store i32 %46, i32* %2
br label %34
47: ; preds = %34
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %49
49: ; preds = %47
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 1
store i32 %51, i32* %3
br label %26
52: ; preds = %26
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.3 = [14 x i8] c"[%d, %d) | \00"
@.str.4 = [3 x i8] c"%s\00"
@str = [21 x i8] c"Interval | Frequency\00"
@str.6 = [21 x i8] c"---------+----------\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca float
%3 = alloca i16
%4 = bitcast [3 x i32]* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast i16* %3 to i8*
store i16 42, i16* %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%8 = load float, float* %2
%9 = fptosi float %8 to i32
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %10
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
store i32 %13, i32* %11
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%15 = load float, float* %2
%16 = fptosi float %15 to i32
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = add nsw i32 %19, 1
store i32 %20, i32* %18
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%22 = load float, float* %2
%23 = fptosi float %22 to i32
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = add nsw i32 %26, 1
store i32 %27, i32* %25
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%29 = load float, float* %2
%30 = fptosi float %29 to i32
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = add nsw i32 %33, 1
store i32 %34, i32* %32
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%36 = load float, float* %2
%37 = fptosi float %36 to i32
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = add nsw i32 %40, 1
store i32 %41, i32* %39
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%43 = load float, float* %2
%44 = fptosi float %43 to i32
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = add nsw i32 %47, 1
store i32 %48, i32* %46
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%50 = load float, float* %2
%51 = fptosi float %50 to i32
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = add nsw i32 %54, 1
store i32 %55, i32* %53
%56 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%57 = load float, float* %2
%58 = fptosi float %57 to i32
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %59
%61 = load i32, i32* %60
%62 = add nsw i32 %61, 1
store i32 %62, i32* %60
%63 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%64 = load float, float* %2
%65 = fptosi float %64 to i32
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %66
%68 = load i32, i32* %67
%69 = add nsw i32 %68, 1
store i32 %69, i32* %67
%70 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%71 = load float, float* %2
%72 = fptosi float %71 to i32
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 %73
%75 = load i32, i32* %74
%76 = add nsw i32 %75, 1
store i32 %76, i32* %74
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 1)
%80 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%81 = load i32, i32* %80
%82 = icmp sgt i32 %81, 0
br i1 %82, label %83, label %88
83: ; preds = %0, %83
%84 = phi i32 [ %86, %83 ], [ 0, %0 ]
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i16* %3)
%86 = add nuw nsw i32 %84, 1
%87 = icmp eq i32 %86, %81
br i1 %87, label %88, label %83
88: ; preds = %83, %0
%89 = call i32 @putchar(i32 10)
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 2)
%91 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%92 = load i32, i32* %91
%93 = icmp sgt i32 %92, 0
br i1 %93, label %94, label %99
94: ; preds = %88, %94
%95 = phi i32 [ %97, %94 ], [ 0, %88 ]
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i16* %3)
%97 = add nuw nsw i32 %95, 1
%98 = icmp eq i32 %97, %92
br i1 %98, label %99, label %94
99: ; preds = %94, %88
%100 = call i32 @putchar(i32 10)
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 2, i32 3)
%102 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%103 = load i32, i32* %102
%104 = icmp sgt i32 %103, 0
br i1 %104, label %105, label %110
105: ; preds = %99, %105
%106 = phi i32 [ %108, %105 ], [ 0, %99 ]
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i16* %3)
%108 = add nuw nsw i32 %106, 1
%109 = icmp eq i32 %108, %103
br i1 %109, label %110, label %105
110: ; preds = %105, %99
%111 = call i32 @putchar(i32 10)
ret i32 0
}