#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 */
struct timeval {
  int tv_sec;
  int tv_usec;
};
struct skipnode {
  int dummy;
};
struct skiplist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ random();
int /*<<< orphan*/ skiplist_delete(struct skiplist *);
int /*<<< orphan*/ skiplist_insert(struct skiplist *, int, int);
struct skiplist *skiplist_new();
int /*<<< orphan*/ skiplist_remove(struct skiplist *, int);
struct skipnode *skiplist_search(struct skiplist *, int);
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  int i;
  struct timeval start, end;
  int *key = malloc(2 * 1024 * 1024 * sizeof(int));
  if (key == NULL) {
    exit(-1);
  }
  struct skiplist *list = skiplist_new();
  if (list == NULL) {
    exit(-1);
  }
  printf("Test start!\n");
  printf("Add %d nodes...\n", 2 * 1024 * 1024);
  srandom(time(NULL));
  gettimeofday(&start, NULL);
  for (i = 0; i < 2 * 1024 * 1024; i++) {
    int value = key[i] = (int)random();
    skiplist_insert(list, key[i], value);
  }
  gettimeofday(&end, NULL);
  printf("time span: %ldms\n", (end.tv_sec - start.tv_sec) * 1000 +
                                   (end.tv_usec - start.tv_usec) / 1000);
  printf("Now search each node...\n");
  gettimeofday(&start, NULL);
  for (i = 0; i < 2 * 1024 * 1024; i++) {
    struct skipnode *node = skiplist_search(list, key[i]);
    if (node != NULL) {
    } else {
      printf("Not found:0x%08x\n", key[i]);
    }
  }
  gettimeofday(&end, NULL);
  printf("time span:% ldms\n", (end.tv_sec - start.tv_sec) * 1000 +
                                   (end.tv_usec - start.tv_usec) / 1000);
  printf("Now remove all nodes...\n");
  gettimeofday(&start, NULL);
  for (i = 0; i < 2 * 1024 * 1024; i++) {
    skiplist_remove(list, key[i]);
  }
  gettimeofday(&end, NULL);
  printf("time span: %ldms\n", (end.tv_sec - start.tv_sec) * 1000 +
                                   (end.tv_usec - start.tv_usec) / 1000);
  printf("End of Test.\n");
  skiplist_delete(list);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x800000,%edi
