#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 */
double expVA(double);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  double end_time = 1.0e3;
  double Ta = 1.0 / 7;
  double Ts = 1.0 / 8;
  double time = 0.0;
  double tarr = 0.0;
  double tdep = 1.0e3;
  unsigned int n = 0;
  unsigned int id = 0;
  unsigned int id2 = 0;
  unsigned int c = 0;
  double b = 0.0;
  double s = 0.0;
  double tn = time;
  double tb;
  double x;
  double u;
  double l;
  double w;
  while (time < end_time) {
    if (tarr < tdep) {
      time = tarr;
      s = s + n * (time - tn);
      n++;
      id++;
      tn = time;
      printf("Llegada de mensaje %u en T= %.3f sec --- Paquetes en "
             "Concentrador: %u\n",
             id, time, n);
      tarr = time + expVA(Ta);
      if (n == 1) {
        tb = time;
        tdep = time + expVA(Ts);
      }
    } else {
      time = tdep;
      s = s + n * (time - tn);
      n--;
      tn = time;
      id2++;
      printf("Termina mensaje %u en T= %.3f sec --- Paquetes en Concentrador: "
             "%u\n",
             id2, time, n);
      c++;
      if (n > 0)
        tdep = time + expVA(Ts);
      else {
        tdep = 1.0e3;
        b = b + time - tb;
      }
    }
  }
  x = c / time;
  u = b / time;
  l = s / time;
  w = l / x;
  printf("=============================================================== \n");
  printf("=            *** Resultadso de Simulacion MM1 ***             = \n");
  printf("=============================================================== \n");
  printf("=  Tiempo total simulado                    = %.2f s  \n", end_time);
  printf("=============================================================== \n");
  printf("=  Parametros de sistema:                                       \n");
  printf("=    Razon de llegada de paquetes           = %.2f paq/s \n",
         1.0 / Ta);
  printf("=    Razon de servicio de los paquetes      = %.2f paq/s \n",
         1.0 / Ts);
  printf("=============================================================== \n");
  printf("=  Resultados:                                                  \n");
  printf("=    Numero de paquetes atendidos           = %d paq         \n", c);
  printf("=    Throughput                             = %.2f paq/s     \n", x);
  printf("=    Utilizacion                            = %.2f %% \n", 100.0 * u);
  printf("=    Numero promedio de paquetes en sistema = %.2f paq       \n", l);
  printf("=    Tiempo promedio de estancia en sistema = %.2f s         \n", w);
  printf("=============================================================== \n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe8f(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1377 <main+0x257>
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12a6 <main+0x186>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x58(%rbp),%xmm1
mov    -0x3c(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x40(%rbp),%esi
movsd  -0x28(%rbp),%xmm0
mov    -0x3c(%rbp),%edx
lea    0xdf8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1030 <expVA@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0x1,-0x3c(%rbp)
jne    12a1 <main+0x181>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1030 <expVA@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1372 <main+0x252>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x58(%rbp),%xmm1
mov    -0x3c(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%esi
movsd  -0x28(%rbp),%xmm0
mov    -0x3c(%rbp),%edx
lea    0xd6d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jbe    134c <main+0x22c>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1030 <expVA@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    136d <main+0x24d>
movsd  0xcac(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1372 <main+0x252>
jmp    11ac <main+0x8c>
mov    -0x48(%rbp),%eax
cvtsi2sd %rax,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xd48(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  0xc06(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
lea    0xd8b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xbeb(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
lea    0xdab(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xc64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%esi
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x70(%rbp),%xmm0
lea    0xe27(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xb88(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
lea    0xe4b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x80(%rbp),%xmm0
lea    0xe70(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x88(%rbp),%xmm0
ff
lea    0xe99(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xbe0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
xor    %r14d,%r14d
movsd  0xeb7(%rip),%xmm2
xorpd  %xmm3,%xmm3
lea    0xf23(%rip),%r15
xorpd  %xmm1,%xmm1
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movapd %xmm2,%xmm0
xor    %r12d,%r12d
xor    %r13d,%r13d
xor    %ebx,%ebx
jmp    11ff <main+0xcf>
nopl   0x0(%rax)
movapd %xmm1,%xmm0
subsd  %xmm3,%xmm0
mulsd  %xmm0,%xmm2
movapd 0x10(%rsp),%xmm0
addsd  %xmm2,%xmm0
movapd %xmm0,0x10(%rsp)
lea    0x1(%r14),%ebp
add    $0x1,%ebx
lea    0xe86(%rip),%rdi
mov    %ebx,%esi
movapd %xmm1,%xmm0
mov    %ebp,%edx
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe4f(%rip),%xmm0
call   1040 <expVA@plt>
movapd 0x20(%rsp),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
test   %r14d,%r14d
je     1287 <main+0x157>
mov    %ebp,%r14d
movsd  (%rsp),%xmm0
movapd %xmm1,%xmm3
movsd  0xe0f(%rip),%xmm1
ucomisd %xmm3,%xmm1
movapd %xmm2,%xmm1
jbe    12ea <main+0x1ba>
ucomisd %xmm1,%xmm0
mov    %r14d,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
movapd %xmm1,0x20(%rsp)
movsd  %xmm0,(%rsp)
ja     1180 <main+0x50>
add    $0x1,%r13d
lea    -0x1(%r14),%edx
mov    %r15,%rdi
mov    %r13d,%esi
mov    $0x1,%al
movapd %xmm3,0x50(%rsp)
movsd  %xmm2,0x48(%rsp)
call   1050 <printf@plt>
add    $0x1,%r12d
movsd  (%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd 0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
add    $0xffffffff,%r14d
je     12b9 <main+0x189>
movsd  0xd91(%rip),%xmm0
call   1040 <expVA@plt>
movsd  (%rsp),%xmm3
addsd  %xmm3,%xmm0
jmp    12df <main+0x1af>
movsd  0xd79(%rip),%xmm0
movsd  %xmm2,(%rsp)
call   1040 <expVA@plt>
movsd  (%rsp),%xmm2
movapd 0x20(%rsp),%xmm3
addsd  %xmm3,%xmm0
mov    $0x1,%r14d
movsd  %xmm3,0x40(%rsp)
jmp    11e9 <main+0xb9>
movapd 0x30(%rsp),%xmm0
movsd  (%rsp),%xmm3
addsd  %xmm3,%xmm0
subsd  0x40(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
xor    %r14d,%r14d
movsd  0xd21(%rip),%xmm0
movapd 0x20(%rsp),%xmm2
jmp    11e9 <main+0xb9>
mov    %r12d,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movapd 0x30(%rsp),%xmm1
divsd  %xmm3,%xmm1
movapd %xmm1,0x30(%rsp)
movapd 0x10(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
unpcklpd %xmm3,%xmm3
divpd  %xmm3,%xmm1
movapd %xmm1,0x10(%rsp)
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
movapd %xmm1,%xmm0
divsd  %xmm2,%xmm0
movapd %xmm0,(%rsp)
lea    0x1021(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf4f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xd59(%rip),%rdi
movsd  0xc96(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf5e(%rip),%rdi
call   1030 <puts@plt>
lea    0xd67(%rip),%rdi
movsd  0xc84(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xd8c(%rip),%rdi
movsd  0xc76(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf5f(%rip),%rdi
call   1030 <puts@plt>
lea    0xd9d(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdcb(%rip),%rdi
movaps 0x20(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
movapd 0x30(%rsp),%xmm0
mulsd  0xc31(%rip),%xmm0
lea    0xde9(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe13(%rip),%rdi
movaps 0x10(%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe3f(%rip),%rdi
movaps (%rsp),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [71 x i8] c"Llegada de mensaje %u en T= %.3f sec --- Paquetes en Concentrador: %u\0A\00"
@.str.1 = [68 x i8] c"Termina mensaje %u en T= %.3f sec --- Paquetes en Concentrador: %u\0A\00"
@.str.2 = [66 x i8] c"=============================================================== \0A\00"
@.str.3 = [66 x i8] c"= *** Resultadso de Simulacion MM1 *** = \0A\00"
@.str.4 = [56 x i8] c"= Tiempo total simulado = %.2f s \0A\00"
@.str.5 = [66 x i8] c"= Parametros de sistema: \0A\00"
@.str.6 = [59 x i8] c"= Razon de llegada de paquetes = %.2f paq/s \0A\00"
@.str.7 = [59 x i8] c"= Razon de servicio de los paquetes = %.2f paq/s \0A\00"
@.str.8 = [66 x i8] c"= Resultados: \0A\00"
@.str.9 = [63 x i8] c"= Numero de paquetes atendidos = %d paq \0A\00"
@.str.10 = [63 x i8] c"= Throughput = %.2f paq/s \0A\00"
@.str.11 = [56 x i8] c"= Utilizacion = %.2f %% \0A\00"
@.str.12 = [63 x i8] c"= Numero promedio de paquetes en sistema = %.2f paq \0A\00"
@.str.13 = [63 x i8] c"= Tiempo promedio de estancia en sistema = %.2f s \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store i32 0, i32* %1
store double 1.000000e+03, double* %2
store double 0x3FC2492492492492, double* %3
store double 1.250000e-01, double* %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
store double 1.000000e+03, double* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store double 0.000000e+00, double* %12
store double 0.000000e+00, double* %13
%20 = load double, double* %5
store double %20, double* %14
br label %21
21: ; preds = %94, %0
%22 = load double, double* %5
%23 = load double, double* %2
%24 = fcmp olt double %22, %23
br i1 %24, label %25, label %95
25: ; preds = %21
%26 = load double, double* %6
%27 = load double, double* %7
%28 = fcmp olt double %26, %27
br i1 %28, label %29, label %60
29: ; preds = %25
%30 = load double, double* %6
store double %30, double* %5
%31 = load double, double* %13
%32 = load i32, i32* %8
%33 = uitofp i32 %32 to double
%34 = load double, double* %5
%35 = load double, double* %14
%36 = fsub double %34, %35
%37 = call double @llvm.fmuladd.f64(double %33, double %36, double %31)
store double %37, double* %13
%38 = load i32, i32* %8
%39 = add i32 %38, 1
store i32 %39, i32* %8
%40 = load i32, i32* %9
%41 = add i32 %40, 1
store i32 %41, i32* %9
%42 = load double, double* %5
store double %42, double* %14
%43 = load i32, i32* %9
%44 = load double, double* %5
%45 = load i32, i32* %8
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %43, double %44, i32 %45)
%47 = load double, double* %5
%48 = load double, double* %3
%49 = call double @expVA(double %48)
%50 = fadd double %47, %49
store double %50, double* %6
%51 = load i32, i32* %8
%52 = icmp eq i32 %51, 1
br i1 %52, label %53, label %59
53: ; preds = %29
%54 = load double, double* %5
store double %54, double* %15
%55 = load double, double* %5
%56 = load double, double* %4
%57 = call double @expVA(double %56)
%58 = fadd double %55, %57
store double %58, double* %7
br label %59
59: ; preds = %53, %29
br label %94
60: ; preds = %25
%61 = load double, double* %7
store double %61, double* %5
%62 = load double, double* %13
%63 = load i32, i32* %8
%64 = uitofp i32 %63 to double
%65 = load double, double* %5
%66 = load double, double* %14
%67 = fsub double %65, %66
%68 = call double @llvm.fmuladd.f64(double %64, double %67, double %62)
store double %68, double* %13
%69 = load i32, i32* %8
%70 = add i32 %69, -1
store i32 %70, i32* %8
%71 = load double, double* %5
store double %71, double* %14
%72 = load i32, i32* %10
%73 = add i32 %72, 1
store i32 %73, i32* %10
%74 = load i32, i32* %10
%75 = load double, double* %5
%76 = load i32, i32* %8
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0), i32 %74, double %75, i32 %76)
%78 = load i32, i32* %11
%79 = add i32 %78, 1
store i32 %79, i32* %11
%80 = load i32, i32* %8
%81 = icmp ugt i32 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %60
%83 = load double, double* %5
%84 = load double, double* %4
%85 = call double @expVA(double %84)
%86 = fadd double %83, %85
store double %86, double* %7
br label %93
87: ; preds = %60
store double 1.000000e+03, double* %7
%88 = load double, double* %12
%89 = load double, double* %5
%90 = fadd double %88, %89
%91 = load double, double* %15
%92 = fsub double %90, %91
store double %92, double* %12
br label %93
93: ; preds = %87, %82
br label %94
94: ; preds = %93, %59
br label %21
95: ; preds = %21
%96 = load i32, i32* %11
%97 = uitofp i32 %96 to double
%98 = load double, double* %5
%99 = fdiv double %97, %98
store double %99, double* %16
%100 = load double, double* %12
%101 = load double, double* %5
%102 = fdiv double %100, %101
store double %102, double* %17
%103 = load double, double* %13
%104 = load double, double* %5
%105 = fdiv double %103, %104
store double %105, double* %18
%106 = load double, double* %18
%107 = load double, double* %16
%108 = fdiv double %106, %107
store double %108, double* %19
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0))
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%112 = load double, double* %2
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0), double %112)
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.5, i64 0, i64 0))
%116 = load double, double* %3
%117 = fdiv double 1.000000e+00, %116
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.6, i64 0, i64 0), double %117)
%119 = load double, double* %4
%120 = fdiv double 1.000000e+00, %119
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), double %120)
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.8, i64 0, i64 0))
%124 = load i32, i32* %11
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0), i32 %124)
%126 = load double, double* %16
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0), double %126)
%128 = load double, double* %17
%129 = fmul double 1.000000e+02, %128
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0), double %129)
%131 = load double, double* %18
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0), double %131)
%133 = load double, double* %19
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0), double %133)
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%136 = load i32, i32* %1
ret i32 %136
}

