#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 getJudgeNo();
int /*<<< orphan*/ getResults(int, double *, double *, double *, double *);
int /*<<< orphan*/ getScores(int, double *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printIntro();
int /*<<< orphan*/ printResults(double, double, double);
int /*<<< orphan*/ printScores(int, double *);
int /*<<< orphan*/ printf(char *);
int main() {
  printIntro();
  printf("\n");
  int judgeNo = getJudgeNo();
  printf("\n");
  double scores[judgeNo];
  double averageScore, maxScore, minScore;
  getScores(judgeNo, scores);
  printf("\n");
  printScores(judgeNo, scores);
  printf("\n");
  getResults(judgeNo, scores, &minScore, &maxScore, &averageScore);
  printResults(minScore, maxScore, averageScore);
  getchar();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %al,-0x41(%rbp)
call   1030 <printIntro@plt>
lea    0xe60(%rip),%rdi
mov    %rdi,-0x40(%rbp)
call   1040 <printf@plt>
mov    -0x41(%rbp),%al
call   1060 <getJudgeNo@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,-0x8(%rbp)
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x38(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <getScores@plt>
lea    0xe0d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x38(%rbp),%rsi
mov    -0x8(%rbp),%edi
call   10a0 <printScores@plt>
lea    0xdf5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x38(%rbp),%rsi
mov    -0x8(%rbp),%edi
lea    -0x30(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1090 <getResults@plt>
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1080 <printResults@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
xor    %eax,%eax
call   1040 <printIntro@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <getJudgeNo@plt>
mov    %eax,%r14d
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14d,%eax
mov    %rsp,%rbx
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r14d,%edi
mov    %rbx,%rsi
call   1050 <getScores@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
call   10a0 <printScores@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
mov    %r14d,%edi
mov    %rbx,%rsi
call   1090 <getResults@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
call   1080 <printResults@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
%8 = call i32 (...) @printIntro()
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @getJudgeNo()
store i32 %10, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %3
%15 = alloca double, i64 %13
store i64 %13, i64* %4
%16 = load i32, i32* %2
%17 = call i32 @getScores(i32 %16, double* %15)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* %2
%20 = call i32 @printScores(i32 %19, double* %15)
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%22 = load i32, i32* %2
%23 = call i32 @getResults(i32 %22, double* %15, double* %7, double* %6, double* %5)
%24 = load double, double* %7
%25 = load double, double* %6
%26 = load double, double* %5
%27 = call i32 @printResults(double %24, double %25, double %26)
%28 = call i32 (...) @getchar()
%29 = call i32 (...) @getchar()
store i32 0, i32* %1
%30 = load i8*, i8** %3
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = tail call i32 (...) @printIntro()
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 (...) @getJudgeNo()
%7 = tail call i32 @putchar(i32 10)
%8 = zext i32 %6 to i64
%9 = alloca double, i64 %8
%10 = bitcast double* %1 to i8*
%11 = bitcast double* %2 to i8*
%12 = bitcast double* %3 to i8*
%13 = call i32 @getScores(i32 %6, double* %9)
%14 = call i32 @putchar(i32 10)
%15 = call i32 @printScores(i32 %6, double* %9)
%16 = call i32 @putchar(i32 10)
%17 = call i32 @getResults(i32 %6, double* %9, double* %3, double* %2, double* %1)
%18 = load double, double* %3
%19 = load double, double* %2
%20 = load double, double* %1
%21 = call i32 @printResults(double %18, double %19, double %20)
%22 = call i32 (...) @getchar()
%23 = call i32 (...) @getchar()
ret i32 0
}