#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0, i, age;
  for (i = 1; i <= 100; i++) {
    printf("Enter the Age of Person No. %d: ", i);
    scanf("%d", &age);
    if (age >= 50 && age <= 60)
      n++;
  }
  printf("No. of People is the Range of 50 to 60 is: %d \n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jg     1196 <main+0x76>
mov    -0xc(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x32,-0x10(%rbp)
jl     1183 <main+0x63>
cmpl   $0x3c,-0x10(%rbp)
jg     1183 <main+0x63>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1188 <main+0x68>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
mov    $0x1,%ebp
lea    0xec6(%rip),%r14
lea    0xee0(%rip),%r15
lea    0xc(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffce,%eax
cmp    $0xb,%eax
adc    $0x0,%ebx
add    $0x1,%ebp
cmp    $0x65,%ebp
jne    1150 <main+0x30>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Enter the Age of Person No. %d: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [48 x i8] c"No. of People is the Range of 50 to 60 is: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
br label %5
5: ; preds = %21, %0
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %4
%13 = icmp sge i32 %12, 50
br i1 %13, label %14, label %20
14: ; preds = %8
%15 = load i32, i32* %4
%16 = icmp sle i32 %15, 60
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %14, %8
br label %21
21: ; preds = %20
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %5
24: ; preds = %5
%25 = load i32, i32* %2
%26 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Enter the Age of Person No. %d: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [48 x i8] c"No. of People is the Range of 50 to 60 is: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 1, %0 ], [ %13, %3 ]
%5 = phi i32 [ 0, %0 ], [ %12, %3 ]
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = add i32 %8, -50
%10 = icmp ult i32 %9, 11
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %5, %11
%13 = add nuw nsw i32 %4, 1
%14 = icmp eq i32 %13, 101
br i1 %14, label %15, label %3
15: ; preds = %3
%16 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}