#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*/ clearIBuffer();
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  char r;
  float arsenico, cadmio, promedio_arsenico, porcentaje_agricola,
      porcentaje_pecuario, porcentaje_domestico, porcentaje_sc,
      acumulador_arsenico_pecuario;
  int contador_muestras, contador_agricola, contador_pecuario,
      contador_domestico, contador_sin_clasificacion;
  contador_agricola = contador_pecuario = contador_domestico =
      contador_sin_clasificacion = 0;
  acumulador_arsenico_pecuario = 0;
  contador_muestras = 1;
  do {
    printf("Muestra #%d:\nIngrese la cantidad de los elementos presentes en la "
           "muestra de agua.",
           contador_muestras);
    do {
      printf("\n\nArsenico = ");
      scanf("%f", &arsenico);
    } while (arsenico < 0);
    do {
      printf("\nCadmio = ");
      scanf("%f", &cadmio);
    } while (cadmio < 0);
    if (arsenico >= 0.2 && arsenico <= 0.6 && cadmio >= 0.01 && cadmio <= 0.09)
      contador_agricola++;
    else {
      if (arsenico >= 0.7 && arsenico <= 1.2 && cadmio >= 0.10 &&
          cadmio <= 0.13) {
        contador_pecuario++;
        acumulador_arsenico_pecuario += arsenico;
      } else {
        if (arsenico >= 1.3 && arsenico <= 2.1 && cadmio >= 0.14 &&
            cadmio <= 0.25)
          contador_domestico++;
        else
          contador_sin_clasificacion++;
      }
    }
    printf("Desea registrar otra muestra? (s/n)");
    clearIBuffer();
    r = getchar();
  } while (r == 's' || r == 'S');
  porcentaje_agricola = contador_agricola / contador_muestras * 100;
  porcentaje_pecuario = contador_pecuario / contador_muestras * 100;
  porcentaje_domestico = contador_domestico / contador_muestras * 100;
  porcentaje_sc = contador_sin_clasificacion / contador_muestras * 100;
  promedio_arsenico = acumulador_arsenico_pecuario / contador_pecuario;
  printf("\n\n\tINFORME\n\nCantidad de muestras analizadas = %d.",
         contador_muestras);
  printf("\nMuestras agricola = %d, Porcentaje = %f.", contador_agricola,
         porcentaje_agricola);
  printf("\nMuestras pecuario = %d, Porcentaje = %f.", contador_pecuario,
         porcentaje_pecuario);
  printf("\nMuestras domestico = %d, Porcentaje = %f.", contador_domestico,
         porcentaje_domestico);
  printf("\nMuestras sin clasificacion = %d, Porcentaje = %f.",
         contador_sin_clasificacion, porcentaje_sc);
  printf("\n\nEl promedio de arsenico en muestars de tipo pecuario fue %f.\n",
         promedio_arsenico);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf21(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <scanf@plt>
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
ja     118b <main+0x4b>
jmp    11bb <main+0x7b>
lea    0xf02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
xorps  %xmm0,%xmm0
ucomiss -0x10(%rbp),%xmm0
ja     11bb <main+0x7b>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe09(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1260 <main+0x120>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdf6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1260 <main+0x120>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xde3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1260 <main+0x120>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdd0(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1260 <main+0x120>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1376 <main+0x236>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdaf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12e9 <main+0x1a9>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd9c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     12e9 <main+0x1a9>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd89(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12e9 <main+0x1a9>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd76(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     12e9 <main+0x1a9>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movss  -0xc(%rbp),%xmm0
addss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
jmp    1371 <main+0x231>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd46(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1363 <main+0x223>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd33(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1363 <main+0x223>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd20(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1363 <main+0x223>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd0d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1363 <main+0x223>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    136c <main+0x22c>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1371 <main+0x231>
jmp    1376 <main+0x236>
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <clearIBuffer@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x73,%ecx
mov    %al,-0x3d(%rbp)
je     13b4 <main+0x274>
movsbl -0x5(%rbp),%eax
cmp    $0x53,%eax
sete   %al
mov    %al,-0x3d(%rbp)
mov    -0x3d(%rbp),%al
test   $0x1,%al
jne    117a <main+0x3a>
mov    -0x30(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
imul   $0x64,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x34(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
imul   $0x64,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x38(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
imul   $0x64,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0x3c(%rbp),%eax
cltd
idivl  -0x2c(%rbp)
imul   $0x64,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x28(%rbp),%xmm0
cvtsi2ssl -0x34(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xccb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xce3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcf3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd03(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd14(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd30(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xf5a(%rip),%rbp
lea    0xf61(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xf58(%rip),%r12
lea    0x24(%rsp),%r13
xorps  %xmm0,%xmm0
movss  %xmm0,(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
xor    %ebx,%ebx
jmp    11c9 <main+0x89>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
lea    0xf21(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <clearIBuffer@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
and    $0xdf,%al
cmp    $0x53,%al
jne    131d <main+0x1dd>
lea    0xe8c(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
nopl   0x0(%rax)
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
xorps  %xmm0,%xmm0
ucomiss 0x10(%rsp),%xmm0
ja     11e0 <main+0xa0>
nop
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
call   1060 <scanf@plt>
xorps  %xmm1,%xmm1
movss  0x24(%rsp),%xmm0
ucomiss %xmm0,%xmm1
ja     1200 <main+0xc0>
movss  0x10(%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm1,%xmm2
ucomisd 0xdc8(%rip),%xmm2
jb     1280 <main+0x140>
movsd  0xdc6(%rip),%xmm3
ucomisd %xmm2,%xmm3
jb     1280 <main+0x140>
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
ucomisd 0xdb9(%rip),%xmm3
jb     1280 <main+0x140>
movsd  0xdb7(%rip),%xmm4
ucomisd %xmm3,%xmm4
jb     1280 <main+0x140>
addl   $0x1,0xc(%rsp)
jmp    11a3 <main+0x63>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
ucomisd 0xd98(%rip),%xmm2
jb     12d0 <main+0x190>
movsd  0xd96(%rip),%xmm3
ucomisd %xmm2,%xmm3
jb     12d0 <main+0x190>
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
ucomisd 0xd89(%rip),%xmm3
jb     12d0 <main+0x190>
movsd  0xd87(%rip),%xmm4
ucomisd %xmm3,%xmm4
jb     12d0 <main+0x190>
addl   $0x1,0x8(%rsp)
movss  (%rsp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rsp)
jmp    11a3 <main+0x63>
nop
ucomisd 0xd68(%rip),%xmm2
jb     11a0 <main+0x60>
movsd  0xd62(%rip),%xmm1
ucomisd %xmm2,%xmm1
jb     11a0 <main+0x60>
movss  0xd60(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     11a0 <main+0x60>
cvtss2sd %xmm0,%xmm0
ucomisd 0xd43(%rip),%xmm0
jb     11a0 <main+0x60>
addl   $0x1,0x4(%rsp)
jmp    11a3 <main+0x63>
mov    0xc(%rsp),%r15d
imul   $0x64,%r15d,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x14(%rsp)
mov    0x8(%rsp),%ebp
imul   $0x64,%ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x18(%rsp)
mov    0x4(%rsp),%r14d
imul   $0x64,%r14d,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x1c(%rsp)
imul   $0x64,%ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
lea    0xd66(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd7b(%rip),%rdi
mov    %r15d,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd8a(%rip),%rdi
mov    %ebp,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd9a(%rip),%rdi
mov    %r14d,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdaa(%rip),%rdi
mov    %ebx,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdc4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [83 x i8] c"Muestra #%d:\0AIngrese la cantidad de los elementos presentes en la muestra de agua.\00"
@.str.1 = [14 x i8] c"\0A\0AArsenico = \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [11 x i8] c"\0ACadmio = \00"
@.str.4 = [36 x i8] c"Desea registrar otra muestra? (s/n)\00"
@.str.5 = [50 x i8] c"\0A\0A\09INFORME\0A\0ACantidad de muestras analizadas = %d.\00"
@.str.6 = [42 x i8] c"\0AMuestras agricola = %d, Porcentaje = %f.\00"
@.str.7 = [42 x i8] c"\0AMuestras pecuario = %d, Porcentaje = %f.\00"
@.str.8 = [43 x i8] c"\0AMuestras domestico = %d, Porcentaje = %f.\00"
@.str.9 = [51 x i8] c"\0AMuestras sin clasificacion = %d, Porcentaje = %f.\00"
@.str.10 = [64 x i8] c"\0A\0AEl promedio de arsenico en muestars de tipo pecuario fue %f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %15
store i32 0, i32* %14
store i32 0, i32* %13
store i32 0, i32* %12
store float 0.000000e+00, float* %10
store i32 1, i32* %11
br label %16
16: ; preds = %109, %0
%17 = load i32, i32* %11
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %22, %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
br label %22
22: ; preds = %19
%23 = load float, float* %3
%24 = fcmp olt float %23, 0.000000e+00
br i1 %24, label %19, label %25
25: ; preds = %22
br label %26
26: ; preds = %29, %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
br label %29
29: ; preds = %26
%30 = load float, float* %4
%31 = fcmp olt float %30, 0.000000e+00
br i1 %31, label %26, label %32
32: ; preds = %29
%33 = load float, float* %3
%34 = fpext float %33 to double
%35 = fcmp oge double %34, 2.000000e-01
br i1 %35, label %36, label %51
36: ; preds = %32
%37 = load float, float* %3
%38 = fpext float %37 to double
%39 = fcmp ole double %38, 6.000000e-01
br i1 %39, label %40, label %51
40: ; preds = %36
%41 = load float, float* %4
%42 = fpext float %41 to double
%43 = fcmp oge double %42, 1.000000e-02
br i1 %43, label %44, label %51
44: ; preds = %40
%45 = load float, float* %4
%46 = fpext float %45 to double
%47 = fcmp ole double %46, 0x3FB70A3D70A3D70A
br i1 %47, label %48, label %51
48: ; preds = %44
%49 = load i32, i32* %12
%50 = add nsw i32 %49, 1
store i32 %50, i32* %12
br label %97
51: ; preds = %44, %40, %36, %32
%52 = load float, float* %3
%53 = fpext float %52 to double
%54 = fcmp oge double %53, 0x3FE6666666666666
br i1 %54, label %55, label %73
55: ; preds = %51
%56 = load float, float* %3
%57 = fpext float %56 to double
%58 = fcmp ole double %57, 1.200000e+00
br i1 %58, label %59, label %73
59: ; preds = %55
%60 = load float, float* %4
%61 = fpext float %60 to double
%62 = fcmp oge double %61, 1.000000e-01
br i1 %62, label %63, label %73
63: ; preds = %59
%64 = load float, float* %4
%65 = fpext float %64 to double
%66 = fcmp ole double %65, 1.300000e-01
br i1 %66, label %67, label %73
67: ; preds = %63
%68 = load i32, i32* %13
%69 = add nsw i32 %68, 1
store i32 %69, i32* %13
%70 = load float, float* %3
%71 = load float, float* %10
%72 = fadd float %71, %70
store float %72, float* %10
br label %96
73: ; preds = %63, %59, %55, %51
%74 = load float, float* %3
%75 = fpext float %74 to double
%76 = fcmp oge double %75, 1.300000e+00
br i1 %76, label %77, label %92
77: ; preds = %73
%78 = load float, float* %3
%79 = fpext float %78 to double
%80 = fcmp ole double %79, 2.100000e+00
br i1 %80, label %81, label %92
81: ; preds = %77
%82 = load float, float* %4
%83 = fpext float %82 to double
%84 = fcmp oge double %83, 1.400000e-01
br i1 %84, label %85, label %92
85: ; preds = %81
%86 = load float, float* %4
%87 = fpext float %86 to double
%88 = fcmp ole double %87, 2.500000e-01
br i1 %88, label %89, label %92
89: ; preds = %85
%90 = load i32, i32* %14
%91 = add nsw i32 %90, 1
store i32 %91, i32* %14
br label %95
92: ; preds = %85, %81, %77, %73
%93 = load i32, i32* %15
%94 = add nsw i32 %93, 1
store i32 %94, i32* %15
br label %95
95: ; preds = %92, %89
br label %96
96: ; preds = %95, %67
br label %97
97: ; preds = %96, %48
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%99 = call i32 (...) @clearIBuffer()
%100 = call signext i8 (...) @getchar()
store i8 %100, i8* %2
br label %101
101: ; preds = %97
%102 = load i8, i8* %2
%103 = sext i8 %102 to i32
%104 = icmp eq i32 %103, 115
br i1 %104, label %109, label %105
105: ; preds = %101
%106 = load i8, i8* %2
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %107, 83
br label %109
109: ; preds = %105, %101
%110 = phi i1 [ true, %101 ], [ %108, %105 ]
br i1 %110, label %16, label %111
111: ; preds = %109
%112 = load i32, i32* %12
%113 = load i32, i32* %11
%114 = sdiv i32 %112, %113
%115 = mul nsw i32 %114, 100
%116 = sitofp i32 %115 to float
store float %116, float* %6
%117 = load i32, i32* %13
%118 = load i32, i32* %11
%119 = sdiv i32 %117, %118
%120 = mul nsw i32 %119, 100
%121 = sitofp i32 %120 to float
store float %121, float* %7
%122 = load i32, i32* %14
%123 = load i32, i32* %11
%124 = sdiv i32 %122, %123
%125 = mul nsw i32 %124, 100
%126 = sitofp i32 %125 to float
store float %126, float* %8
%127 = load i32, i32* %15
%128 = load i32, i32* %11
%129 = sdiv i32 %127, %128
%130 = mul nsw i32 %129, 100
%131 = sitofp i32 %130 to float
store float %131, float* %9
%132 = load float, float* %10
%133 = load i32, i32* %13
%134 = sitofp i32 %133 to float
%135 = fdiv float %132, %134
store float %135, float* %5
%136 = load i32, i32* %11
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i32 %136)
%138 = load i32, i32* %12
%139 = load float, float* %6
%140 = fpext float %139 to double
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i32 %138, double %140)
%142 = load i32, i32* %13
%143 = load float, float* %7
%144 = fpext float %143 to double
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i32 %142, double %144)
%146 = load i32, i32* %14
%147 = load float, float* %8
%148 = fpext float %147 to double
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %146, double %148)
%150 = load i32, i32* %15
%151 = load float, float* %9
%152 = fpext float %151 to double
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %150, double %152)
%154 = load float, float* %5
%155 = fpext float %154 to double
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.10, i64 0, i64 0), double %155)
ret i32 0
}

LLVM IR (-O2):
@.str = [83 x i8] c"Muestra #%d:\0AIngrese la cantidad de los elementos presentes en la muestra de agua.\00"
@.str.1 = [14 x i8] c"\0A\0AArsenico = \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [11 x i8] c"\0ACadmio = \00"
@.str.4 = [36 x i8] c"Desea registrar otra muestra? (s/n)\00"
@.str.5 = [50 x i8] c"\0A\0A\09INFORME\0A\0ACantidad de muestras analizadas = %d.\00"
@.str.6 = [42 x i8] c"\0AMuestras agricola = %d, Porcentaje = %f.\00"
@.str.7 = [42 x i8] c"\0AMuestras pecuario = %d, Porcentaje = %f.\00"
@.str.8 = [43 x i8] c"\0AMuestras domestico = %d, Porcentaje = %f.\00"
@.str.9 = [51 x i8] c"\0AMuestras sin clasificacion = %d, Porcentaje = %f.\00"
@.str.10 = [64 x i8] c"\0A\0AEl promedio de arsenico en muestars de tipo pecuario fue %f.\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
br label %5
5: ; preds = %60, %0
%6 = phi float [ 0.000000e+00, %0 ], [ %61, %60 ]
%7 = phi i32 [ 0, %0 ], [ %62, %60 ]
%8 = phi i32 [ 0, %0 ], [ %63, %60 ]
%9 = phi i32 [ 0, %0 ], [ %64, %60 ]
%10 = phi i32 [ 0, %0 ], [ %65, %60 ]
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 1)
br label %12
12: ; preds = %12, %5
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%15 = load float, float* %1
%16 = fcmp olt float %15, 0.000000e+00
br i1 %16, label %12, label %17
17: ; preds = %12, %17
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%20 = load float, float* %2
%21 = fcmp olt float %20, 0.000000e+00
br i1 %21, label %17, label %22
22: ; preds = %17
%23 = load float, float* %1
%24 = fpext float %23 to double
%25 = fcmp ult double %24, 2.000000e-01
%26 = fcmp ugt double %24, 6.000000e-01
%27 = or i1 %25, %26
br i1 %27, label %35, label %28
28: ; preds = %22
%29 = fpext float %20 to double
%30 = fcmp ult double %29, 1.000000e-02
%31 = fcmp ugt double %29, 0x3FB70A3D70A3D70A
%32 = or i1 %30, %31
br i1 %32, label %35, label %33
33: ; preds = %28
%34 = add nsw i32 %7, 1
br label %60
35: ; preds = %28, %22
%36 = fcmp ult double %24, 0x3FE6666666666666
%37 = fcmp ugt double %24, 1.200000e+00
%38 = or i1 %36, %37
br i1 %38, label %47, label %39
39: ; preds = %35
%40 = fpext float %20 to double
%41 = fcmp ult double %40, 1.000000e-01
%42 = fcmp ugt double %40, 1.300000e-01
%43 = or i1 %41, %42
br i1 %43, label %47, label %44
44: ; preds = %39
%45 = add nsw i32 %8, 1
%46 = fadd float %6, %23
br label %60
47: ; preds = %39, %35
%48 = fcmp ult double %24, 1.300000e+00
%49 = fcmp ugt double %24, 2.100000e+00
%50 = or i1 %48, %49
br i1 %50, label %58, label %51
51: ; preds = %47
%52 = fpext float %20 to double
%53 = fcmp ult double %52, 1.400000e-01
%54 = fcmp ugt float %20, 2.500000e-01
%55 = or i1 %54, %53
br i1 %55, label %58, label %56
56: ; preds = %51
%57 = add nsw i32 %9, 1
br label %60
58: ; preds = %51, %47
%59 = add nsw i32 %10, 1
br label %60
60: ; preds = %44, %58, %56, %33
%61 = phi float [ %6, %33 ], [ %46, %44 ], [ %6, %56 ], [ %6, %58 ]
%62 = phi i32 [ %34, %33 ], [ %7, %44 ], [ %7, %56 ], [ %7, %58 ]
%63 = phi i32 [ %8, %33 ], [ %45, %44 ], [ %8, %56 ], [ %8, %58 ]
%64 = phi i32 [ %9, %33 ], [ %9, %44 ], [ %57, %56 ], [ %9, %58 ]
%65 = phi i32 [ %10, %33 ], [ %10, %44 ], [ %10, %56 ], [ %59, %58 ]
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%67 = call i32 (...) @clearIBuffer()
%68 = call signext i8 (...) @getchar()
%69 = and i8 %68, -33
%70 = icmp eq i8 %69, 83
br i1 %70, label %5, label %71
71: ; preds = %60
%72 = mul nsw i32 %62, 100
%73 = sitofp i32 %72 to float
%74 = mul nsw i32 %63, 100
%75 = sitofp i32 %74 to float
%76 = mul nsw i32 %64, 100
%77 = sitofp i32 %76 to float
%78 = mul nsw i32 %65, 100
%79 = sitofp i32 %78 to float
%80 = sitofp i32 %63 to float
%81 = fdiv float %61, %80
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i32 1)
%83 = fpext float %73 to double
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i32 %62, double %83)
%85 = fpext float %75 to double
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), i32 %63, double %85)
%87 = fpext float %77 to double
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %64, double %87)
%89 = fpext float %79 to double
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %65, double %89)
%91 = fpext float %81 to double
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.10, i64 0, i64 0), double %91)
ret i32 0
}