#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 *, ...);
void imprime_tiempos(int type, int clasic, int iter, double *time, int tam_time,
                     int *tam) {
  int i;
  switch (type) {
  case 0:
    (clasic) ? printf("INSERTADO CLASICO\n") : printf("INSERTADO\n");
    break;
  case 1:
    (clasic) ? printf("BORRADO CLASICO\n") : printf("BORRADO\n");
    break;
  case 2:
    (clasic) ? printf("COPIA CLASICA\n") : printf("COPIA\n");
    break;
  case 3:
    (clasic) ? printf("CONCATENADO CLASICO\n") : printf("CONCATENADO\n");
    break;
  case 4:
    (clasic) ? printf("COMPARACION CLASICA\n") : printf("COMPARACION\n");
    break;
  case 5:
    (clasic) ? printf("INSERTADO CON SOBREESCRITURA CLASICA\n")
             : printf("INSERTADO CON SOBREESCRITURA\n");
    break;
  }
  for (i = 0; i <= tam_time; i++)
    printf("%fus\t%i\t\t\t%f\n", time[i] / iter, tam[i],
           (time[i] / iter) / tam[i]);
}


x86 assembly (clang, -O0):
<imprime_tiempos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x38(%rbp)
sub    $0x5,%rax
ja     126d <imprime_tiempos+0x15d>
mov    -0x38(%rbp),%rax
lea    0xeb7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpl   $0x0,-0x8(%rbp)
je     116f <imprime_tiempos+0x5f>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117d <imprime_tiempos+0x6d>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <imprime_tiempos+0x15d>
cmpl   $0x0,-0x8(%rbp)
je     119f <imprime_tiempos+0x8f>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ad <imprime_tiempos+0x9d>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <imprime_tiempos+0x15d>
cmpl   $0x0,-0x8(%rbp)
je     11cf <imprime_tiempos+0xbf>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11dd <imprime_tiempos+0xcd>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <imprime_tiempos+0x15d>
cmpl   $0x0,-0x8(%rbp)
je     11ff <imprime_tiempos+0xef>
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    120d <imprime_tiempos+0xfd>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <imprime_tiempos+0x15d>
cmpl   $0x0,-0x8(%rbp)
je     122f <imprime_tiempos+0x11f>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123d <imprime_tiempos+0x12d>
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <imprime_tiempos+0x15d>
cmpl   $0x0,-0x8(%rbp)
je     125f <imprime_tiempos+0x14f>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <imprime_tiempos+0x15d>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     12e4 <imprime_tiempos+0x1d4>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm2
divsd  %xmm2,%xmm1
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm2
divsd  %xmm2,%xmm1
lea    0xe1f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1274 <imprime_tiempos+0x164>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprime_tiempos>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r9,%r14
mov    %r8d,%r12d
mov    %rcx,%r15
mov    %edx,%ebp
cmp    $0x5,%edi
ja     11c5 <imprime_tiempos+0xa5>
mov    %edi,%eax
lea    0xeb7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
test   %esi,%esi
lea    0xf79(%rip),%rax
lea    0xf7c(%rip),%rdi
jmp    11bc <imprime_tiempos+0x9c>
test   %esi,%esi
lea    0xf4f(%rip),%rax
lea    0xf50(%rip),%rdi
jmp    11bc <imprime_tiempos+0x9c>
test   %esi,%esi
lea    0xf29(%rip),%rax
lea    0xf28(%rip),%rdi
jmp    11bc <imprime_tiempos+0x9c>
test   %esi,%esi
lea    0xef7(%rip),%rax
lea    0xefc(%rip),%rdi
jmp    11bc <imprime_tiempos+0x9c>
test   %esi,%esi
lea    0xec5(%rip),%rax
lea    0xeca(%rip),%rdi
jmp    11bc <imprime_tiempos+0x9c>
test   %esi,%esi
lea    0xe71(%rip),%rax
lea    0xe87(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
test   %r12d,%r12d
js     1222 <imprime_tiempos+0x102>
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x8(%rsp)
add    $0x1,%r12d
xor    %ebx,%ebx
lea    0xe37(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
divsd  0x8(%rsp),%xmm0
mov    (%r14,%rbx,4),%esi
xorps  %xmm2,%xmm2
cvtsi2sd %esi,%xmm2
movapd %xmm0,%xmm1
divsd  %xmm2,%xmm1
mov    %rbp,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    11f0 <imprime_tiempos+0xd0>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"INSERTADO CLASICO\0A\00"
@.str.1 = [11 x i8] c"INSERTADO\0A\00"
@.str.2 = [17 x i8] c"BORRADO CLASICO\0A\00"
@.str.3 = [9 x i8] c"BORRADO\0A\00"
@.str.4 = [15 x i8] c"COPIA CLASICA\0A\00"
@.str.5 = [7 x i8] c"COPIA\0A\00"
@.str.6 = [21 x i8] c"CONCATENADO CLASICO\0A\00"
@.str.7 = [13 x i8] c"CONCATENADO\0A\00"
@.str.8 = [21 x i8] c"COMPARACION CLASICA\0A\00"
@.str.9 = [13 x i8] c"COMPARACION\0A\00"
@.str.10 = [38 x i8] c"INSERTADO CON SOBREESCRITURA CLASICA\0A\00"
@.str.11 = [30 x i8] c"INSERTADO CON SOBREESCRITURA\0A\00"
@.str.12 = [14 x i8] c"%fus\09%i\09\09\09%f\0A\00"
define void @imprime_tiempos(i32 %0, i32 %1, i32 %2, double* %3, i32 %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store double* %3, double** %10
store i32 %4, i32* %11
store i32* %5, i32** %12
%14 = load i32, i32* %7
switch i32 %14, label %69 [
i32 0, label %15
i32 1, label %24
i32 2, label %33
i32 3, label %42
i32 4, label %51
i32 5, label %60
]
15: ; preds = %6
%16 = load i32, i32* %8
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %22
20: ; preds = %15
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
%23 = phi i32 [ %19, %18 ], [ %21, %20 ]
br label %69
24: ; preds = %6
%25 = load i32, i32* %8
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %31
29: ; preds = %24
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %31
31: ; preds = %29, %27
%32 = phi i32 [ %28, %27 ], [ %30, %29 ]
br label %69
33: ; preds = %6
%34 = load i32, i32* %8
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %40
38: ; preds = %33
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %40
40: ; preds = %38, %36
%41 = phi i32 [ %37, %36 ], [ %39, %38 ]
br label %69
42: ; preds = %6
%43 = load i32, i32* %8
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %49
47: ; preds = %42
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
br label %49
49: ; preds = %47, %45
%50 = phi i32 [ %46, %45 ], [ %48, %47 ]
br label %69
51: ; preds = %6
%52 = load i32, i32* %8
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
br label %58
56: ; preds = %51
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
br label %58
58: ; preds = %56, %54
%59 = phi i32 [ %55, %54 ], [ %57, %56 ]
br label %69
60: ; preds = %6
%61 = load i32, i32* %8
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0))
br label %67
65: ; preds = %60
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0))
br label %67
67: ; preds = %65, %63
%68 = phi i32 [ %64, %63 ], [ %66, %65 ]
br label %69
69: ; preds = %6, %67, %58, %49, %40, %31, %22
store i32 0, i32* %13
br label %70
70: ; preds = %104, %69
%71 = load i32, i32* %13
%72 = load i32, i32* %11
%73 = icmp sle i32 %71, %72
br i1 %73, label %74, label %107
74: ; preds = %70
%75 = load double*, double** %10
%76 = load i32, i32* %13
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
%79 = load double, double* %78
%80 = load i32, i32* %9
%81 = sitofp i32 %80 to double
%82 = fdiv double %79, %81
%83 = load i32*, i32** %12
%84 = load i32, i32* %13
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %83, i64 %85
%87 = load i32, i32* %86
%88 = load double*, double** %10
%89 = load i32, i32* %13
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %88, i64 %90
%92 = load double, double* %91
%93 = load i32, i32* %9
%94 = sitofp i32 %93 to double
%95 = fdiv double %92, %94
%96 = load i32*, i32** %12
%97 = load i32, i32* %13
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i32, i32* %96, i64 %98
%100 = load i32, i32* %99
%101 = sitofp i32 %100 to double
%102 = fdiv double %95, %101
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), double %82, i32 %87, double %102)
br label %104
104: ; preds = %74
%105 = load i32, i32* %13
%106 = add nsw i32 %105, 1
store i32 %106, i32* %13
br label %70
107: ; preds = %70
ret void
}

