#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 *, ...);
int main(int argc, char const *argv[]) {
  int x;
  scanf("%d", &x);
  int y = 200;
  int v[y];
  int i;
  for (i = 0; i < y; i++) {
    scanf("%d", v[i]);
  }
  int aux = v[199];
  v[199] = v[0];
  v[0] = aux;
  int n;
  printf("Digite a quantidade de valores: ");
  scanf("%d", n);
  float notas[n];
  float soma = 0.0;
  for (i = 0; i < n; i++) {
    scanf("%f", notas[i]);
  }
  for (i = 0; i < n; i++) {
    soma = soma + notas[i];
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
xor    %eax,%eax
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0xc8,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11b0 <main+0x90>
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117d <main+0x5d>
mov    -0x50(%rbp),%rax
mov    0x31c(%rax),%ecx
mov    %ecx,-0x30(%rbp)
mov    (%rax),%ecx
mov    %ecx,0x31c(%rax)
mov    -0x30(%rbp),%ecx
mov    %ecx,(%rax)
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xe20(%rip),%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    -0x34(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    124f <main+0x12f>
mov    -0x58(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdea(%rip),%rdi
mov    $0x1,%al
call   1040 <scanf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1216 <main+0xf6>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1287 <main+0x167>
mov    -0x58(%rbp),%rax
movss  -0x44(%rbp),%xmm0
movslq -0x2c(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1256 <main+0x136>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <scanf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [33 x i8] c"Digite a quantidade de valores: \00"
@.str.2 = [3 x i8] c"%f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i64
%14 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 200, i32* %7
%16 = load i32, i32* %7
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %8
%19 = alloca i32, i64 %17
store i64 %17, i64* %9
store i32 0, i32* %10
br label %20
20: ; preds = %30, %2
%21 = load i32, i32* %10
%22 = load i32, i32* %7
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %33
24: ; preds = %20
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %19, i64 %26
%28 = load i32, i32* %27
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %24
%31 = load i32, i32* %10
%32 = add nsw i32 %31, 1
store i32 %32, i32* %10
br label %20
33: ; preds = %20
%34 = getelementptr inbounds i32, i32* %19, i64 199
%35 = load i32, i32* %34
store i32 %35, i32* %11
%36 = getelementptr inbounds i32, i32* %19, i64 0
%37 = load i32, i32* %36
%38 = getelementptr inbounds i32, i32* %19, i64 199
store i32 %37, i32* %38
%39 = load i32, i32* %11
%40 = getelementptr inbounds i32, i32* %19, i64 0
store i32 %39, i32* %40
%41 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%42 = load i32, i32* %12
%43 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %12
%45 = zext i32 %44 to i64
%46 = alloca float, i64 %45
store i64 %45, i64* %13
store float 0.000000e+00, float* %14
store i32 0, i32* %10
br label %47
47: ; preds = %58, %33
%48 = load i32, i32* %10
%49 = load i32, i32* %12
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %61
51: ; preds = %47
%52 = load i32, i32* %10
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds float, float* %46, i64 %53
%55 = load float, float* %54
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), double %56)
br label %58
58: ; preds = %51
%59 = load i32, i32* %10
%60 = add nsw i32 %59, 1
store i32 %60, i32* %10
br label %47
61: ; preds = %47
store i32 0, i32* %10
br label %62
62: ; preds = %73, %61
%63 = load i32, i32* %10
%64 = load i32, i32* %12
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %76
66: ; preds = %62
%67 = load float, float* %14
%68 = load i32, i32* %10
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds float, float* %46, i64 %69
%71 = load float, float* %70
%72 = fadd float %67, %71
store float %72, float* %14
br label %73
73: ; preds = %66
%74 = load i32, i32* %10
%75 = add nsw i32 %74, 1
store i32 %75, i32* %10
br label %62
76: ; preds = %62
store i32 0, i32* %3
%77 = load i8*, i8** %8
%78 = load i32, i32* %3
ret i32 %78
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
unreachable
}