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

    cout << "\n---------- Numbers being inserted ----------" << endl;

    for (auto i = numbers_insert.begin(); i != numbers_insert.end(); ++i)
    std::cout << *i << ' ';
    cout << endl;

    cout << "\n---------- Numbers being deleted ----------" << endl;

    for (auto i = numbers_delete.begin(); i != numbers_delete.end(); ++i)
    std::cout << *i << ' ';
    cout << endl;

    cout << "\n---------- Numbers being searched ----------" << endl;

    for (auto i = numbers_get.begin(); i != numbers_get.end(); ++i)
    std::cout << *i << ' ';
    cout << endl;

    vector<thread> threads;

    for(size_t i = 0; i < num_threads; i++){
        threads.push_back(thread(skiplist_combined_operations));
    }
    for (auto &th : threads) {
        th.join();
    }

    skiplist.display();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x12486(%rip), %rdi     # 0x16fc8
leaq 0xaa97(%rip), %rsi      # 0xf5e0
callq 0x3240
movq %rax, %rdi
movq 0x12450(%rip), %rsi     # 0x16fa8
callq 0x3280
leaq 0x1279c(%rip), %rdi     # 0x17300
callq 0x5a60
movq %rax, -0x8(%rbp)
leaq 0x1278c(%rip), %rdi     # 0x17300
callq 0x5ad0
movq %rax, -0x10(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x5a90
testb $0x1, %al
jne 0x4b90
jmp 0x4bbf
leaq -0x8(%rbp), %rdi
callq 0x5b00
movl (%rax), %esi
movq 0x12426(%rip), %rdi     # 0x16fc8
callq 0x33e0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32e0
leaq -0x8(%rbp), %rdi
callq 0x5b20
jmp 0x4b6d
movq 0x12402(%rip), %rdi     # 0x16fc8
movq 0x123db(%rip), %rsi     # 0x16fa8
callq 0x3280
movq 0x123ef(%rip), %rdi     # 0x16fc8
leaq 0xaa2e(%rip), %rsi      # 0xf60e
callq 0x3240
movq %rax, %rdi
movq 0x123b9(%rip), %rsi     # 0x16fa8
callq 0x3280
leaq 0x1271d(%rip), %rdi     # 0x17318
callq 0x5a60
movq %rax, -0x18(%rbp)
leaq 0x1270d(%rip), %rdi     # 0x17318
callq 0x5ad0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x5a90
testb $0x1, %al
jne 0x4c27
jmp 0x4c56
leaq -0x18(%rbp), %rdi
callq 0x5b00
movl (%rax), %esi
movq 0x1238f(%rip), %rdi     # 0x16fc8
callq 0x33e0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32e0
leaq -0x18(%rbp), %rdi
callq 0x5b20
jmp 0x4c04
movq 0x1236b(%rip), %rdi     # 0x16fc8
movq 0x12344(%rip), %rsi     # 0x16fa8
callq 0x3280
movq 0x12358(%rip), %rdi     # 0x16fc8
leaq 0xa9c4(%rip), %rsi      # 0xf63b
callq 0x3240
movq %rax, %rdi
movq 0x12322(%rip), %rsi     # 0x16fa8
callq 0x3280
leaq 0x1269e(%rip), %rdi     # 0x17330
callq 0x5a60
movq %rax, -0x28(%rbp)
leaq 0x1268e(%rip), %rdi     # 0x17330
callq 0x5ad0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5a90
testb $0x1, %al
jne 0x4cbe
jmp 0x4ced
leaq -0x28(%rbp), %rdi
callq 0x5b00
movl (%rax), %esi
movq 0x122f8(%rip), %rdi     # 0x16fc8
callq 0x33e0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32e0
leaq -0x28(%rbp), %rdi
callq 0x5b20
jmp 0x4c9b
movq 0x122d4(%rip), %rdi     # 0x16fc8
movq 0x122ad(%rip), %rsi     # 0x16fa8
callq 0x3280
leaq -0x48(%rbp), %rdi
callq 0x57f0
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq 0x12524(%rip), %rax     # 0x17240
jae 0x4d81
leaq -0x4c5(%rip), %rsi      # 0x4860
leaq -0x58(%rbp), %rdi
callq 0x5c90
jmp 0x4d30
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x5830
jmp 0x4d3f
leaq -0x58(%rbp), %rdi
callq 0x5930
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x4d11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4e01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5930
jmp 0x4e01
leaq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x5960
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
callq 0x5990
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x59c0
testb $0x1, %al
jne 0x4db6
jmp 0x4de1
leaq -0x78(%rbp), %rdi
callq 0x5a00
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x33d0
jmp 0x4dd4
jmp 0x4dd6
leaq -0x78(%rbp), %rdi
callq 0x5a20
jmp 0x4da3
leaq 0x12508(%rip), %rdi     # 0x172f0
callq 0xc660
jmp 0x4def
leaq -0x48(%rbp), %rdi
callq 0x5c30
addq $0x90, %rsp
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x5c30
movq -0x60(%rbp), %rdi
callq 0x33f0
nopw %cs:(%rax,%rax)