call   10c0 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11f2 <main+0x32>
mov    $0xffffffff,%edi
call   10e0 <exit@plt>
mov    $0x0,%al
call   1080 <skiplist_new@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1212 <main+0x52>
mov    $0xffffffff,%edi
call   10e0 <exit@plt>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xde6(%rip),%rdi
mov    $0x200000,%esi
mov    $0x0,%al
call   1060 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x200000,-0x8(%rbp)
jge    129e <main+0xde>
mov    $0x0,%al
call   10b0 <random@plt>
mov    -0x20(%rbp),%rcx
movslq -0x8(%rbp),%rdx
mov    %eax,(%rcx,%rdx,4)
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x2c(%rbp),%edx
call   1050 <skiplist_insert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1257 <main+0x97>
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x18(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0x3e8,%eax,%esi
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    %eax,%esi
lea    0xd50(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x200000,-0x8(%rbp)
jge    1358 <main+0x198>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   10d0 <skiplist_search@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     132c <main+0x16c>
jmp    1345 <main+0x185>
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    134a <main+0x18a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12f7 <main+0x137>
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x18(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0x3e8,%eax,%esi
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    %eax,%esi
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x200000,-0x8(%rbp)
jge    13e0 <main+0x220>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1040 <skiplist_remove@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13b1 <main+0x1f1>
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <gettimeofday@plt>
mov    -0x18(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0x3e8,%eax,%esi
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    %eax,%esi
lea    0xc0e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xc68(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x28(%rbp),%rdi
call   10a0 <skiplist_delete@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    $0x800000,%edi
call   10d0 <malloc@plt>
test   %rax,%rax
je     13e2 <main+0x212>
mov    %rax,%r12
xor    %eax,%eax
call   1090 <skiplist_new@plt>
test   %rax,%rax
je     13e2 <main+0x212>
mov    %rax,%r14
lea    0xe3b(%rip),%rdi
call   1040 <puts@plt>
lea    0xde8(%rip),%rdi
mov    $0x200000,%esi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   10c0 <random@plt>
mov    %eax,(%r12,%rbx,4)
mov    %r14,%rdi
mov    %eax,%esi
mov    %eax,%edx
call   1060 <skiplist_insert@plt>
add    $0x1,%rbx
cmp    $0x200000,%rbx
jne    1240 <main+0x70>
mov    %rsp,%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
sub    0x8(%rsp),%eax
imul   $0x3e8,%eax,%eax
sub    0xc(%rsp),%ecx
movslq %ecx,%rcx
imul   $0x10624dd3,%rcx,%rsi
mov    %rsi,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rsi
add    %ecx,%esi
add    %eax,%esi
lea    0xd6e(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xda2(%rip),%rdi
call   1040 <puts@plt>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
lea    0xd5a(%rip),%r15
xor    %ebx,%ebx
jmp    12dd <main+0x10d>
nopl   (%rax)
add    $0x1,%rbx
cmp    $0x200000,%rbx
je     12fe <main+0x12e>
mov    (%r12,%rbx,4),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   10e0 <skiplist_search@plt>
test   %rax,%rax
jne    12d0 <main+0x100>
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    12d0 <main+0x100>
xor    %ebp,%ebp
mov    %rsp,%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
sub    0x8(%rsp),%eax
imul   $0x3e8,%eax,%eax
sub    0xc(%rsp),%ecx
movslq %ecx,%rcx
imul   $0x10624dd3,%rcx,%rsi
mov    %rsi,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rsi
add    %ecx,%esi
add    %eax,%esi
lea    0xcf6(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd1e(%rip),%rdi
call   1040 <puts@plt>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
xchg   %ax,%ax
mov    (%r12,%rbp,4),%esi
mov    %r14,%rdi
call   1050 <skiplist_remove@plt>
add    $0x1,%rbp
cmp    $0x200000,%rbp
jne    1360 <main+0x190>
mov    %rsp,%rdi
xor    %esi,%esi
call   1080 <gettimeofday@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
sub    0x8(%rsp),%eax
imul   $0x3e8,%eax,%eax
sub    0xc(%rsp),%ecx
movslq %ecx,%rcx
imul   $0x10624dd3,%rcx,%rsi
mov    %rsi,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rsi
add    %ecx,%esi
add    %eax,%esi
lea    0xc59(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xcbd(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   10b0 <skiplist_delete@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xffffffff,%edi
call   10f0 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
%struct.skiplist = type { i32 }
%struct.skipnode = type { i32 }
@.str = [13 x i8] c"Test start!\0A\00"
@.str.1 = [17 x i8] c"Add %d nodes...\0A\00"
@.str.2 = [18 x i8] c"time span: %ldms\0A\00"
@.str.3 = [25 x i8] c"Now search each node...\0A\00"
@.str.4 = [18 x i8] c"Not found:0x%08x\0A\00"
@.str.5 = [18 x i8] c"time span:% ldms\0A\00"
@.str.6 = [25 x i8] c"Now remove all nodes...\0A\00"
@.str.7 = [14 x i8] c"End of Test.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca i32*
%6 = alloca %struct.skiplist*
%7 = alloca i32
%8 = alloca %struct.skipnode*
store i32 0, i32* %1
%9 = call i32* @malloc(i32 8388608)
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %0
%15 = call %struct.skiplist* (...) @skiplist_new()
store %struct.skiplist* %15, %struct.skiplist** %6
%16 = load %struct.skiplist*, %struct.skiplist** %6
%17 = icmp eq %struct.skiplist* %16, null
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @exit(i32 -1)
unreachable
20: ; preds = %14
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2097152)
%23 = call i32 @time(i32* null)
%24 = call i32 @srandom(i32 %23)
%25 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
store i32 0, i32* %2
br label %26
26: ; preds = %44, %20
%27 = load i32, i32* %2
%28 = icmp slt i32 %27, 2097152
br i1 %28, label %29, label %47
29: ; preds = %26
%30 = call i64 (...) @random()
%31 = trunc i64 %30 to i32
%32 = load i32*, i32** %5
%33 = load i32, i32* %2
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %32, i64 %34
store i32 %31, i32* %35
store i32 %31, i32* %7
%36 = load %struct.skiplist*, %struct.skiplist** %6
%37 = load i32*, i32** %5
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %37, i64 %39
%41 = load i32, i32* %40
%42 = load i32, i32* %7
%43 = call i32 @skiplist_insert(%struct.skiplist* %36, i32 %41, i32 %42)
br label %44
44: ; preds = %29
%45 = load i32, i32* %2
%46 = add nsw i32 %45, 1
store i32 %46, i32* %2
br label %26
47: ; preds = %26
%48 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%49 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%50 = load i32, i32* %49
%51 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%52 = load i32, i32* %51
%53 = sub nsw i32 %50, %52
%54 = mul nsw i32 %53, 1000
%55 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 1
%56 = load i32, i32* %55
%57 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%58 = load i32, i32* %57
%59 = sub nsw i32 %56, %58
%60 = sdiv i32 %59, 1000
%61 = add nsw i32 %54, %60
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %61)
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%64 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
store i32 0, i32* %2
br label %65
65: ; preds = %87, %47
%66 = load i32, i32* %2
%67 = icmp slt i32 %66, 2097152
br i1 %67, label %68, label %90
68: ; preds = %65
%69 = load %struct.skiplist*, %struct.skiplist** %6
%70 = load i32*, i32** %5
%71 = load i32, i32* %2
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %70, i64 %72
%74 = load i32, i32* %73
%75 = call %struct.skipnode* @skiplist_search(%struct.skiplist* %69, i32 %74)
store %struct.skipnode* %75, %struct.skipnode** %8
%76 = load %struct.skipnode*, %struct.skipnode** %8
%77 = icmp ne %struct.skipnode* %76, null
br i1 %77, label %78, label %79
78: ; preds = %68
br label %86
79: ; preds = %68
%80 = load i32*, i32** %5
%81 = load i32, i32* %2
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32, i32* %80, i64 %82
%84 = load i32, i32* %83
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %84)
br label %86
86: ; preds = %79, %78
br label %87
87: ; preds = %86
%88 = load i32, i32* %2
%89 = add nsw i32 %88, 1
store i32 %89, i32* %2
br label %65
90: ; preds = %65
%91 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%92 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%93 = load i32, i32* %92
%94 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%95 = load i32, i32* %94
%96 = sub nsw i32 %93, %95
%97 = mul nsw i32 %96, 1000
%98 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 1
%99 = load i32, i32* %98
%100 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%101 = load i32, i32* %100
%102 = sub nsw i32 %99, %101
%103 = sdiv i32 %102, 1000
%104 = add nsw i32 %97, %103
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %104)
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%107 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
store i32 0, i32* %2
br label %108
108: ; preds = %119, %90
%109 = load i32, i32* %2
%110 = icmp slt i32 %109, 2097152
br i1 %110, label %111, label %122
111: ; preds = %108
%112 = load %struct.skiplist*, %struct.skiplist** %6
%113 = load i32*, i32** %5
%114 = load i32, i32* %2
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i32, i32* %113, i64 %115
%117 = load i32, i32* %116
%118 = call i32 @skiplist_remove(%struct.skiplist* %112, i32 %117)
br label %119
119: ; preds = %111
%120 = load i32, i32* %2
%121 = add nsw i32 %120, 1
store i32 %121, i32* %2
br label %108
122: ; preds = %108
%123 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%124 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%125 = load i32, i32* %124
%126 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%127 = load i32, i32* %126
%128 = sub nsw i32 %125, %127
%129 = mul nsw i32 %128, 1000
%130 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 1
%131 = load i32, i32* %130
%132 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%133 = load i32, i32* %132
%134 = sub nsw i32 %131, %133
%135 = sdiv i32 %134, 1000
%136 = add nsw i32 %129, %135
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %136)
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%139 = load %struct.skiplist*, %struct.skiplist** %6
%140 = call i32 @skiplist_delete(%struct.skiplist* %139)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
%struct.skiplist = type { i32 }
%struct.skipnode = type { i32 }
@.str.1 = [17 x i8] c"Add %d nodes...\0A\00"
@.str.2 = [18 x i8] c"time span: %ldms\0A\00"
@.str.4 = [18 x i8] c"Not found:0x%08x\0A\00"
@.str.5 = [18 x i8] c"time span:% ldms\0A\00"
@str = [12 x i8] c"Test start!\00"
@str.8 = [24 x i8] c"Now search each node...\00"
@str.9 = [24 x i8] c"Now remove all nodes...\00"
@str.10 = [13 x i8] c"End of Test.\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timeval* %2 to i8*
%5 = tail call i32* @malloc(i32 8388608)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %0
%10 = tail call %struct.skiplist* (...) @skiplist_new()
%11 = icmp eq %struct.skiplist* %10, null
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @exit(i32 -1)
unreachable
14: ; preds = %9
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2097152)
%17 = tail call i32 @time(i32* null)
%18 = tail call i32 @srandom(i32 %17)
%19 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
br label %20
20: ; preds = %14, %20
%21 = phi i64 [ 0, %14 ], [ %26, %20 ]
%22 = tail call i64 (...) @random()
%23 = trunc i64 %22 to i32
%24 = getelementptr inbounds i32, i32* %5, i64 %21
store i32 %23, i32* %24
%25 = tail call i32 @skiplist_insert(%struct.skiplist* %10, i32 %23, i32 %23)
%26 = add nuw nsw i64 %21, 1
%27 = icmp eq i64 %26, 2097152
br i1 %27, label %28, label %20
28: ; preds = %20
%29 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%30 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%31 = load i32, i32* %30
%32 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%33 = load i32, i32* %32
%34 = sub nsw i32 %31, %33
%35 = mul nsw i32 %34, 1000
%36 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
%37 = load i32, i32* %36
%38 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%39 = load i32, i32* %38
%40 = sub nsw i32 %37, %39
%41 = sdiv i32 %40, 1000
%42 = add nsw i32 %41, %35
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %42)
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.8, i64 0, i64 0))
%45 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
br label %46
46: ; preds = %28, %54
%47 = phi i64 [ 0, %28 ], [ %55, %54 ]
%48 = getelementptr inbounds i32, i32* %5, i64 %47
%49 = load i32, i32* %48
%50 = tail call %struct.skipnode* @skiplist_search(%struct.skiplist* %10, i32 %49)
%51 = icmp eq %struct.skipnode* %50, null
br i1 %51, label %52, label %54
52: ; preds = %46
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %49)
br label %54
54: ; preds = %46, %52
%55 = add nuw nsw i64 %47, 1
%56 = icmp eq i64 %55, 2097152
br i1 %56, label %57, label %46
57: ; preds = %54
%58 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%59 = load i32, i32* %30
%60 = load i32, i32* %32
%61 = sub nsw i32 %59, %60
%62 = mul nsw i32 %61, 1000
%63 = load i32, i32* %36
%64 = load i32, i32* %38
%65 = sub nsw i32 %63, %64
%66 = sdiv i32 %65, 1000
%67 = add nsw i32 %66, %62
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %67)
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.9, i64 0, i64 0))
%70 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
br label %71
71: ; preds = %57, %71
%72 = phi i64 [ 0, %57 ], [ %76, %71 ]
%73 = getelementptr inbounds i32, i32* %5, i64 %72
%74 = load i32, i32* %73
%75 = tail call i32 @skiplist_remove(%struct.skiplist* %10, i32 %74)
%76 = add nuw nsw i64 %72, 1
%77 = icmp eq i64 %76, 2097152
br i1 %77, label %78, label %71
78: ; preds = %71
%79 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%80 = load i32, i32* %30
%81 = load i32, i32* %32
%82 = sub nsw i32 %80, %81
%83 = mul nsw i32 %82, 1000
%84 = load i32, i32* %36
%85 = load i32, i32* %38
%86 = sub nsw i32 %84, %85
%87 = sdiv i32 %86, 1000
%88 = add nsw i32 %87, %83
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %88)
%90 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.10, i64 0, i64 0))
%91 = tail call i32 @skiplist_delete(%struct.skiplist* %10)
ret i32 0
}