// File: ostafen[P]Fast-Insertion-Sort/src/main.cpp
// Function: run_int()
void run_int()
{
  cout << "########## Type : int ##########" << endl
       << endl;

  std::vector<SortAlgorithm<int> *> algos;

  for(int i=1; i<=10; i++)
    algos.push_back(chain<int>(i));

  algos.push_back(new InplaceInsertionBlock<int>);
  
  for(int i = 2; i<=10; i++)
    algos.push_back(new FastInsertionSort<int>(i));
  
  
  algos.push_back(new QuickSort<int>);
  algos.push_back(new QuickInsertionSort<int>);
  algos.push_back(new QuickBlockInsertionSort<int>(512));
  algos.push_back(new MergeSort<int>);
  algos.push_back(new HeapSort<int>);
  
  IntArrayGenerator intGen;
  BenchmarkExecutor<int> intExcutor(&intGen, 2,  1<<20);
  intExcutor.run(&algos, 100);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq 0xe9b6(%rip), %rdi      # 0x11fd8
leaq 0x8a37(%rip), %rsi      # 0xc060
callq 0x3210
movq %rax, %rdi
movq 0xe990(%rip), %rsi      # 0x11fc8
callq 0x3240
movq %rax, %rdi
movq 0xe981(%rip), %rsi      # 0x11fc8
callq 0x3240
leaq -0x18(%rbp), %rdi
callq 0x3b60
movl $0x1, -0x1c(%rbp)
cmpl $0xa, -0x1c(%rbp)
jg 0x36ab
movl -0x1c(%rbp), %edi
callq 0x3bb0
movq %rax, -0xa0(%rbp)
jmp 0x3673
movq -0xa0(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3b80
jmp 0x368d
jmp 0x368f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x365c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x38f7
movl $0x8, %edi
callq 0x3220
movq %rax, -0xa8(%rbp)
jmp 0x36be
movq -0xa8(%rbp), %rdi
callq 0x3ca0
movq -0xa8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3b80
jmp 0x36e4
movl $0x2, -0x44(%rbp)
cmpl $0xa, -0x44(%rbp)
jg 0x3760
movl $0x20, %edi
callq 0x3220
movq %rax, -0xb0(%rbp)
jmp 0x3704
movq -0xb0(%rbp), %rdi
cvtsi2ssl -0x44(%rbp), %xmm0
callq 0x3ce0
jmp 0x3717
movq -0xb0(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3b80
jmp 0x3731
jmp 0x3733
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x36eb
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x20, %esi
callq 0x3230
jmp 0x38f7
movl $0x10, %edi
callq 0x3220
movq %rax, -0xb8(%rbp)
jmp 0x3773
movq -0xb8(%rbp), %rdi
callq 0x3d30
movq -0xb8(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3b80
jmp 0x3799
movl $0x10, %edi
callq 0x3220
movq %rax, -0xc0(%rbp)
jmp 0x37ac
movq -0xc0(%rbp), %rdi
callq 0x3d70
movq -0xc0(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3b80
jmp 0x37d2
movl $0x28, %edi
callq 0x3220
movq %rax, -0xc8(%rbp)
jmp 0x37e5
movq -0xc8(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x3db0
jmp 0x37f8
movq -0xc8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3b80
jmp 0x3812
movl $0x8, %edi
callq 0x3220
movq %rax, -0xd0(%rbp)
jmp 0x3825
movq -0xd0(%rbp), %rdi
callq 0x3e00
movq -0xd0(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3b80
jmp 0x384b
movl $0x8, %edi
callq 0x3220
movq %rax, -0xd8(%rbp)
jmp 0x385e
movq -0xd8(%rbp), %rdi
callq 0x3e40
movq -0xd8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3b80
jmp 0x3884
leaq -0x88(%rbp), %rdi
callq 0x3e80
jmp 0x3892
leaq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movl $0x2, %edx
movl $0x100000, %ecx         # imm = 0x100000
callq 0x3ec0
jmp 0x38b1
leaq -0x98(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x64, %edx
callq 0x3ef0
jmp 0x38c8
leaq -0x18(%rbp), %rdi
callq 0x4430
addq $0xe0, %rsp
popq %rbp
retq
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x28, %esi
callq 0x3230
leaq -0x18(%rbp), %rdi
callq 0x4430
movq -0x30(%rbp), %rdi
callq 0x3390
nopl (%rax)