// File: kkloberdanz[P]Sort/main.cpp
// Function: test()
void test() {
    srand(time(0));
    std::vector<double> V;
    std::vector<double> Vcopy;
    std::vector<double> sortedVector;

    const int VECTOR_SIZE = 100;

    for (int i = 0; i < VECTOR_SIZE; i++) {
        V.push_back(rand() % 100);
    }

    std::cout << "unsorted\n";
    printVector(V);

    std::cout << "quick\n";
    printVector(kgk::sort(V, "quick"));

    std::cout << "insertion\n";
    printVector(kgk::sort(V, "insertion"));
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
xorl %eax, %eax
movl %eax, %edi
callq 0x20f0
movl %eax, %edi
callq 0x2110
leaq 0x130(%rsp), %rdi
callq 0x3520
leaq 0x118(%rsp), %rdi
callq 0x3520
leaq 0x100(%rsp), %rdi
callq 0x3520
movl $0x64, 0xfc(%rsp)
movl $0x0, 0xf8(%rsp)
cmpl $0x64, 0xf8(%rsp)
jge 0x2931
callq 0x2040
movslq %eax, %rcx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0xf0(%rsp)
leaq 0x130(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x3530
jmp 0x2903
jmp 0x2905
movl 0xf8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf8(%rsp)
jmp 0x28b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x2bec
movq 0xa6a0(%rip), %rdi      # 0xcfd8
leaq 0x6727(%rip), %rsi      # 0x9066
callq 0x2120
jmp 0x2946
leaq 0xc8(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x3630
jmp 0x295d
leaq 0xc8(%rsp), %rdi
callq 0x3560
jmp 0x296c
leaq 0xc8(%rsp), %rdi
callq 0x3730
movq 0xa658(%rip), %rdi      # 0xcfd8
leaq 0x66e9(%rip), %rsi      # 0x9070
callq 0x2120
jmp 0x298e
leaq 0x98(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x3630
jmp 0x29a5
leaq 0x77(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x21f0
movq 0x10(%rsp), %rdx
leaq 0x667d(%rip), %rsi      # 0x903d
leaq 0x78(%rsp), %rdi
callq 0x2180
jmp 0x29cc
leaq 0xb0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x3790
jmp 0x29e8
leaq 0xb0(%rsp), %rdi
callq 0x3560
jmp 0x29f7
leaq 0xb0(%rsp), %rdi
callq 0x3730
leaq 0x78(%rsp), %rdi
callq 0x20a0
leaq 0x77(%rsp), %rdi
callq 0x2150
leaq 0x98(%rsp), %rdi
callq 0x3730
movq 0xa5ac(%rip), %rdi      # 0xcfd8
leaq 0x6644(%rip), %rsi      # 0x9077
callq 0x2120
jmp 0x2a3a
leaq 0x40(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x3630
jmp 0x2a4e
leaq 0x1f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x21f0
movq 0x8(%rsp), %rdx
leaq 0x6619(%rip), %rsi      # 0x9082
leaq 0x20(%rsp), %rdi
callq 0x2180
jmp 0x2a75
leaq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x3790
jmp 0x2a8b
leaq 0x58(%rsp), %rdi
callq 0x3560
jmp 0x2a97
leaq 0x58(%rsp), %rdi
callq 0x3730
leaq 0x20(%rsp), %rdi
callq 0x20a0
leaq 0x1f(%rsp), %rdi
callq 0x2150
leaq 0x40(%rsp), %rdi
callq 0x3730
leaq 0x100(%rsp), %rdi
callq 0x3730
leaq 0x118(%rsp), %rdi
callq 0x3730
leaq 0x130(%rsp), %rdi
callq 0x3730
addq $0x148, %rsp            # imm = 0x148
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x3730
jmp 0x2bec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x2b6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x2b61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x3730
leaq 0x78(%rsp), %rdi
callq 0x20a0
leaq 0x77(%rsp), %rdi
callq 0x2150
leaq 0x98(%rsp), %rdi
callq 0x3730
jmp 0x2bec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x2bd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x2bce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x3730
leaq 0x20(%rsp), %rdi
callq 0x20a0
leaq 0x1f(%rsp), %rdi
callq 0x2150
leaq 0x40(%rsp), %rdi
callq 0x3730
leaq 0x100(%rsp), %rdi
callq 0x3730
leaq 0x118(%rsp), %rdi
callq 0x3730
leaq 0x130(%rsp), %rdi
callq 0x3730
movq 0xe8(%rsp), %rdi
callq 0x21e0