LLVM IR (-O2):
@.str = [71 x i8] c"Llegada de mensaje %u en T= %.3f sec --- Paquetes en Concentrador: %u\0A\00"
@.str.1 = [68 x i8] c"Termina mensaje %u en T= %.3f sec --- Paquetes en Concentrador: %u\0A\00"
@.str.4 = [56 x i8] c"= Tiempo total simulado = %.2f s \0A\00"
@.str.6 = [59 x i8] c"= Razon de llegada de paquetes = %.2f paq/s \0A\00"
@.str.7 = [59 x i8] c"= Razon de servicio de los paquetes = %.2f paq/s \0A\00"
@.str.9 = [63 x i8] c"= Numero de paquetes atendidos = %d paq \0A\00"
@.str.10 = [63 x i8] c"= Throughput = %.2f paq/s \0A\00"
@.str.11 = [56 x i8] c"= Utilizacion = %.2f %% \0A\00"
@.str.12 = [63 x i8] c"= Numero promedio de paquetes en sistema = %.2f paq \0A\00"
@.str.13 = [63 x i8] c"= Tiempo promedio de estancia en sistema = %.2f s \0A\00"
@str.14 = [65 x i8] c"= *** Resultadso de Simulacion MM1 *** = \00"
@str.17 = [65 x i8] c"= Parametros de sistema: \00"
@str.19 = [65 x i8] c"= Resultados: \00"
@str.20 = [65 x i8] c"=============================================================== \00"
define i32 @main() {
br label %1
1: ; preds = %0, %40
%2 = phi double [ 0.000000e+00, %0 ], [ %50, %40 ]
%3 = phi double [ 0.000000e+00, %0 ], [ %49, %40 ]
%4 = phi double [ 1.000000e+03, %0 ], [ %48, %40 ]
%5 = phi i32 [ 0, %0 ], [ %47, %40 ]
%6 = phi double [ undef, %0 ], [ %46, %40 ]
%7 = phi double [ 0.000000e+00, %0 ], [ %45, %40 ]
%8 = phi double [ 0.000000e+00, %0 ], [ %44, %40 ]
%9 = phi i32 [ 0, %0 ], [ %43, %40 ]
%10 = phi i32 [ 0, %0 ], [ %42, %40 ]
%11 = phi i32 [ 0, %0 ], [ %41, %40 ]
%12 = fcmp olt double %3, %4
%13 = uitofp i32 %5 to double
br i1 %12, label %14, label %26
14: ; preds = %1
%15 = fsub double %3, %2
%16 = tail call double @llvm.fmuladd.f64(double %13, double %15, double %7)
%17 = add i32 %5, 1
%18 = add i32 %11, 1
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %18, double %3, i32 %17)
%20 = tail call double @expVA(double 0x3FC2492492492492)
%21 = fadd double %3, %20
%22 = icmp eq i32 %5, 0
br i1 %22, label %23, label %40
23: ; preds = %14
%24 = tail call double @expVA(double 1.250000e-01)
%25 = fadd double %3, %24
br label %40
26: ; preds = %1
%27 = fsub double %4, %2
%28 = tail call double @llvm.fmuladd.f64(double %13, double %27, double %7)
%29 = add i32 %5, -1
%30 = add i32 %10, 1
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0), i32 %30, double %4, i32 %29)
%32 = add i32 %9, 1
%33 = icmp eq i32 %29, 0
br i1 %33, label %37, label %34
34: ; preds = %26
%35 = tail call double @expVA(double 1.250000e-01)
%36 = fadd double %4, %35
br label %40
37: ; preds = %26
%38 = fadd double %8, %4
%39 = fsub double %38, %6
br label %40
40: ; preds = %34, %37, %14, %23
%41 = phi i32 [ %18, %23 ], [ %18, %14 ], [ %11, %34 ], [ %11, %37 ]
%42 = phi i32 [ %10, %23 ], [ %10, %14 ], [ %30, %34 ], [ %30, %37 ]
%43 = phi i32 [ %9, %23 ], [ %9, %14 ], [ %32, %34 ], [ %32, %37 ]
%44 = phi double [ %8, %23 ], [ %8, %14 ], [ %8, %34 ], [ %39, %37 ]
%45 = phi double [ %16, %23 ], [ %16, %14 ], [ %28, %34 ], [ %28, %37 ]
%46 = phi double [ %3, %23 ], [ %6, %14 ], [ %6, %34 ], [ %6, %37 ]
%47 = phi i32 [ 1, %23 ], [ %17, %14 ], [ %29, %34 ], [ 0, %37 ]
%48 = phi double [ %25, %23 ], [ %4, %14 ], [ %36, %34 ], [ 1.000000e+03, %37 ]
%49 = phi double [ %21, %23 ], [ %21, %14 ], [ %3, %34 ], [ %3, %37 ]
%50 = phi double [ %3, %23 ], [ %3, %14 ], [ %4, %34 ], [ %4, %37 ]
%51 = fcmp olt double %50, 1.000000e+03
br i1 %51, label %1, label %52
52: ; preds = %40
%53 = uitofp i32 %43 to double
%54 = fdiv double %44, %50
%55 = insertelement <2 x double> poison, double %45, i64 0
%56 = insertelement <2 x double> %55, double %53, i64 1
%57 = insertelement <2 x double> poison, double %50, i64 0
%58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> zeroinitializer
%59 = fdiv <2 x double> %56, %58
%60 = extractelement <2 x double> %59, i64 0
%61 = extractelement <2 x double> %59, i64 1
%62 = fdiv double %60, %61
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.20, i64 0, i64 0))
%64 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.14, i64 0, i64 0))
%65 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.20, i64 0, i64 0))
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0), double 1.000000e+03)
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.20, i64 0, i64 0))
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.17, i64 0, i64 0))
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.6, i64 0, i64 0), double 7.000000e+00)
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0), double 8.000000e+00)
%71 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.20, i64 0, i64 0))
%72 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.19, i64 0, i64 0))
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.9, i64 0, i64 0), i32 %43)
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0), double %61)
%75 = fmul double %54, 1.000000e+02
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0), double %75)
%77 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0), double %60)
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.13, i64 0, i64 0), double %62)
%79 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.20, i64 0, i64 0))
ret i32 0
}