#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*/ getchar();
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
void main() {
  float total[10], comissao[10], contt = 0.0, maior, menor;
  char nomes[10][100];
  int ma, me, i;
  for (i = 0; i < 10; i++) {
    printf("Vendedor #%d\n"
           "Nome: ",
           i + 1);
    gets(nomes[i]);
    printf("Total de vendas: R$");
    scanf(" %f", &total[i]);
    printf("Pencentual de comissao: ");
    scanf(" %f", &comissao[i]);
    printf("\n");
    getchar();
  }
  printf("\n---- VENDEDORES ----\n");
  for (i = 0; i < 10; i++) {
    printf("#%d. %s\n"
           "Comissao a receber: R$%.2f\n",
           i + 1, nomes[i], comissao[i] * total[i] / 100.0);
    contt += total[i];
    if (i == 0) {
      maior = comissao[i] * total[i] / 100.0;
      menor = comissao[i] * total[i] / 100.0;
      ma = 0;
      me = 0;
    } else {
      if (comissao[i] * total[i] / 100.0 > maior) {
        maior = comissao[i] * total[i] / 100.0;
        ma = i;
      }
      if (comissao[i] * total[i] / 100.0 < menor) {
        menor = comissao[i] * total[i] / 100.0;
        me = i;
      }
    }
  }
  printf("\nTotal de todas as vendas: R$%.2f\n"
         "Maior valor a ser recebido: R$%.2f, pelo vendedor %s\n"
         "Menor valor a ser recebido: R$%.2f, pelo vendedor %s\n",
         contt, maior, nomes[ma], menor, nomes[me]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x64(%rbp)
movl   $0x0,-0x46c(%rbp)
cmpl   $0xa,-0x46c(%rbp)
jge    121c <main+0xdc>
mov    -0x46c(%rbp),%esi
add    $0x1,%esi
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x46c(%rbp),%rax
lea    -0x460(%rbp),%rdi
imul   $0x64,%rax,%rax
add    %rax,%rdi
call   1050 <gets@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x46c(%rbp),%rax
lea    -0x30(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6e(%rip),%rdi
call   1060 <scanf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x46c(%rbp),%rax
lea    -0x60(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe42(%rip),%rdi
call   1060 <scanf@plt>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x46c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x46c(%rbp)
jmp    115d <main+0x1d>
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x46c(%rbp)
cmpl   $0xa,-0x46c(%rbp)
jge    1450 <main+0x310>
mov    -0x46c(%rbp),%esi
add    $0x1,%esi
movslq -0x46c(%rbp),%rax
lea    -0x460(%rbp),%rdx
imul   $0x64,%rax,%rax
add    %rax,%rdx
movslq -0x46c(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movslq -0x46c(%rbp),%rax
mulss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd7b(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xdd4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movslq -0x46c(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
addss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
cmpl   $0x0,-0x46c(%rbp)
jne    133a <main+0x1fa>
movslq -0x46c(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movslq -0x46c(%rbp),%rax
mulss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd1f(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
movslq -0x46c(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movslq -0x46c(%rbp),%rax
mulss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcec(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
movl   $0x0,-0x464(%rbp)
movl   $0x0,-0x468(%rbp)
jmp    1437 <main+0x2f7>
movslq -0x46c(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movslq -0x46c(%rbp),%rax
mulss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xca0(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x68(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13b6 <main+0x276>
movslq -0x46c(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movslq -0x46c(%rbp),%rax
mulss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc63(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x46c(%rbp),%eax
mov    %eax,-0x464(%rbp)
movslq -0x46c(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movslq -0x46c(%rbp),%rax
mulss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc24(%rip),%xmm0
divsd  %xmm0,%xmm1
movss  -0x6c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1432 <main+0x2f2>
movslq -0x46c(%rbp),%rax
movss  -0x60(%rbp,%rax,4),%xmm0
movslq -0x46c(%rbp),%rax
mulss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbe7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x6c(%rbp)
mov    -0x46c(%rbp),%eax
mov    %eax,-0x468(%rbp)
jmp    1437 <main+0x2f7>
jmp    143c <main+0x2fc>
mov    -0x46c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x46c(%rbp)
jmp    1234 <main+0xf4>
movss  -0x64(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x68(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movslq -0x464(%rbp),%rax
lea    -0x460(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
movss  -0x6c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movslq -0x468(%rbp),%rax
lea    -0x460(%rbp),%rdx
imul   $0x64,%rax,%rax
add    %rax,%rdx
lea    0xbec(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
add    $0x470,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x458,%rsp
lea    0x10(%rsp),%r14
lea    0x40(%rsp),%rbp
lea    0x70(%rsp),%rbx
mov    $0xfffffffffffffff6,%r12
lea    0xea6(%rip),%r13
lea    0xea3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xb(%r12),%esi
lea    0xe60(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1070 <gets@plt>
lea    0xe5e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1080 <scanf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1080 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
add    $0x4,%r14
add    $0x4,%rbp
add    $0x64,%rbx
inc    %r12
jne    11a0 <main+0x40>
lea    0xef0(%rip),%rdi
call   1040 <puts@plt>
movss  0x10(%rsp),%xmm0
mulss  0x40(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xdd1(%rip),%xmm0
lea    0xe1b(%rip),%rdi
lea    0x70(%rsp),%rdx
mov    $0x1,%esi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x40(%rsp),%xmm3
xorpd  %xmm0,%xmm0
addss  %xmm3,%xmm0
mulss  0x10(%rsp),%xmm3
divss  0xda5(%rip),%xmm3
lea    0xd4(%rsp),%r13
xor    %r15d,%r15d
mov    $0x1,%ebx
mov    $0x2,%ebp
xor    %r12d,%r12d
movaps %xmm3,%xmm4
jmp    12ab <main+0x14b>
cmova  %ebx,%r15d
movss  0xc(%rsp),%xmm3
addss  %xmm0,%xmm3
movaps %xmm3,%xmm0
add    $0x64,%r13
add    $0x1,%ebp
mov    %r14,%rbx
movaps %xmm2,%xmm3
movaps %xmm1,%xmm4
cmp    $0xa,%r14
je     1352 <main+0x1f2>
movss  %xmm4,0x4(%rsp)
movss  %xmm3,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
lea    0x1(%rbx),%r14
movss  0x10(%rsp,%rbx,4),%xmm0
mulss  0x40(%rsp,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd27(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xd6d(%rip),%rdi
mov    %ebp,%esi
mov    %r13,%rdx
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x4(%rsp),%xmm4
movss  0x40(%rsp,%rbx,4),%xmm0
movss  0x10(%rsp,%rbx,4),%xmm1
mulss  %xmm0,%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
divsd  0xceb(%rip),%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm4,%xmm1
ucomisd %xmm1,%xmm3
xorps  %xmm2,%xmm2
cvtsd2ss %xmm3,%xmm2
movaps %xmm2,%xmm1
ja     132f <main+0x1cf>
movaps %xmm4,%xmm1
cmova  %ebx,%r12d
movss  0x8(%rsp),%xmm5
xorps  %xmm4,%xmm4
cvtss2sd %xmm5,%xmm4
ucomisd %xmm3,%xmm4
ja     1280 <main+0x120>
movaps %xmm5,%xmm2
jmp    1280 <main+0x120>
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movslq %r12d,%rax
imul   $0x64,%rax,%rax
lea    (%rsp,%rax,1),%rsi
add    $0x70,%rsi
cvtss2sd %xmm2,%xmm2
movslq %r15d,%rax
imul   $0x64,%rax,%rax
lea    (%rsp,%rax,1),%rdx
add    $0x70,%rdx
lea    0xcf2(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
add    $0x458,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Vendedor #%d\0ANome: \00"
@.str.1 = [20 x i8] c"Total de vendas: R$\00"
@.str.2 = [4 x i8] c" %f\00"
@.str.3 = [25 x i8] c"Pencentual de comissao: \00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [23 x i8] c"\0A---- VENDEDORES ----\0A\00"
@.str.6 = [36 x i8] c"#%d. %s\0AComissao a receber: R$%.2f\0A\00"
@.str.7 = [141 x i8] c"\0ATotal de todas as vendas: R$%.2f\0AMaior valor a ser recebido: R$%.2f, pelo vendedor %s\0AMenor valor a ser recebido: R$%.2f, pelo vendedor %s\0A\00"
define void @main() {
%1 = alloca [10 x float]
%2 = alloca [10 x float]
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca [10 x [100 x i8]]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store float 0.000000e+00, float* %3
store i32 0, i32* %9
br label %10
10: ; preds = %34, %0
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %37
13: ; preds = %10
%14 = load i32, i32* %9
%15 = add nsw i32 %14, 1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %9
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %6, i64 0, i64 %18
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%21 = call i32 @gets(i8* %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%23 = load i32, i32* %9
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %24
%26 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%28 = load i32, i32* %9
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %29
%31 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%33 = call i32 (...) @getchar()
br label %34
34: ; preds = %13
%35 = load i32, i32* %9
%36 = add nsw i32 %35, 1
store i32 %36, i32* %9
br label %10
37: ; preds = %10
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %9
br label %39
39: ; preds = %154, %37
%40 = load i32, i32* %9
%41 = icmp slt i32 %40, 10
br i1 %41, label %42, label %157
42: ; preds = %39
%43 = load i32, i32* %9
%44 = add nsw i32 %43, 1
%45 = load i32, i32* %9
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %6, i64 0, i64 %46
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %47, i64 0, i64 0
%49 = load i32, i32* %9
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %50
%52 = load float, float* %51
%53 = load i32, i32* %9
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %54
%56 = load float, float* %55
%57 = fmul float %52, %56
%58 = fpext float %57 to double
%59 = fdiv double %58, 1.000000e+02
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %44, i8* %48, double %59)
%61 = load i32, i32* %9
%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 = load float, float* %3
%66 = fadd float %65, %64
store float %66, float* %3
%67 = load i32, i32* %9
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %94
69: ; preds = %42
%70 = load i32, i32* %9
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %71
%73 = load float, float* %72
%74 = load i32, i32* %9
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %75
%77 = load float, float* %76
%78 = fmul float %73, %77
%79 = fpext float %78 to double
%80 = fdiv double %79, 1.000000e+02
%81 = fptrunc double %80 to float
store float %81, float* %4
%82 = load i32, i32* %9
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %83
%85 = load float, float* %84
%86 = load i32, i32* %9
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %87
%89 = load float, float* %88
%90 = fmul float %85, %89
%91 = fpext float %90 to double
%92 = fdiv double %91, 1.000000e+02
%93 = fptrunc double %92 to float
store float %93, float* %5
store i32 0, i32* %7
store i32 0, i32* %8
br label %153
94: ; preds = %42
%95 = load i32, i32* %9
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %96
%98 = load float, float* %97
%99 = load i32, i32* %9
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %100
%102 = load float, float* %101
%103 = fmul float %98, %102
%104 = fpext float %103 to double
%105 = fdiv double %104, 1.000000e+02
%106 = load float, float* %4
%107 = fpext float %106 to double
%108 = fcmp ogt double %105, %107
br i1 %108, label %109, label %123
109: ; preds = %94
%110 = load i32, i32* %9
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %111
%113 = load float, float* %112
%114 = load i32, i32* %9
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %115
%117 = load float, float* %116
%118 = fmul float %113, %117
%119 = fpext float %118 to double
%120 = fdiv double %119, 1.000000e+02
%121 = fptrunc double %120 to float
store float %121, float* %4
%122 = load i32, i32* %9
store i32 %122, i32* %7
br label %123
123: ; preds = %109, %94
%124 = load i32, i32* %9
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %125
%127 = load float, float* %126
%128 = load i32, i32* %9
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %129
%131 = load float, float* %130
%132 = fmul float %127, %131
%133 = fpext float %132 to double
%134 = fdiv double %133, 1.000000e+02
%135 = load float, float* %5
%136 = fpext float %135 to double
%137 = fcmp olt double %134, %136
br i1 %137, label %138, label %152
138: ; preds = %123
%139 = load i32, i32* %9
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %140
%142 = load float, float* %141
%143 = load i32, i32* %9
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %144
%146 = load float, float* %145
%147 = fmul float %142, %146
%148 = fpext float %147 to double
%149 = fdiv double %148, 1.000000e+02
%150 = fptrunc double %149 to float
store float %150, float* %5
%151 = load i32, i32* %9
store i32 %151, i32* %8
br label %152
152: ; preds = %138, %123
br label %153
153: ; preds = %152, %69
br label %154
154: ; preds = %153
%155 = load i32, i32* %9
%156 = add nsw i32 %155, 1
store i32 %156, i32* %9
br label %39
157: ; preds = %39
%158 = load float, float* %3
%159 = fpext float %158 to double
%160 = load float, float* %4
%161 = fpext float %160 to double
%162 = load i32, i32* %7
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %6, i64 0, i64 %163
%165 = getelementptr inbounds [100 x i8], [100 x i8]* %164, i64 0, i64 0
%166 = load float, float* %5
%167 = fpext float %166 to double
%168 = load i32, i32* %8
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %6, i64 0, i64 %169
%171 = getelementptr inbounds [100 x i8], [100 x i8]* %170, i64 0, i64 0
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.7, i64 0, i64 0), double %159, double %161, i8* %165, double %167, i8* %171)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Vendedor #%d\0ANome: \00"
@.str.1 = [20 x i8] c"Total de vendas: R$\00"
@.str.2 = [4 x i8] c" %f\00"
@.str.3 = [25 x i8] c"Pencentual de comissao: \00"
@.str.6 = [36 x i8] c"#%d. %s\0AComissao a receber: R$%.2f\0A\00"
@.str.7 = [141 x i8] c"\0ATotal de todas as vendas: R$%.2f\0AMaior valor a ser recebido: R$%.2f, pelo vendedor %s\0AMenor valor a ser recebido: R$%.2f, pelo vendedor %s\0A\00"
@str = [22 x i8] c"\0A---- VENDEDORES ----\00"
define void @main() {
%1 = alloca [10 x float]
%2 = alloca [10 x float]
%3 = alloca [10 x [100 x i8]]
%4 = bitcast [10 x float]* %1 to i8*
%5 = bitcast [10 x float]* %2 to i8*
%6 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %3, i64 0, i64 0, i64 0
br label %7
7: ; preds = %0, %7
%8 = phi i64 [ 0, %0 ], [ %9, %7 ]
%9 = add nuw nsw i64 %8, 1
%10 = trunc i64 %9 to i32
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %3, i64 0, i64 %8, i64 0
%13 = call i32 @gets(i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%15 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %8
%16 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %15)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%18 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %8
%19 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %18)
%20 = call i32 @putchar(i32 10)
%21 = call i32 (...) @getchar()
%22 = icmp eq i64 %9, 10
br i1 %22, label %23, label %7
23: ; preds = %7
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%25 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 0
%26 = load float, float* %25
%27 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 0
%28 = load float, float* %27
%29 = fmul float %26, %28
%30 = fpext float %29 to double
%31 = fdiv double %30, 1.000000e+02
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 1, i8* %6, double %31)
%33 = load float, float* %27
%34 = fadd float %33, 0.000000e+00
%35 = load float, float* %25
%36 = fmul float %33, %35
%37 = fdiv float %36, 1.000000e+02
br label %38
38: ; preds = %38, %23
%39 = phi i64 [ 1, %23 ], [ %45, %38 ]
%40 = phi i32 [ 0, %23 ], [ %71, %38 ]
%41 = phi i32 [ 0, %23 ], [ %67, %38 ]
%42 = phi float [ %37, %23 ], [ %70, %38 ]
%43 = phi float [ %37, %23 ], [ %65, %38 ]
%44 = phi float [ %34, %23 ], [ %57, %38 ]
%45 = add nuw nsw i64 %39, 1
%46 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %3, i64 0, i64 %39, i64 0
%47 = getelementptr inbounds [10 x float], [10 x float]* %2, i64 0, i64 %39
%48 = load float, float* %47
%49 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 %39
%50 = load float, float* %49
%51 = fmul float %48, %50
%52 = fpext float %51 to double
%53 = fdiv double %52, 1.000000e+02
%54 = trunc i64 %45 to i32
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i32 %54, i8* %46, double %53)
%56 = load float, float* %49
%57 = fadd float %44, %56
%58 = load float, float* %47
%59 = fmul float %56, %58
%60 = fpext float %59 to double
%61 = fdiv double %60, 1.000000e+02
%62 = fpext float %43 to double
%63 = fcmp ogt double %61, %62
%64 = fptrunc double %61 to float
%65 = select i1 %63, float %64, float %43
%66 = trunc i64 %39 to i32
%67 = select i1 %63, i32 %66, i32 %41
%68 = fpext float %42 to double
%69 = fcmp olt double %61, %68
%70 = select i1 %69, float %64, float %42
%71 = select i1 %69, i32 %66, i32 %40
%72 = icmp eq i64 %45, 10
br i1 %72, label %73, label %38
73: ; preds = %38
%74 = fpext float %57 to double
%75 = fpext float %65 to double
%76 = sext i32 %67 to i64
%77 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %3, i64 0, i64 %76, i64 0
%78 = fpext float %70 to double
%79 = sext i32 %71 to i64
%80 = getelementptr inbounds [10 x [100 x i8]], [10 x [100 x i8]]* %3, i64 0, i64 %79, i64 0
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([141 x i8], [141 x i8]* @.str.7, i64 0, i64 0), double %74, double %75, i8* %77, double %78, i8* %80)
ret void
}