// File: shreyas-gopalakrishna[P]Concurrent-Skip-list/main.cpp
// Function: skiplist_combined_operations()
void skiplist_combined_operations(){

    int start = (rand() % static_cast<int>(numbers_insert.size() + 1));
    int end = start + (rand() % static_cast<int>(numbers_insert.size() - start + 1));
    cout << "Add: " << start << " " << end << endl;
    skiplist_add(start, end);

    start = (rand() % static_cast<int>(numbers_delete.size() + 1));
    end = start + (rand() % static_cast<int>(numbers_delete.size() - start + 1));
    cout << "Remove: " << start << " " << end << endl;
    skiplist_remove(start, end);

    start = (rand() % static_cast<int>(numbers_get.size() + 1));
    end = start + (rand() % static_cast<int>(numbers_get.size() - start + 1));
    cout << "Searching: " << start << " " << end << endl;
    skiplist_search(start, end);

    start = (rand() % static_cast<int>(numbers_insert.size() + 1));
    end = start + (rand() % static_cast<int>(numbers_insert.size() - start + 1));
    cout << "Range: " << start << " " << end << endl;
    skiplist_range(start, end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
callq 0x3080
movl %eax, -0x38(%rbp)
leaq 0x12a89(%rip), %rdi     # 0x17300
callq 0x5400
movq %rax, %rcx
movl -0x38(%rbp), %eax
addq $0x1, %rcx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x30(%rbp)
callq 0x3080
movl %eax, -0x34(%rbp)
leaq 0x12a5f(%rip), %rdi     # 0x17300
callq 0x5400
movq %rax, %rcx
movl -0x34(%rbp), %eax
movslq -0x4(%rbp), %rdx
subq %rdx, %rcx
addq $0x1, %rcx
cltd
idivl %ecx
movl -0x30(%rbp), %eax
addl %edx, %eax
movl %eax, -0x8(%rbp)
movq 0x126ff(%rip), %rdi     # 0x16fc8
leaq 0xaced(%rip), %rsi      # 0xf5bd
callq 0x3240
movq %rax, %rdi
movl -0x4(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0xafdf(%rip), %rsi      # 0xf8c9
callq 0x3240
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
movq 0x126a4(%rip), %rsi     # 0x16fa8
callq 0x3280
movslq -0x4(%rbp), %rdi
movslq -0x8(%rbp), %rsi
callq 0x3980
callq 0x3080
movl %eax, -0x2c(%rbp)
leaq 0x129f3(%rip), %rdi     # 0x17318
callq 0x5400
movq %rax, %rcx
movl -0x2c(%rbp), %eax
addq $0x1, %rcx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x24(%rbp)
callq 0x3080
movl %eax, -0x28(%rbp)
leaq 0x129c9(%rip), %rdi     # 0x17318
callq 0x5400
movq %rax, %rcx
movl -0x28(%rbp), %eax
movslq -0x4(%rbp), %rdx
subq %rdx, %rcx
addq $0x1, %rcx
cltd
idivl %ecx
movl -0x24(%rbp), %eax
addl %edx, %eax
movl %eax, -0x8(%rbp)
movq 0x12651(%rip), %rdi     # 0x16fc8
leaq 0xac45(%rip), %rsi      # 0xf5c3
callq 0x3240
movq %rax, %rdi
movl -0x4(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0xaf31(%rip), %rsi      # 0xf8c9
callq 0x3240
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
movq 0x125f6(%rip), %rsi     # 0x16fa8
callq 0x3280
movslq -0x4(%rbp), %rdi
movslq -0x8(%rbp), %rsi
callq 0x3b00
callq 0x3080
movl %eax, -0x20(%rbp)
leaq 0x1295d(%rip), %rdi     # 0x17330
callq 0x5400
movq %rax, %rcx
movl -0x20(%rbp), %eax
addq $0x1, %rcx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
callq 0x3080
movl %eax, -0x1c(%rbp)
leaq 0x12933(%rip), %rdi     # 0x17330
callq 0x5400
movq %rax, %rcx
movl -0x1c(%rbp), %eax
movslq -0x4(%rbp), %rdx
subq %rdx, %rcx
addq $0x1, %rcx
cltd
idivl %ecx
movl -0x18(%rbp), %eax
addl %edx, %eax
movl %eax, -0x8(%rbp)
movq 0x125a3(%rip), %rdi     # 0x16fc8
leaq 0xaba0(%rip), %rsi      # 0xf5cc
callq 0x3240
movq %rax, %rdi
movl -0x4(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0xae83(%rip), %rsi      # 0xf8c9
callq 0x3240
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
movq 0x12548(%rip), %rsi     # 0x16fa8
callq 0x3280
movslq -0x4(%rbp), %rdi
movslq -0x8(%rbp), %rsi
callq 0x3bb0
callq 0x3080
movl %eax, -0x14(%rbp)
leaq 0x1287f(%rip), %rdi     # 0x17300
callq 0x5400
movq %rax, %rcx
movl -0x14(%rbp), %eax
addq $0x1, %rcx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
callq 0x3080
movl %eax, -0x10(%rbp)
leaq 0x12855(%rip), %rdi     # 0x17300
callq 0x5400
movq %rax, %rcx
movl -0x10(%rbp), %eax
movslq -0x4(%rbp), %rdx
subq %rdx, %rcx
addq $0x1, %rcx
cltd
idivl %ecx
movl -0xc(%rbp), %eax
addl %edx, %eax
movl %eax, -0x8(%rbp)
movq 0x124f5(%rip), %rdi     # 0x16fc8
leaq 0xaafe(%rip), %rsi      # 0xf5d8
callq 0x3240
movq %rax, %rdi
movl -0x4(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
leaq 0xadd5(%rip), %rsi      # 0xf8c9
callq 0x3240
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x33e0
movq %rax, %rdi
movq 0x1249a(%rip), %rsi     # 0x16fa8
callq 0x3280
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x3d20
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)