#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 *, float *);
int main() {
  float studentAndNote[10][3];
  float studentSmallNote[10][1] = {10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
  int studentSmallNoteTest[10][1];
  int totalSmallNoteP1;
  int totalSmallNoteP2;
  int totalSmallNoteP3;
  int i, j;
  totalSmallNoteP1 = 0;
  totalSmallNoteP2 = 0;
  totalSmallNoteP3 = 0;
  for (i = 0; i < 2; i++) {
    for (j = 0; j < 3; j++) {
      printf("Please, insert the note %d for the student %d: ", j + 1, i + 1);
      scanf("%f", &studentAndNote[i][j]);
      if (studentAndNote[i][j] <= studentSmallNote[i][0]) {
        studentSmallNote[i][0] = studentAndNote[i][j];
        studentSmallNoteTest[i][0] = j;
      }
    }
    printf("\n");
  }
  printf("\n------------------------------\n");
  printf("-- Calculating, please wait.");
  printf("\n------------------------------\n\n");
  for (i = 0; i < 2; i++) {
    printf("The student %d, have small note: %2.f", i + 1,
           studentSmallNote[i][0]);
    printf(" | On test: %d", studentSmallNoteTest[i][0] + 1);
    printf("\n------------------------------\n\n");
    if (studentSmallNoteTest[i][0] == 0) {
      totalSmallNoteP1++;
    } else if (studentSmallNoteTest[i][0] == 1) {
      totalSmallNoteP2++;
    } else if (studentSmallNoteTest[i][0] == 2) {
      totalSmallNoteP3++;
    }
  }
  printf("\nThe total of student, have small note in P1 is: %d",
         totalSmallNoteP1);
  printf("\nThe total of student, have small note in P2 is: %d",
         totalSmallNoteP2);
  printf("\nThe total of student, have small note in P3 is: %d",
         totalSmallNoteP3);
  printf("\nFinished!!!\n\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0xe4(%rbp)
movl   $0x0,-0xe8(%rbp)
movl   $0x0,-0xec(%rbp)
movl   $0x0,-0xf0(%rbp)
cmpl   $0x2,-0xf0(%rbp)
jge    12a6 <main+0x176>
movl   $0x0,-0xf4(%rbp)
cmpl   $0x3,-0xf4(%rbp)
jge    1284 <main+0x154>
mov    -0xf4(%rbp),%esi
add    $0x1,%esi
mov    -0xf0(%rbp),%edx
add    $0x1,%edx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xf0(%rbp),%rax
lea    -0x80(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
movslq -0xf4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6b(%rip),%rdi
call   1050 <scanf@plt>
movslq -0xf0(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xf4(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
movslq -0xf0(%rbp),%rax
movss  -0xb0(%rbp,%rax,4),%xmm0
ff ff
ucomiss %xmm1,%xmm0
jb     126b <main+0x13b>
movslq -0xf0(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xf4(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movslq -0xf0(%rbp),%rax
movss  %xmm0,-0xb0(%rbp,%rax,4)
ff ff
mov    -0xf4(%rbp),%ecx
movslq -0xf0(%rbp),%rax
mov    %ecx,-0xe0(%rbp,%rax,4)
jmp    1270 <main+0x140>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1199 <main+0x69>
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    1182 <main+0x52>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x2,-0xf0(%rbp)
jge    13d8 <main+0x2a8>
mov    -0xf0(%rbp),%esi
add    $0x1,%esi
movslq -0xf0(%rbp),%rax
movss  -0xb0(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
lea    0xdb0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movslq -0xf0(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
add    $0x1,%esi
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xf0(%rbp),%rax
cmpl   $0x0,-0xe0(%rbp,%rax,4)
jne    1368 <main+0x238>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    13bf <main+0x28f>
movslq -0xf0(%rbp),%rax
cmpl   $0x1,-0xe0(%rbp,%rax,4)
01
jne    1391 <main+0x261>
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    13ba <main+0x28a>
movslq -0xf0(%rbp),%rax
cmpl   $0x2,-0xe0(%rbp,%rax,4)
02
jne    13b5 <main+0x285>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    13ba <main+0x28a>
jmp    13bf <main+0x28f>
jmp    13c4 <main+0x294>
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    12da <main+0x1aa>
mov    -0xe4(%rbp),%esi
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xe8(%rbp),%esi
lea    0xd2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xec(%rbp),%esi
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
lea    0xeac(%rip),%rbp
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec1(%rip),%rbx
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x20(%rsp),%xmm0
minss  0xe72(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    $0x2,%r12d
mov    %rbp,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x24(%rsp),%xmm0
xor    %r14d,%r14d
movaps 0x10(%rsp),%xmm2
ucomiss %xmm0,%xmm2
setae  %r14b
movaps %xmm0,%xmm1
cmpnless %xmm2,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,0x10(%rsp)
mov    %rbp,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x28(%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
movaps %xmm0,%xmm2
cmpnless %xmm1,%xmm2
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
andps  %xmm3,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
movaps %xmm2,0x10(%rsp)
cmovae %r12d,%r14d
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x2c(%rsp),%xmm0
minss  0xd93(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rbp,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x30(%rsp),%xmm0
xor    %r15d,%r15d
movaps (%rsp),%xmm2
ucomiss %xmm0,%xmm2
setae  %r15b
movaps %xmm0,%xmm1
cmpnless %xmm2,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,(%rsp)
mov    %rbp,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x34(%rsp),%xmm0
movaps (%rsp),%xmm1
ucomiss %xmm0,%xmm1
movaps %xmm0,%xmm2
cmpnless %xmm1,%xmm2
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
andps  %xmm3,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
movaps %xmm2,(%rsp)
cmovae %r12d,%r15d
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe0c(%rip),%rdi
call   1040 <puts@plt>
lea    0xd12(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe20(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd09(%rip),%rbp
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0x1(%r14),%esi
lea    0xd15(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xdf6(%rip),%rax
mov    (%rax,%r14,4),%r13d
lea    0xdf7(%rip),%rax
mov    (%rax,%r14,4),%ebx
lea    0xdf8(%rip),%rax
mov    (%rax,%r14,4),%r14d
movaps (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0x1(%r15),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd8f(%rip),%rdi
call   1040 <puts@plt>
test   %r15d,%r15d
je     13e0 <main+0x2a0>
cmp    $0x1,%r15d
je     13e6 <main+0x2a6>
cmp    $0x2,%r15d
jne    13e9 <main+0x2a9>
add    $0x1,%r14d
jmp    13e9 <main+0x2a9>
add    $0x1,%r13d
jmp    13e9 <main+0x2a9>
add    $0x1,%ebx
lea    0xc99(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcbc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xce0(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd23(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.studentSmallNote = [10 x [1 x float]] [[1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01], [1 x float] [float 1.000000e+01]]
@.str = [48 x i8] c"Please, insert the note %d for the student %d: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [33 x i8] c"\0A------------------------------\0A\00"
@.str.4 = [29 x i8] c"-- Calculating, please wait.\00"
@.str.5 = [34 x i8] c"\0A------------------------------\0A\0A\00"
@.str.6 = [38 x i8] c"The student %d, have small note: %2.f\00"
@.str.7 = [15 x i8] c" | On test: %d\00"
@.str.8 = [52 x i8] c"\0AThe total of student, have small note in P1 is: %d\00"
@.str.9 = [52 x i8] c"\0AThe total of student, have small note in P2 is: %d\00"
@.str.10 = [52 x i8] c"\0AThe total of student, have small note in P3 is: %d\00"
@.str.11 = [15 x i8] c"\0AFinished!!!\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [3 x float]]
%3 = alloca [10 x [1 x float]]
%4 = alloca [10 x [1 x i32]]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
%10 = bitcast [10 x [1 x float]]* %3 to i8*
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
br label %11
11: ; preds = %67, %0
%12 = load i32, i32* %8
%13 = icmp slt i32 %12, 2
br i1 %13, label %14, label %70
14: ; preds = %11
store i32 0, i32* %9
br label %15
15: ; preds = %62, %14
%16 = load i32, i32* %9
%17 = icmp slt i32 %16, 3
br i1 %17, label %18, label %65
18: ; preds = %15
%19 = load i32, i32* %9
%20 = add nsw i32 %19, 1
%21 = load i32, i32* %8
%22 = add nsw i32 %21, 1
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %22)
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %2, i64 0, i64 %25
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 %28
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %29)
%31 = load i32, i32* %8
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %2, i64 0, i64 %32
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [3 x float], [3 x float]* %33, i64 0, i64 %35
%37 = load float, float* %36
%38 = load i32, i32* %8
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [10 x [1 x float]], [10 x [1 x float]]* %3, i64 0, i64 %39
%41 = getelementptr inbounds [1 x float], [1 x float]* %40, i64 0, i64 0
%42 = load float, float* %41
%43 = fcmp ole float %37, %42
br i1 %43, label %44, label %61
44: ; preds = %18
%45 = load i32, i32* %8
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %2, i64 0, i64 %46
%48 = load i32, i32* %9
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [3 x float], [3 x float]* %47, i64 0, i64 %49
%51 = load float, float* %50
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [10 x [1 x float]], [10 x [1 x float]]* %3, i64 0, i64 %53
%55 = getelementptr inbounds [1 x float], [1 x float]* %54, i64 0, i64 0
store float %51, float* %55
%56 = load i32, i32* %9
%57 = load i32, i32* %8
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [10 x [1 x i32]], [10 x [1 x i32]]* %4, i64 0, i64 %58
%60 = getelementptr inbounds [1 x i32], [1 x i32]* %59, i64 0, i64 0
store i32 %56, i32* %60
br label %61
61: ; preds = %44, %18
br label %62
62: ; preds = %61
%63 = load i32, i32* %9
%64 = add nsw i32 %63, 1
store i32 %64, i32* %9
br label %15
65: ; preds = %15
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %67
67: ; preds = %65
%68 = load i32, i32* %8
%69 = add nsw i32 %68, 1
store i32 %69, i32* %8
br label %11
70: ; preds = %11
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %8
br label %74
74: ; preds = %127, %70
%75 = load i32, i32* %8
%76 = icmp slt i32 %75, 2
br i1 %76, label %77, label %130
77: ; preds = %74
%78 = load i32, i32* %8
%79 = add nsw i32 %78, 1
%80 = load i32, i32* %8
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [10 x [1 x float]], [10 x [1 x float]]* %3, i64 0, i64 %81
%83 = getelementptr inbounds [1 x float], [1 x float]* %82, i64 0, i64 0
%84 = load float, float* %83
%85 = fpext float %84 to double
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %79, double %85)
%87 = load i32, i32* %8
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [10 x [1 x i32]], [10 x [1 x i32]]* %4, i64 0, i64 %88
%90 = getelementptr inbounds [1 x i32], [1 x i32]* %89, i64 0, i64 0
%91 = load i32, i32* %90
%92 = add nsw i32 %91, 1
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %92)
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%95 = load i32, i32* %8
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [10 x [1 x i32]], [10 x [1 x i32]]* %4, i64 0, i64 %96
%98 = getelementptr inbounds [1 x i32], [1 x i32]* %97, i64 0, i64 0
%99 = load i32, i32* %98
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %104
101: ; preds = %77
%102 = load i32, i32* %5
%103 = add nsw i32 %102, 1
store i32 %103, i32* %5
br label %126
104: ; preds = %77
%105 = load i32, i32* %8
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [10 x [1 x i32]], [10 x [1 x i32]]* %4, i64 0, i64 %106
%108 = getelementptr inbounds [1 x i32], [1 x i32]* %107, i64 0, i64 0
%109 = load i32, i32* %108
%110 = icmp eq i32 %109, 1
br i1 %110, label %111, label %114
111: ; preds = %104
%112 = load i32, i32* %6
%113 = add nsw i32 %112, 1
store i32 %113, i32* %6
br label %125
114: ; preds = %104
%115 = load i32, i32* %8
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [10 x [1 x i32]], [10 x [1 x i32]]* %4, i64 0, i64 %116
%118 = getelementptr inbounds [1 x i32], [1 x i32]* %117, i64 0, i64 0
%119 = load i32, i32* %118
%120 = icmp eq i32 %119, 2
br i1 %120, label %121, label %124
121: ; preds = %114
%122 = load i32, i32* %7
%123 = add nsw i32 %122, 1
store i32 %123, i32* %7
br label %124
124: ; preds = %121, %114
br label %125
125: ; preds = %124, %111
br label %126
126: ; preds = %125, %101
br label %127
127: ; preds = %126
%128 = load i32, i32* %8
%129 = add nsw i32 %128, 1
store i32 %129, i32* %8
br label %74
130: ; preds = %74
%131 = load i32, i32* %5
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0), i32 %131)
%133 = load i32, i32* %6
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0), i32 %133)
%135 = load i32, i32* %7
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 %135)
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0))
%138 = load i32, i32* %1
ret i32 %138
}

LLVM IR (-O2):
@.str = [48 x i8] c"Please, insert the note %d for the student %d: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.4 = [29 x i8] c"-- Calculating, please wait.\00"
@.str.6 = [38 x i8] c"The student %d, have small note: %2.f\00"
@.str.7 = [15 x i8] c" | On test: %d\00"
@.str.8 = [52 x i8] c"\0AThe total of student, have small note in P1 is: %d\00"
@.str.9 = [52 x i8] c"\0AThe total of student, have small note in P2 is: %d\00"
@.str.10 = [52 x i8] c"\0AThe total of student, have small note in P3 is: %d\00"
@str = [32 x i8] c"\0A------------------------------\00"
@str.13 = [14 x i8] c"\0AFinished!!!\0A\00"
@str.14 = [33 x i8] c"\0A------------------------------\0A\00"
@switch.table.main = [3 x i32] [i32 1, i32 0, i32 0]
@switch.table.main.15 = [3 x i32] [i32 0, i32 1, i32 0]
@switch.table.main.16 = [3 x i32] [i32 0, i32 0, i32 1]
define i32 @main() {
%1 = alloca [10 x [3 x float]]
%2 = bitcast [10 x [3 x float]]* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 1, i32 1)
%4 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %1, i64 0, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%6 = load float, float* %4
%7 = fcmp ole float %6, 1.000000e+01
%8 = select i1 %7, float %6, float 1.000000e+01
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 2, i32 1)
%10 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %1, i64 0, i64 0, i64 1
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %10)
%12 = load float, float* %10
%13 = fcmp ugt float %12, %8
%14 = select i1 %13, float %8, float %12
%15 = xor i1 %13, true
%16 = zext i1 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 3, i32 1)
%18 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %1, i64 0, i64 0, i64 2
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %18)
%20 = load float, float* %18
%21 = fcmp ugt float %20, %14
%22 = select i1 %21, float %14, float %20
%23 = select i1 %21, i32 %16, i32 2
%24 = call i32 @putchar(i32 10)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%26 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %1, i64 0, i64 1, i64 0
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %26)
%28 = load float, float* %26
%29 = fcmp ole float %28, 1.000000e+01
%30 = select i1 %29, float %28, float 1.000000e+01
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 2, i32 2)
%32 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %1, i64 0, i64 1, i64 1
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %32)
%34 = load float, float* %32
%35 = fcmp ugt float %34, %30
%36 = select i1 %35, float %30, float %34
%37 = xor i1 %35, true
%38 = zext i1 %37 to i32
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 3, i32 2)
%40 = getelementptr inbounds [10 x [3 x float]], [10 x [3 x float]]* %1, i64 0, i64 1, i64 2
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %40)
%42 = load float, float* %40
%43 = fcmp ugt float %42, %36
%44 = select i1 %43, float %36, float %42
%45 = select i1 %43, i32 %38, i32 2
%46 = call i32 @putchar(i32 10)
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.14, i64 0, i64 0))
%50 = fpext float %22 to double
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 1, double %50)
%52 = add nuw nsw i32 %23, 1
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %52)
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.14, i64 0, i64 0))
%55 = zext i32 %23 to i64
%56 = getelementptr inbounds [3 x i32], [3 x i32]* @switch.table.main, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = zext i32 %23 to i64
%59 = getelementptr inbounds [3 x i32], [3 x i32]* @switch.table.main.15, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = zext i32 %23 to i64
%62 = getelementptr inbounds [3 x i32], [3 x i32]* @switch.table.main.16, i64 0, i64 %61
%63 = load i32, i32* %62
%64 = fpext float %44 to double
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 2, double %64)
%66 = add nuw nsw i32 %45, 1
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %66)
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.14, i64 0, i64 0))
switch i32 %45, label %75 [
i32 0, label %73
i32 1, label %71
i32 2, label %69
]
69: ; preds = %0
%70 = add nuw nsw i32 %63, 1
br label %75
71: ; preds = %0
%72 = add nuw nsw i32 %60, 1
br label %75
73: ; preds = %0
%74 = add nuw nsw i32 %57, 1
br label %75
75: ; preds = %73, %71, %69, %0
%76 = phi i32 [ %74, %73 ], [ %57, %71 ], [ %57, %69 ], [ %57, %0 ]
%77 = phi i32 [ %60, %73 ], [ %72, %71 ], [ %60, %69 ], [ %60, %0 ]
%78 = phi i32 [ %63, %73 ], [ %63, %71 ], [ %70, %69 ], [ %63, %0 ]
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0), i32 %76)
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0), i32 %77)
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0), i32 %78)
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.13, i64 0, i64 0))
ret i32 0
}