#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*/ print_arr(double *);
int /*<<< orphan*/ scanf(char *, double *);
int /*<<< orphan*/ score(double *, double *);
int main(void) {
  int i;
  double x[100], score_arr[100];
  for (i = 0; i < 100; i++) {
    scanf("%lf", &x[i]);
  }
  score(x, score_arr);
  print_arr(score_arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x650,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    117f <main+0x4f>
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe94(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <main+0x19>
lea    -0x330(%rbp),%rdi
lea    -0x650(%rbp),%rsi
call   1040 <score@plt>
lea    -0x650(%rbp),%rdi
call   1030 <print_arr@plt>
xor    %eax,%eax
add    $0x650,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x648,%rsp
xor    %ebx,%ebx
lea    0xebd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%rsp,%rbx,1),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
add    $0x8,%rbx
cmp    $0x320,%rbx
jne    1150 <main+0x20>
mov    %rsp,%rdi
lea    0x320(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <score@plt>
mov    %rbx,%rdi
call   1030 <print_arr@plt>
xor    %eax,%eax
add    $0x648,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x double]
%4 = alloca [100 x double]
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 %10
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %11)
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 0
%18 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 0
%19 = call i32 @score(double* %17, double* %18)
%20 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 0
%21 = call i32 @print_arr(double* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = alloca [100 x double]
%2 = alloca [100 x double]
%3 = bitcast [100 x double]* %1 to i8*
%4 = bitcast [100 x double]* %2 to i8*
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %9, %5 ]
%7 = getelementptr inbounds [100 x double], [100 x double]* %1, i64 0, i64 %6
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %7)
%9 = add nuw nsw i64 %6, 1
%10 = icmp eq i64 %9, 100
br i1 %10, label %11, label %5
11: ; preds = %5
%12 = getelementptr inbounds [100 x double], [100 x double]* %1, i64 0, i64 0
%13 = getelementptr inbounds [100 x double], [100 x double]* %2, i64 0, i64 0
%14 = call i32 @score(double* %12, double* %13)
%15 = call i32 @print_arr(double* %13)
ret i32 0
}