#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);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  int i;
  float av1[10];
  float menor = 999;
  for (i = 0; i <= 9; i++) {
    printf("\n Entre com av1 do aluno %d : ", i + 1);
    scanf("%f", &av1[i]);
    if (av1[i] < menor) {
      menor = av1[i];
    }
  }
  for (i = 0; i <= 9; i++) {
    if (av1[i] == menor) {
      printf("\n Hall das menores notas! Aluno %d", i + 1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     11b4 <main+0x94>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeae(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm1
movss  -0x34(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11a1 <main+0x81>
movslq -0x8(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    11a6 <main+0x86>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <main+0x23>
movl   $0x0,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     1204 <main+0xe4>
movslq -0x8(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
ucomiss -0x34(%rbp),%xmm0
jne    11f1 <main+0xd1>
jp     11f1 <main+0xd1>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
jmp    11f6 <main+0xd6>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11bb <main+0x9b>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xed6(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xee1(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm0
minss  0xea3(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x18(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x20(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x24(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x28(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x2c(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x30(%rsp),%xmm0
minss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  0x34(%rsp),%xmm1
minss  0xc(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
ucomiss %xmm1,%xmm0
jne    130d <main+0x1ed>
jp     130d <main+0x1ed>
lea    0xd23(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    132d <main+0x20d>
jp     132d <main+0x20d>
lea    0xd03(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
movss  0x18(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    134d <main+0x22d>
jp     134d <main+0x22d>
lea    0xce3(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    136d <main+0x24d>
jp     136d <main+0x24d>
lea    0xcc3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
movss  0x20(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    138d <main+0x26d>
jp     138d <main+0x26d>
lea    0xca3(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
movss  0x24(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    13ad <main+0x28d>
jp     13ad <main+0x28d>
lea    0xc83(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
movss  0x28(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    13cd <main+0x2ad>
jp     13cd <main+0x2ad>
lea    0xc63(%rip),%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
movss  0x2c(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    13ed <main+0x2cd>
jp     13ed <main+0x2cd>
lea    0xc43(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
movss  0x30(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    140d <main+0x2ed>
jp     140d <main+0x2ed>
lea    0xc23(%rip),%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
movss  0x34(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jne    142d <main+0x30d>
jp     142d <main+0x30d>
lea    0xc03(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\0A Entre com av1 do aluno %d : \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [35 x i8] c"\0A Hall das menores notas! Aluno %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x float]
%4 = alloca float
store i32 0, i32* %1
store float 9.990000e+02, float* %4
store i32 0, i32* %2
br label %5
5: ; preds = %28, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 9
br i1 %7, label %8, label %31
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [10 x float], [10 x float]* %3, i64 0, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %14)
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [10 x float], [10 x float]* %3, i64 0, i64 %17
%19 = load float, float* %18
%20 = load float, float* %4
%21 = fcmp olt float %19, %20
br i1 %21, label %22, label %27
22: ; preds = %8
%23 = load i32, i32* %2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x float], [10 x float]* %3, i64 0, i64 %24
%26 = load float, float* %25
store float %26, float* %4
br label %27
27: ; preds = %22, %8
br label %28
28: ; preds = %27
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %5
31: ; preds = %5
store i32 0, i32* %2
br label %32
32: ; preds = %47, %31
%33 = load i32, i32* %2
%34 = icmp sle i32 %33, 9
br i1 %34, label %35, label %50
35: ; preds = %32
%36 = load i32, i32* %2
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [10 x float], [10 x float]* %3, i64 0, i64 %37
%39 = load float, float* %38
%40 = load float, float* %4
%41 = fcmp oeq float %39, %40
br i1 %41, label %42, label %46
42: ; preds = %35
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
%45 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %42, %35
br label %47
47: ; preds = %46
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
br label %32
50: ; preds = %32
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0A Entre com av1 do aluno %d : \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [35 x i8] c"\0A Hall das menores notas! Aluno %d\00"
define i32 @main() {
%1 = alloca [10 x float]
%2 = bitcast [10 x float]* %1 to i8*
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [10 x float], [10 x float]* %1, 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 olt float %6, 9.990000e+02
%8 = select i1 %7, float %6, float 9.990000e+02
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 2)
%10 = getelementptr inbounds [10 x float], [10 x float]* %1, 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 olt float %12, %8
%14 = select i1 %13, float %12, float %8
%15 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 3)
%16 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 2
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %16)
%18 = load float, float* %16
%19 = fcmp olt float %18, %14
%20 = select i1 %19, float %18, float %14
%21 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 4)
%22 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 3
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %22)
%24 = load float, float* %22
%25 = fcmp olt float %24, %20
%26 = select i1 %25, float %24, float %20
%27 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 5)
%28 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 4
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %28)
%30 = load float, float* %28
%31 = fcmp olt float %30, %26
%32 = select i1 %31, float %30, float %26
%33 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 6)
%34 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 5
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %34)
%36 = load float, float* %34
%37 = fcmp olt float %36, %32
%38 = select i1 %37, float %36, float %32
%39 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 7)
%40 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 6
%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 olt float %42, %38
%44 = select i1 %43, float %42, float %38
%45 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 8)
%46 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 7
%47 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %46)
%48 = load float, float* %46
%49 = fcmp olt float %48, %44
%50 = select i1 %49, float %48, float %44
%51 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 9)
%52 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 8
%53 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %52)
%54 = load float, float* %52
%55 = fcmp olt float %54, %50
%56 = select i1 %55, float %54, float %50
%57 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 10)
%58 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 9
%59 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %58)
%60 = load float, float* %58
%61 = fcmp olt float %60, %56
%62 = select i1 %61, float %60, float %56
%63 = load float, float* %4
%64 = fcmp oeq float %63, %62
br i1 %64, label %65, label %67
65: ; preds = %0
%66 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 1)
br label %67
67: ; preds = %0, %65
%68 = load float, float* %10
%69 = fcmp oeq float %68, %62
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 2)
br label %72
72: ; preds = %70, %67
%73 = load float, float* %16
%74 = fcmp oeq float %73, %62
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 3)
br label %77
77: ; preds = %75, %72
%78 = load float, float* %22
%79 = fcmp oeq float %78, %62
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 4)
br label %82
82: ; preds = %80, %77
%83 = load float, float* %28
%84 = fcmp oeq float %83, %62
br i1 %84, label %85, label %87
85: ; preds = %82
%86 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 5)
br label %87
87: ; preds = %85, %82
%88 = load float, float* %34
%89 = fcmp oeq float %88, %62
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 6)
br label %92
92: ; preds = %90, %87
%93 = load float, float* %40
%94 = fcmp oeq float %93, %62
br i1 %94, label %95, label %97
95: ; preds = %92
%96 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 7)
br label %97
97: ; preds = %95, %92
%98 = load float, float* %46
%99 = fcmp oeq float %98, %62
br i1 %99, label %100, label %102
100: ; preds = %97
%101 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 8)
br label %102
102: ; preds = %100, %97
%103 = load float, float* %52
%104 = fcmp oeq float %103, %62
br i1 %104, label %105, label %107
105: ; preds = %102
%106 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 9)
br label %107
107: ; preds = %105, %102
%108 = load float, float* %58
%109 = fcmp oeq float %108, %62
br i1 %109, label %110, label %112
110: ; preds = %107
%111 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 10)
br label %112
112: ; preds = %110, %107
ret i32 0
}