#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 *, int *);
int main(void) {
  int age, height, i, number;
  int condition_1 = 0, condition_2 = 0;
  int average_age = 0, average_height = 0;
  for (i = 1; i <= 50; i++) {
    scanf("%d: %d %d", &number, &height, &age);
    if (age > 20 && height >= 180) {
      condition_1 += 1;
    } else {
      if (age > 15 && height >= 175) {
        condition_2 += 1;
      }
    }
    average_age += age;
    average_height += height;
  }
  printf("#Age>15 and Height >= 175: %d\n", condition_2 + condition_1);
  printf("#Age>20 and Height >= 180: %d\n", condition_1);
  printf("Average Age: %.2f\n", average_age / 50.0);
  printf("Average Height: %.2f\n", average_height / 50.0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x32,-0x10(%rbp)
jg     11de <main+0xbe>
lea    0xea5(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x8(%rbp),%rcx
call   1040 <scanf@plt>
cmpl   $0x14,-0x8(%rbp)
jle    1199 <main+0x79>
cmpl   $0xb4,-0xc(%rbp)
jl     1199 <main+0x79>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11be <main+0x9e>
cmpl   $0xf,-0x8(%rbp)
jle    11b9 <main+0x99>
cmpl   $0xaf,-0xc(%rbp)
jl     11b9 <main+0x99>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11be <main+0x9e>
mov    -0x8(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1152 <main+0x32>
mov    -0x1c(%rbp),%esi
add    -0x18(%rbp),%esi
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0x20(%rbp),%xmm0
movsd  0xdf4(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  0xdd3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%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    $0x18,%rsp
xor    %r14d,%r14d
mov    $0x32,%r12d
lea    0xeca(%rip),%rbx
xor    %r15d,%r15d
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    1178 <main+0x58>
nopl   0x0(%rax,%rax,1)
cmp    $0x10,%eax
setge  %dl
cmp    $0xaf,%ecx
mov    %rbx,%rsi
setge  %bl
and    %dl,%bl
movzbl %bl,%edx
mov    %rsi,%rbx
add    %edx,%ebp
add    %eax,%r15d
add    %ecx,%r14d
add    $0xffffffff,%r12d
je     11aa <main+0x8a>
mov    %rbx,%rdi
lea    0x14(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    $0x15,%eax
jl     1150 <main+0x30>
cmp    $0xb4,%ecx
jl     1150 <main+0x30>
add    $0x1,%r13d
jmp    116c <main+0x4c>
add    %r13d,%ebp
lea    0xe5e(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe6f(%rip),%rdi
mov    %r13d,%esi
call   1030 <printf@plt>
cvtsi2sd %r15d,%xmm0
divsd  0xe29(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
divsd  0xe09(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d: %d %d\00"
@.str.1 = [31 x i8] c"#Age>15 and Height >= 175: %d\0A\00"
@.str.2 = [31 x i8] c"#Age>20 and Height >= 180: %d\0A\00"
@.str.3 = [19 x i8] c"Average Age: %.2f\0A\00"
@.str.4 = [22 x i8] c"Average Height: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 1, i32* %4
br label %10
10: ; preds = %40, %0
%11 = load i32, i32* %4
%12 = icmp sle i32 %11, 50
br i1 %12, label %13, label %43
13: ; preds = %10
%14 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %3, i32* %2)
%15 = load i32, i32* %2
%16 = icmp sgt i32 %15, 20
br i1 %16, label %17, label %23
17: ; preds = %13
%18 = load i32, i32* %3
%19 = icmp sge i32 %18, 180
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %33
23: ; preds = %17, %13
%24 = load i32, i32* %2
%25 = icmp sgt i32 %24, 15
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load i32, i32* %3
%28 = icmp sge i32 %27, 175
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %32
32: ; preds = %29, %26, %23
br label %33
33: ; preds = %32, %20
%34 = load i32, i32* %2
%35 = load i32, i32* %8
%36 = add nsw i32 %35, %34
store i32 %36, i32* %8
%37 = load i32, i32* %3
%38 = load i32, i32* %9
%39 = add nsw i32 %38, %37
store i32 %39, i32* %9
br label %40
40: ; preds = %33
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
br label %10
43: ; preds = %10
%44 = load i32, i32* %7
%45 = load i32, i32* %6
%46 = add nsw i32 %44, %45
%47 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %6
%49 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %8
%51 = sitofp i32 %50 to double
%52 = fdiv double %51, 5.000000e+01
%53 = fptosi double %52 to i32
%54 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %9
%56 = sitofp i32 %55 to double
%57 = fdiv double %56, 5.000000e+01
%58 = fptosi double %57 to i32
%59 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %1
ret i32 %60
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d: %d %d\00"
@.str.1 = [31 x i8] c"#Age>15 and Height >= 175: %d\0A\00"
@.str.2 = [31 x i8] c"#Age>20 and Height >= 180: %d\0A\00"
@.str.3 = [19 x i8] c"Average Age: %.2f\0A\00"
@.str.4 = [22 x i8] c"Average Height: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
br label %7
7: ; preds = %0, %27
%8 = phi i32 [ 0, %0 ], [ %31, %27 ]
%9 = phi i32 [ 0, %0 ], [ %30, %27 ]
%10 = phi i32 [ 0, %0 ], [ %29, %27 ]
%11 = phi i32 [ 0, %0 ], [ %28, %27 ]
%12 = phi i32 [ 1, %0 ], [ %32, %27 ]
%13 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %2, i32* %1)
%14 = load i32, i32* %1
%15 = icmp sgt i32 %14, 20
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 179
%18 = select i1 %15, i1 %17, i1 false
br i1 %18, label %19, label %21
19: ; preds = %7
%20 = add nsw i32 %11, 1
br label %27
21: ; preds = %7
%22 = icmp sgt i32 %14, 15
%23 = icmp sgt i32 %16, 174
%24 = select i1 %22, i1 %23, i1 false
%25 = zext i1 %24 to i32
%26 = add nsw i32 %10, %25
br label %27
27: ; preds = %21, %19
%28 = phi i32 [ %20, %19 ], [ %11, %21 ]
%29 = phi i32 [ %10, %19 ], [ %26, %21 ]
%30 = add nsw i32 %14, %9
%31 = add nsw i32 %16, %8
%32 = add nuw nsw i32 %12, 1
%33 = icmp eq i32 %32, 51
br i1 %33, label %34, label %7
34: ; preds = %27
%35 = add nsw i32 %29, %28
%36 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %28)
%38 = sitofp i32 %30 to double
%39 = fdiv double %38, 5.000000e+01
%40 = fptosi double %39 to i32
%41 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %40)
%42 = sitofp i32 %31 to double
%43 = fdiv double %42, 5.000000e+01
%44 = fptosi double %43 to i32
%45 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %44)
ret i32 0
}