LLVM IR (-O2):
@.str.12 = [14 x i8] c"%fus\09%i\09\09\09%f\0A\00"
@str = [29 x i8] c"INSERTADO CON SOBREESCRITURA\00"
@str.13 = [37 x i8] c"INSERTADO CON SOBREESCRITURA CLASICA\00"
@str.14 = [12 x i8] c"COMPARACION\00"
@str.15 = [20 x i8] c"COMPARACION CLASICA\00"
@str.16 = [12 x i8] c"CONCATENADO\00"
@str.17 = [20 x i8] c"CONCATENADO CLASICO\00"
@str.18 = [6 x i8] c"COPIA\00"
@str.19 = [14 x i8] c"COPIA CLASICA\00"
@str.20 = [8 x i8] c"BORRADO\00"
@str.21 = [16 x i8] c"BORRADO CLASICO\00"
@str.22 = [10 x i8] c"INSERTADO\00"
@str.23 = [18 x i8] c"INSERTADO CLASICO\00"
define void @imprime_tiempos(i32 %0, i32 %1, i32 %2, double* nocapture %3, i32 %4, i32* nocapture %5) {
switch i32 %0, label %28 [
i32 0, label %7
i32 1, label %10
i32 2, label %13
i32 3, label %16
i32 4, label %19
i32 5, label %22
]
7: ; preds = %6
%8 = icmp eq i32 %1, 0
%9 = select i1 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.22, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.23, i64 0, i64 0)
br label %25
10: ; preds = %6
%11 = icmp eq i32 %1, 0
%12 = select i1 %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.20, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.21, i64 0, i64 0)
br label %25
13: ; preds = %6
%14 = icmp eq i32 %1, 0
%15 = select i1 %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.18, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.19, i64 0, i64 0)
br label %25
16: ; preds = %6
%17 = icmp eq i32 %1, 0
%18 = select i1 %17, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.16, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.17, i64 0, i64 0)
br label %25
19: ; preds = %6
%20 = icmp eq i32 %1, 0
%21 = select i1 %20, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.14, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.15, i64 0, i64 0)
br label %25
22: ; preds = %6
%23 = icmp eq i32 %1, 0
%24 = select i1 %23, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @str.13, i64 0, i64 0)
br label %25
25: ; preds = %22, %19, %16, %13, %10, %7
%26 = phi i8* [ %9, %7 ], [ %12, %10 ], [ %15, %13 ], [ %18, %16 ], [ %21, %19 ], [ %24, %22 ]
%27 = tail call i32 @puts(i8* dereferenceable(1) %26)
br label %28
28: ; preds = %25, %6
%29 = icmp slt i32 %4, 0
br i1 %29, label %46, label %30
30: ; preds = %28
%31 = sitofp i32 %2 to double
%32 = add nuw i32 %4, 1
%33 = zext i32 %32 to i64
br label %34
34: ; preds = %30, %34
%35 = phi i64 [ 0, %30 ], [ %44, %34 ]
%36 = getelementptr inbounds double, double* %3, i64 %35
%37 = load double, double* %36
%38 = fdiv double %37, %31
%39 = getelementptr inbounds i32, i32* %5, i64 %35
%40 = load i32, i32* %39
%41 = sitofp i32 %40 to double
%42 = fdiv double %38, %41
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0), double %38, i32 %40, double %42)
%44 = add nuw nsw i64 %35, 1
%45 = icmp eq i64 %44, %33
br i1 %45, label %46, label %34
46: ; preds = %34, %28
ret void
}