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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0xa,-0x38(%rbp)
jge    11cd <main+0xad>
mov    -0x38(%rbp),%esi
add    $0x1,%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x38(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeac(%rip),%rdi
call   1040 <scanf@plt>
cmpl   $0x0,-0x38(%rbp)
jne    118e <main+0x6e>
movslq -0x38(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    11ba <main+0x9a>
movss  -0x34(%rbp),%xmm1
movslq -0x38(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
ucomiss %xmm1,%xmm0
jbe    11b5 <main+0x95>
movslq -0x38(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x34(%rbp)
jmp    11ba <main+0x9a>
jmp    11bf <main+0x9f>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1137 <main+0x17>
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe3d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0xa,-0x3c(%rbp)
jge    1238 <main+0x118>
movss  -0x34(%rbp),%xmm1
movslq -0x3c(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x30(%rbp,%rax,4)
movslq -0x3c(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe0a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11eb <main+0xcb>
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xec2(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec3(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x18(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x1c(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x20(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x24(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x28(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x2c(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x30(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
mov    %r14,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x34(%rsp),%xmm0
maxss  0xc(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xd04(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xcf3(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x14(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x18(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x18(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x1c(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x1c(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x20(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x20(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x24(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x24(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x28(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x28(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x2c(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x2c(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x30(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x30(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x34(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x34(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"Informe a posicao %d: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [19 x i8] c"Maior valor: %.2f\0A\00"
@.str.3 = [6 x i8] c"%.2f \00"
define void @main() {
%1 = alloca [10 x float]
%2 = bitcast [10 x float]* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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 = fpext float %60 to double
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %61)
%63 = load float, float* %4
%64 = fdiv float %63, %60
store float %64, float* %4
%65 = fpext float %64 to double
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %65)
%67 = load float, float* %8
%68 = fdiv float %67, %60
store float %68, float* %8
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %69)
%71 = load float, float* %14
%72 = fdiv float %71, %60
store float %72, float* %14
%73 = fpext float %72 to double
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %73)
%75 = load float, float* %20
%76 = fdiv float %75, %60
store float %76, float* %20
%77 = fpext float %76 to double
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %77)
%79 = load float, float* %26
%80 = fdiv float %79, %60
store float %80, float* %26
%81 = fpext float %80 to double
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %81)
%83 = load float, float* %32
%84 = fdiv float %83, %60
store float %84, float* %32
%85 = fpext float %84 to double
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %85)
%87 = load float, float* %38
%88 = fdiv float %87, %60
store float %88, float* %38
%89 = fpext float %88 to double
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %89)
%91 = load float, float* %44
%92 = fdiv float %91, %60
store float %92, float* %44
%93 = fpext float %92 to double
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %93)
%95 = load float, float* %50
%96 = fdiv float %95, %60
store float %96, float* %50
%97 = fpext float %96 to double
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %97)
%99 = load float, float* %56
%100 = fdiv float %99, %60
store float %100, float* %56
%101 = fpext float %100 to double
%102 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %101)
%103 = call i32 @putchar(i32 10)
ret void
}