#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 /*<<< orphan*/ strcpy(char *, char *);
float strtof(char *, int /*<<< orphan*/ *);
int main(void) {
  int i = 0, nAlunos;
  float mediaTurma = 0.0, mediaAluno = 0.0, menorMedia = 0.0, maiorMedia = 0.0;
  char maiorAluno[100], menorAluno[100];
  printf("\nInforme o numero de alunos: ");
  scanf("%d", &nAlunos);
  char vAlunos[nAlunos][3][100];
  for (i = 0; i < nAlunos; i++) {
    printf("\nNome=");
    scanf("%s", &vAlunos[i][0]);
    printf("N1=");
    scanf("%s", &vAlunos[i][1]);
    printf("N2=");
    scanf("%s", &vAlunos[i][2]);
    mediaTurma += ((strtof(vAlunos[i][1], NULL) + strtof(vAlunos[i][2], NULL)) /
                   (float)2.0);
  }
  mediaTurma /= nAlunos;
  menorMedia = mediaTurma;
  maiorMedia = mediaTurma;
  for (i = 0; i < nAlunos; i++) {
    mediaAluno = (strtof(vAlunos[i][1], NULL) + strtof(vAlunos[i][2], NULL)) /
                 (float)2.0;
    if (mediaAluno < menorMedia) {
      menorMedia = mediaAluno;
      strcpy(menorAluno, vAlunos[i][0]);
    }
    if (mediaAluno > maiorMedia) {
      maiorMedia = mediaAluno;
      strcpy(maiorAluno, vAlunos[i][0]);
    }
  }
  printf("\nMedia da Turma:\n    %.2f\n", mediaTurma);
  printf("\nMenor Media da Turma:\n    %s    %.2f\n", menorAluno, menorMedia);
  printf("\nMaior Media da Turma:\n    %s    %.2f\n\n", maiorAluno, maiorMedia);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xe88(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x109(%rbp)
call   1040 <printf@plt>
mov    -0x109(%rbp),%al
lea    0xe8c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0xf8(%rbp)
imul   $0x12c,%rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x108(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x100(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1305 <main+0x1c5>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x108(%rbp),%rsi
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rsi
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x108(%rbp),%rsi
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rsi
add    $0x64,%rsi
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x108(%rbp),%rsi
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rsi
add    $0xc8,%rsi
lea    0xdb0(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x108(%rbp),%rdi
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rdi
add    $0x64,%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <strtof@plt>
mov    -0x108(%rbp),%rdi
movss  %xmm0,-0x110(%rbp)
ff
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rdi
add    $0xc8,%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <strtof@plt>
movaps %xmm0,%xmm1
movss  -0x110(%rbp),%xmm0
ff
addss  %xmm1,%xmm0
movss  0xd17(%rip),%xmm1
divss  %xmm1,%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d9 <main+0x99>
cvtsi2ssl -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1436 <main+0x2f6>
mov    -0x108(%rbp),%rdi
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rdi
add    $0x64,%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <strtof@plt>
mov    -0x108(%rbp),%rdi
movss  %xmm0,-0x114(%rbp)
ff
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rdi
add    $0xc8,%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <strtof@plt>
movaps %xmm0,%xmm1
movss  -0x114(%rbp),%xmm0
ff
addss  %xmm1,%xmm0
movss  0xc5b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    13ec <main+0x2ac>
mov    -0x108(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    -0xf0(%rbp),%rdi
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
movss  -0x14(%rbp),%xmm0
ucomiss -0x1c(%rbp),%xmm0
jbe    1423 <main+0x2e3>
mov    -0x108(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    -0x80(%rbp),%rdi
movslq -0x8(%rbp),%rax
imul   $0x12c,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
jmp    1428 <main+0x2e8>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1333 <main+0x1f3>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbf1(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    -0xf0(%rbp),%rsi
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbee(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    -0x80(%rbp),%rsi
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbfa(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0xf8(%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   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    -0x34(%rbp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rsp,%rbx
mov    -0x34(%rbp),%eax
mov    %rsp,%rcx
imul   $0x12c,%rax,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
mov    -0x34(%rbp),%eax
test   %eax,%eax
jle    1335 <main+0x1f5>
mov    %rbx,-0x48(%rbp)
xorps  %xmm1,%xmm1
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rbx
xor    %r15d,%r15d
xchg   %ax,%ax
movss  %xmm1,-0x38(%rbp)
lea    0xe69(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe62(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe51(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x64(%rbx),%r12
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc8(%rbx),%r13
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r12,%rdi
xor    %esi,%esi
call   1050 <strtof@plt>
movss  %xmm0,-0x2c(%rbp)
mov    %r13,%rdi
xor    %esi,%esi
call   1050 <strtof@plt>
movss  0xdc7(%rip),%xmm2
movss  -0x38(%rbp),%xmm1
addss  -0x2c(%rbp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm0,%xmm1
add    $0x1,%r15
movslq -0x34(%rbp),%rax
add    $0x12c,%rbx
cmp    %rax,%r15
jl     11b0 <main+0x70>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  %xmm0,%xmm1
test   %eax,%eax
jle    134c <main+0x20c>
xor    %r14d,%r14d
lea    -0xb0(%rbp),%r15
lea    -0x120(%rbp),%r12
movss  %xmm1,-0x2c(%rbp)
movss  %xmm1,-0x38(%rbp)
movss  %xmm1,-0x30(%rbp)
mov    -0x40(%rbp),%rbx
jmp    12b9 <main+0x179>
nopl   0x0(%rax)
movss  %xmm1,-0x2c(%rbp)
add    $0x1,%r14
movslq -0x34(%rbp),%rax
add    $0x12c,%rbx
cmp    %rax,%r14
jge    132a <main+0x1ea>
lea    0x64(%rbx),%rdi
xor    %esi,%esi
call   1050 <strtof@plt>
movss  %xmm0,-0x40(%rbp)
lea    0xc8(%rbx),%rdi
xor    %esi,%esi
call   1050 <strtof@plt>
addss  -0x40(%rbp),%xmm0
mulss  0xd1c(%rip),%xmm0
movss  -0x30(%rbp),%xmm1
ucomiss %xmm0,%xmm1
movss  %xmm0,-0x40(%rbp)
jbe    1306 <main+0x1c6>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
movss  -0x40(%rbp),%xmm0
movaps %xmm0,%xmm1
movss  %xmm1,-0x30(%rbp)
movss  -0x2c(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jbe    12a0 <main+0x160>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
movss  -0x40(%rbp),%xmm1
jmp    12a0 <main+0x160>
mov    -0x48(%rbp),%rbx
movss  -0x38(%rbp),%xmm1
jmp    135a <main+0x21a>
cvtsi2ss %eax,%xmm0
xorps  %xmm1,%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,-0x30(%rbp)
movss  %xmm1,-0x2c(%rbp)
jmp    135a <main+0x21a>
movss  %xmm1,-0x30(%rbp)
movss  %xmm1,-0x2c(%rbp)
mov    -0x48(%rbp),%rbx
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xccf(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcd3(%rip),%rdi
lea    -0xb0(%rbp),%rsi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcdc(%rip),%rdi
lea    -0x120(%rbp),%rsi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"\0AInforme o numero de alunos: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [7 x i8] c"\0ANome=\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [4 x i8] c"N1=\00"
@.str.5 = [4 x i8] c"N2=\00"
@.str.6 = [27 x i8] c"\0AMedia da Turma:\0A %.2f\0A\00"
@.str.7 = [39 x i8] c"\0AMenor Media da Turma:\0A %s %.2f\0A\00"
@.str.8 = [40 x i8] c"\0AMaior Media da Turma:\0A %s %.2f\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca i8*
%11 = alloca i64
store i32 0, i32* %1
store i32 0, i32* %2
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
store float 0.000000e+00, float* %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %10
%17 = alloca [3 x [100 x i8]], i64 %15
store i64 %15, i64* %11
store i32 0, i32* %2
br label %18
18: ; preds = %57, %0
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %60
22: ; preds = %18
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %25
%27 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %26, i64 0, i64 0
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %31
%33 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %32, i64 0, i64 1
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%36 = load i32, i32* %2
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %37
%39 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %38, i64 0, i64 2
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %39)
%41 = load i32, i32* %2
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %42
%44 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %43, i64 0, i64 1
%45 = getelementptr inbounds [100 x i8], [100 x i8]* %44, i64 0, i64 0
%46 = call float @strtof(i8* %45, i32* null)
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %48
%50 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %49, i64 0, i64 2
%51 = getelementptr inbounds [100 x i8], [100 x i8]* %50, i64 0, i64 0
%52 = call float @strtof(i8* %51, i32* null)
%53 = fadd float %46, %52
%54 = fdiv float %53, 2.000000e+00
%55 = load float, float* %4
%56 = fadd float %55, %54
store float %56, float* %4
br label %57
57: ; preds = %22
%58 = load i32, i32* %2
%59 = add nsw i32 %58, 1
store i32 %59, i32* %2
br label %18
60: ; preds = %18
%61 = load i32, i32* %3
%62 = sitofp i32 %61 to float
%63 = load float, float* %4
%64 = fdiv float %63, %62
store float %64, float* %4
%65 = load float, float* %4
store float %65, float* %6
%66 = load float, float* %4
store float %66, float* %7
store i32 0, i32* %2
br label %67
67: ; preds = %112, %60
%68 = load i32, i32* %2
%69 = load i32, i32* %3
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %115
71: ; preds = %67
%72 = load i32, i32* %2
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %73
%75 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %74, i64 0, i64 1
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %75, i64 0, i64 0
%77 = call float @strtof(i8* %76, i32* null)
%78 = load i32, i32* %2
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %79
%81 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %80, i64 0, i64 2
%82 = getelementptr inbounds [100 x i8], [100 x i8]* %81, i64 0, i64 0
%83 = call float @strtof(i8* %82, i32* null)
%84 = fadd float %77, %83
%85 = fdiv float %84, 2.000000e+00
store float %85, float* %5
%86 = load float, float* %5
%87 = load float, float* %6
%88 = fcmp olt float %86, %87
br i1 %88, label %89, label %98
89: ; preds = %71
%90 = load float, float* %5
store float %90, float* %6
%91 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%92 = load i32, i32* %2
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %93
%95 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %94, i64 0, i64 0
%96 = getelementptr inbounds [100 x i8], [100 x i8]* %95, i64 0, i64 0
%97 = call i32 @strcpy(i8* %91, i8* %96)
br label %98
98: ; preds = %89, %71
%99 = load float, float* %5
%100 = load float, float* %7
%101 = fcmp ogt float %99, %100
br i1 %101, label %102, label %111
102: ; preds = %98
%103 = load float, float* %5
store float %103, float* %7
%104 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%105 = load i32, i32* %2
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %17, i64 %106
%108 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %107, i64 0, i64 0
%109 = getelementptr inbounds [100 x i8], [100 x i8]* %108, i64 0, i64 0
%110 = call i32 @strcpy(i8* %104, i8* %109)
br label %111
111: ; preds = %102, %98
br label %112
112: ; preds = %111
%113 = load i32, i32* %2
%114 = add nsw i32 %113, 1
store i32 %114, i32* %2
br label %67
115: ; preds = %67
%116 = load float, float* %4
%117 = fpext float %116 to double
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), double %117)
%119 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%120 = load float, float* %6
%121 = fpext float %120 to double
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i8* %119, double %121)
%123 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%124 = load float, float* %7
%125 = fpext float %124 to double
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %123, double %125)
store i32 0, i32* %1
%127 = load i8*, i8** %10
%128 = load i32, i32* %1
ret i32 %128
}

LLVM IR (-O2):
@.str = [30 x i8] c"\0AInforme o numero de alunos: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [7 x i8] c"\0ANome=\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [4 x i8] c"N1=\00"
@.str.5 = [4 x i8] c"N2=\00"
@.str.6 = [27 x i8] c"\0AMedia da Turma:\0A %.2f\0A\00"
@.str.7 = [39 x i8] c"\0AMenor Media da Turma:\0A %s %.2f\0A\00"
@.str.8 = [40 x i8] c"\0AMaior Media da Turma:\0A %s %.2f\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = bitcast i32* %1 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
%12 = alloca [3 x [100 x i8]], i64 %10
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %0
%16 = sitofp i32 %13 to float
%17 = fdiv float 0.000000e+00, %16
br label %72
18: ; preds = %0, %18
%19 = phi i64 [ %37, %18 ], [ 0, %0 ]
%20 = phi float [ %36, %18 ], [ 0.000000e+00, %0 ]
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%22 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %12, i64 %19, i64 0
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %22)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%25 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %12, i64 %19, i64 1
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %25)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%28 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %12, i64 %19, i64 2
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %28)
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%31 = call float @strtof(i8* nocapture %30, i32* null)
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %28, i64 0, i64 0
%33 = call float @strtof(i8* nocapture %32, i32* null)
%34 = fadd float %31, %33
%35 = fmul float %34, 5.000000e-01
%36 = fadd float %20, %35
%37 = add nuw nsw i64 %19, 1
%38 = load i32, i32* %1
%39 = sext i32 %38 to i64
%40 = icmp slt i64 %37, %39
br i1 %40, label %18, label %41
41: ; preds = %18
%42 = sitofp i32 %38 to float
%43 = fdiv float %36, %42
%44 = icmp sgt i32 %38, 0
br i1 %44, label %45, label %72
45: ; preds = %41, %66
%46 = phi i64 [ %68, %66 ], [ 0, %41 ]
%47 = phi float [ %67, %66 ], [ %43, %41 ]
%48 = phi float [ %61, %66 ], [ %43, %41 ]
%49 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %12, i64 %46
%50 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %12, i64 %46, i64 1, i64 0
%51 = call float @strtof(i8* nocapture %50, i32* null)
%52 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %12, i64 %46, i64 2, i64 0
%53 = call float @strtof(i8* nocapture %52, i32* null)
%54 = fadd float %51, %53
%55 = fmul float %54, 5.000000e-01
%56 = fcmp olt float %55, %48
br i1 %56, label %57, label %60
57: ; preds = %45
%58 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %49, i64 0, i64 0, i64 0
%59 = call i32 @strcpy(i8* %6, i8* %58)
br label %60
60: ; preds = %57, %45
%61 = phi float [ %55, %57 ], [ %48, %45 ]
%62 = fcmp ogt float %55, %47
br i1 %62, label %63, label %66
63: ; preds = %60
%64 = getelementptr inbounds [3 x [100 x i8]], [3 x [100 x i8]]* %49, i64 0, i64 0, i64 0
%65 = call i32 @strcpy(i8* %5, i8* %64)
br label %66
66: ; preds = %60, %63
%67 = phi float [ %55, %63 ], [ %47, %60 ]
%68 = add nuw nsw i64 %46, 1
%69 = load i32, i32* %1
%70 = sext i32 %69 to i64
%71 = icmp slt i64 %68, %70
br i1 %71, label %45, label %72
72: ; preds = %66, %15, %41
%73 = phi float [ %43, %41 ], [ %17, %15 ], [ %43, %66 ]
%74 = phi float [ %43, %41 ], [ %17, %15 ], [ %61, %66 ]
%75 = phi float [ %43, %41 ], [ %17, %15 ], [ %67, %66 ]
%76 = fpext float %73 to double
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), double %76)
%78 = fpext float %74 to double
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i8* %6, double %78)
%80 = fpext float %75 to double
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %5, double %80)
ret i32 0
}