#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 *);
void main() {
  float vetor[10], maior;
  for (int i = 0; i < 10; i++) {
    printf("Informe o valor da posicao %d: ", i + 1);
    scanf("%f", &vetor[i]);
    if (i == 0) {
      maior = vetor[i];
    } else if (maior < vetor[i]) {
      maior = vetor[i];
    }
  }
  for (int i = 0; i < 10; i++) {
    vetor[i] /= maior;
  }
  for (int i = 0; i < 10; i++) {
    printf("Vetor[%d] = %.2f\n", i, vetor[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x38(%rbp)
cmpl   $0xa,-0x38(%rbp)
jge    11c5 <main+0xa5>
mov    -0x38(%rbp),%esi
add    $0x1,%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x38(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xebd(%rip),%rdi
call   1040 <scanf@plt>
cmpl   $0x0,-0x38(%rbp)
jne    1186 <main+0x66>
movslq -0x38(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    11b2 <main+0x92>
movss  -0x34(%rbp),%xmm1
movslq -0x38(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
ucomiss %xmm1,%xmm0
jbe    11ad <main+0x8d>
movslq -0x38(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    11b2 <main+0x92>
jmp    11b7 <main+0x97>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    112f <main+0xf>
movl   $0x0,-0x3c(%rbp)
cmpl   $0xa,-0x3c(%rbp)
jge    11fd <main+0xdd>
movss  -0x34(%rbp),%xmm1
movslq -0x3c(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp,%rax,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11cc <main+0xac>
movl   $0x0,-0x40(%rbp)
cmpl   $0xa,-0x40(%rbp)
jge    123b <main+0x11b>
mov    -0x40(%rbp),%esi
movslq -0x40(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdfd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1204 <main+0xe4>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xed2(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x18(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x20(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x24(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x28(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x2c(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x30(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x34(%rsp),%xmm0
movaps %xmm0,%xmm1
maxss  0xc(%rsp),%xmm1
movaps %xmm1,%xmm2
shufps $0x0,%xmm1,%xmm2
movaps 0x10(%rsp),%xmm3
movaps 0x20(%rsp),%xmm4
divps  %xmm2,%xmm3
movaps %xmm3,0x10(%rsp)
divps  %xmm2,%xmm4
movaps %xmm4,0x20(%rsp)
movss  0x30(%rsp),%xmm2
divss  %xmm1,%xmm2
movss  %xmm2,0x30(%rsp)
divss  %xmm1,%xmm0
movss  %xmm0,0x34(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
lea    0xce2(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x2c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x30(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x34(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Informe o valor da posicao %d: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Vetor[%d] = %.2f\0A\00"
define void @main() {
%1 = alloca [10 x float]
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %3
br label %6
6: ; preds = %38, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %41
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %15)
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %9
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %21
%23 = load float, float* %22
store float %23, float* %2
br label %37
24: ; preds = %9
%25 = load float, float* %2
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %27
%29 = load float, float* %28
%30 = fcmp olt float %25, %29
br i1 %30, label %31, label %36
31: ; preds = %24
%32 = load i32, i32* %3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %33
%35 = load float, float* %34
store float %35, float* %2
br label %36
36: ; preds = %31, %24
br label %37
37: ; preds = %36, %19
br label %38
38: ; preds = %37
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
br label %6
41: ; preds = %6
store i32 0, i32* %4
br label %42
42: ; preds = %52, %41
%43 = load i32, i32* %4
%44 = icmp slt i32 %43, 10
br i1 %44, label %45, label %55
45: ; preds = %42
%46 = load float, float* %2
%47 = load i32, i32* %4
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %48
%50 = load float, float* %49
%51 = fdiv float %50, %46
store float %51, float* %49
br label %52
52: ; preds = %45
%53 = load i32, i32* %4
%54 = add nsw i32 %53, 1
store i32 %54, i32* %4
br label %42
55: ; preds = %42
store i32 0, i32* %5
br label %56
56: ; preds = %67, %55
%57 = load i32, i32* %5
%58 = icmp slt i32 %57, 10
br i1 %58, label %59, label %70
59: ; preds = %56
%60 = load i32, i32* %5
%61 = load i32, i32* %5
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %62
%64 = load float, float* %63
%65 = fpext float %64 to double
%66 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %60, double %65)
br label %67
67: ; preds = %59
%68 = load i32, i32* %5
%69 = add nsw i32 %68, 1
store i32 %69, i32* %5
br label %56
70: ; preds = %56
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Informe o valor da posicao %d: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Vetor[%d] = %.2f\0A\00"
define void @main() {
%1 = alloca [10 x float]
%2 = bitcast [10 x float]* %1 to i8*
%3 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 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 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 2)
%8 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 1
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %8)
%10 = load float, float* %8
%11 = fcmp olt float %6, %10
%12 = select i1 %11, float %10, float %6
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 3)
%14 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 2
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %14)
%16 = load float, float* %14
%17 = fcmp olt float %12, %16
%18 = select i1 %17, float %16, float %12
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 4)
%20 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 3
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %20)
%22 = load float, float* %20
%23 = fcmp olt float %18, %22
%24 = select i1 %23, float %22, float %18
%25 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 5)
%26 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 4
%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 olt float %24, %28
%30 = select i1 %29, float %28, float %24
%31 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 6)
%32 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 5
%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 olt float %30, %34
%36 = select i1 %35, float %34, float %30
%37 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 7)
%38 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 6
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %38)
%40 = load float, float* %38
%41 = fcmp olt float %36, %40
%42 = select i1 %41, float %40, float %36
%43 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 8)
%44 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 7
%45 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %44)
%46 = load float, float* %44
%47 = fcmp olt float %42, %46
%48 = select i1 %47, float %46, float %42
%49 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 9)
%50 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 8
%51 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %50)
%52 = load float, float* %50
%53 = fcmp olt float %48, %52
%54 = select i1 %53, float %52, float %48
%55 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 10)
%56 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 9
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %56)
%58 = load float, float* %56
%59 = fcmp olt float %54, %58
%60 = select i1 %59, float %58, float %54
%61 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 1
%62 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 2
%63 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 3
%64 = bitcast [10 x float]* %1 to <4 x float>*
%65 = load <4 x float>, <4 x float>* %64
%66 = insertelement <4 x float> poison, float %60, i64 0
%67 = shufflevector <4 x float> %66, <4 x float> poison, <4 x i32> zeroinitializer
%68 = fdiv <4 x float> %65, %67
%69 = bitcast [10 x float]* %1 to <4 x float>*
store <4 x float> %68, <4 x float>* %69
%70 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 4
%71 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 5
%72 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 6
%73 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 7
%74 = bitcast float* %70 to <4 x float>*
%75 = load <4 x float>, <4 x float>* %74
%76 = fdiv <4 x float> %75, %67
%77 = bitcast float* %70 to <4 x float>*
store <4 x float> %76, <4 x float>* %77
%78 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 8
%79 = load float, float* %78
%80 = fdiv float %79, %60
store float %80, float* %78
%81 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 9
%82 = load float, float* %81
%83 = fdiv float %82, %60
store float %83, float* %81
%84 = extractelement <4 x float> %68, i64 0
%85 = fpext float %84 to double
%86 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 0, double %85)
%87 = load float, float* %61
%88 = fpext float %87 to double
%89 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 1, double %88)
%90 = load float, float* %62
%91 = fpext float %90 to double
%92 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 2, double %91)
%93 = load float, float* %63
%94 = fpext float %93 to double
%95 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 3, double %94)
%96 = load float, float* %70
%97 = fpext float %96 to double
%98 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 4, double %97)
%99 = load float, float* %71
%100 = fpext float %99 to double
%101 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 5, double %100)
%102 = load float, float* %72
%103 = fpext float %102 to double
%104 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 6, double %103)
%105 = load float, float* %73
%106 = fpext float %105 to double
%107 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 7, double %106)
%108 = load float, float* %78
%109 = fpext float %108 to double
%110 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 8, double %109)
%111 = load float, float* %81
%112 = fpext float %111 to double
%113 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 9, double %112)
ret void
}