// File: Manca[P]algorithms1/main.cpp
// Function: main
int main(int argc, const char * argv[]) {

    /*** Assignment 1 test cases ***/
    // TEST CASE 1:
    cout << "*** Assignment 1 - Test Case 1 ***" << endl;
    std::vector<int> vec{4, 5, 6, 1, 3};
    
    long long inversions = assignment1::Count(vec);
    
    cout << "Number of inversions is: " << inversions << endl;
    
    // TEST CASE 2:
    // load file
    cout << "*** Assignment 1 - Test Case 2 ***" << endl;
    std::ifstream inputFile("data/IntegerArray.txt", ios::in);
    std::vector<int> fileNumbers;

    // fill it in with numbers from the file
    if (inputFile.is_open())
    {
        int number;
        while (inputFile >> number)
        {
            fileNumbers.push_back(number);
        }
        inputFile.close();
        // do the work
        long long variations = assignment1::Count(fileNumbers);
        cout << "Total number of inversions is: " << variations << endl;
        assert(variations == 2407905288);
    }
    else
    {
        cout << "File cannot be opened!" << endl;
    }
    
    /*** Assignment 2 test cases ***/
    // TEST CASE 1:
    cout << endl << "*** Assignment 2 - Test Case 1 ***" << endl;
    ifstream as2File("data/QuickSort.txt", ios::in);
    vector<int> as2Input;
    
    if (as2File.is_open())
    {
        int number;
        while (as2File >> number)
        {
            as2Input.push_back(number);
        }
        as2File.close();
        
        // create three copies for each algorithm (input array is mutable)
        vector<int> as2Input1 = as2Input;
        vector<int> as2Input2 = as2Input;
        vector<int> as2Input3 = as2Input;
        
        // do the work
        assignment2::QuickSort(as2Input1, 0, (int)as2Input1.size(), 1);
        assignment2::QuickSort(as2Input2, 0, (int)as2Input2.size(), 2);
        assignment2::QuickSort(as2Input3, 0, (int)as2Input3.size(), 3);
        
        cout << "Number of comparisons for first pivot: " << assignment2::noCompFirst << endl;
        cout << "Number of comparisons for last pivot: " << assignment2::noCompLast << endl;
        cout << "Number of comparisons for median pivot: " << assignment2::noCompMedian << endl;
        
        assert(assignment2::noCompFirst == 162085);
        assert(assignment2::noCompLast == 164123);
        assert(assignment2::noCompMedian == 138382);
    }
    else
    {
        cout << "File cannot be opened!" << endl;
    }
    
    /*** Assignment 3 test cases ***/
    cout << endl << "*** Assignment 3 - Test Case 1 ***" << endl;
    assignment3::Graph graph("data/kargerMinCut.txt");
    for (int i = 0; i < 10; i++)
    {
        cout << "MinCut so far: " << graph.mincut() << endl;
    }
    
    // Min-Cut for this graph is 17, if we don't get exactly 17,
    // we might need to increase number of iterations above
    //assert(graph.mincut() == 17);
    
    /*** Assignment 4 test cases ***/
    cout << endl << "*** Assignment 4 - Test Case 1 ***" << endl;
    assignment4::testCase1();
    cout << "*** Assignment 4 - Test Case 2 ***" << endl;
    assignment4::testCase2();
    
    cout << "*** Assignment 4 - Main Test Case (disabled) ***" << endl;
    /**** Takes too much time... Enable when needed ****
    *
    std::chrono::steady_clock::time_point start = std::chrono::steady_clock::now();
    assignment4::computeSCC("data/SCC.txt");
    std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
    std::cout << "Total time assignment4 main case took to run: "
    << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count()
    << "ms.\n";
    *
    ****/
    
    /*** Assignment 5 test cases ***/
    cout << endl << "*** Assignment 5 - Test Case 1 ***" << endl;
    assignment5::loadGraphAndInit("data/dijkstraData.txt");
    assignment5::computeShortestPaths();
    
    /*** Assignment 6 test cases ***/
    // 6.1) 2-SUM Problem
    cout << endl << "*** Assignment 6 - Problem 1 ***" << endl;
    long long sums = assignment6::computeTargetSums("data/algo1-programming_prob-2sum.txt");
    cout << "Number of sums is: " << sums << endl;
    
    // 6.2) Median Maintenance
    cout << endl << "*** Assignment 6 - Problem 2 ***" << endl;
    int sumOfMedians = assignment6::computeSumOfMedians("data/Median.txt") % 10000;
    std::cout << "The sum of medians mod 10000 is: " << sumOfMedians << std::endl;
    
}

// Assembly:
subq $0x7a8, %rsp            # imm = 0x7A8
movl $0x0, 0x7a4(%rsp)
movl %edi, 0x7a0(%rsp)
movq %rsi, 0x798(%rsp)
movq 0x1cea0(%rip), %rdi     # 0x23fd8
leaq 0x13295(%rip), %rsi     # 0x1a3d4
callq 0x21a0
movq %rax, %rdi
movq 0x1ce7a(%rip), %rsi     # 0x23fc8
callq 0x21d0
movups 0x13702(%rip), %xmm0    # 0x1a85c
movaps %xmm0, 0x750(%rsp)
movl $0x3, 0x760(%rsp)
leaq 0x750(%rsp), %rax
movq %rax, 0x770(%rsp)
movq $0x5, 0x778(%rsp)
leaq 0x74f(%rsp), %rdi
movq %rdi, 0x1a8(%rsp)
callq 0x83d0
movq 0x1a8(%rsp), %rcx
movq 0x770(%rsp), %rsi
movq 0x778(%rsp), %rdx
leaq 0x780(%rsp), %rdi
callq 0x9490
jmp 0x71c5
leaq 0x74f(%rsp), %rdi
callq 0x8470
leaq 0x780(%rsp), %rdi
callq 0x2950
movq %rax, 0x1a0(%rsp)
jmp 0x71e9
movq 0x1a0(%rsp), %rax
movq %rax, 0x730(%rsp)
movq 0x1cdd8(%rip), %rdi     # 0x23fd8
leaq 0x131f0(%rip), %rsi     # 0x1a3f7
callq 0x21a0
movq %rax, 0x198(%rsp)
jmp 0x7216
movq 0x198(%rsp), %rdi
movq 0x730(%rsp), %rsi
callq 0x20f0
movq %rax, 0x190(%rsp)
jmp 0x7235
movq 0x190(%rsp), %rdi
movq 0x1cd84(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x724b
movq 0x1cd86(%rip), %rdi     # 0x23fd8
leaq 0x131b8(%rip), %rsi     # 0x1a411
callq 0x21a0
movq %rax, 0x188(%rsp)
jmp 0x7268
movq 0x188(%rsp), %rdi
movq 0x1cd51(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x727e
leaq 0x131af(%rip), %rsi     # 0x1a434
leaq 0x528(%rsp), %rdi
movl $0x8, %edx
callq 0x2360
jmp 0x7299
leaq 0x510(%rsp), %rdi
callq 0x7f80
leaq 0x528(%rsp), %rdi
callq 0x22b0
movb %al, 0x187(%rsp)
jmp 0x72bc
movb 0x187(%rsp), %al
testb $0x1, %al
jne 0x72cc
jmp 0x7445
jmp 0x72ce
leaq 0x528(%rsp), %rdi
leaq 0x50c(%rsp), %rsi
callq 0x2120
movq %rax, 0x178(%rsp)
jmp 0x72ed
movq 0x178(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, 0x177(%rsp)
jmp 0x730d
movb 0x177(%rsp), %al
testb $0x1, %al
jne 0x731a
jmp 0x738b
leaq 0x510(%rsp), %rdi
leaq 0x50c(%rsp), %rsi
callq 0x7fd0
jmp 0x7331
jmp 0x72ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
leaq 0x74f(%rsp), %rdi
callq 0x8470
jmp 0x7f6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7f5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7f44
leaq 0x528(%rsp), %rdi
callq 0x2060
jmp 0x739a
leaq 0x510(%rsp), %rdi
callq 0x2950
movq %rax, 0x168(%rsp)
jmp 0x73b1
movq 0x168(%rsp), %rax
movq %rax, 0x500(%rsp)
movq 0x1cc10(%rip), %rdi     # 0x23fd8
leaq 0x1307b(%rip), %rsi     # 0x1a44a
callq 0x21a0
movq %rax, 0x160(%rsp)
jmp 0x73de
movq 0x160(%rsp), %rdi
movq 0x500(%rsp), %rsi
callq 0x20f0
movq %rax, 0x158(%rsp)
jmp 0x73fd
movq 0x158(%rsp), %rdi
movq 0x1cbbc(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7413
movl $0x8f85b808, %eax       # imm = 0x8F85B808
cmpq %rax, 0x500(%rsp)
jne 0x7424
jmp 0x7443
leaq 0x1303f(%rip), %rdi     # 0x1a46a
leaq 0x13051(%rip), %rsi     # 0x1a483
movl $0x32, %edx
leaq 0x1304e(%rip), %rcx     # 0x1a48c
callq 0x2140
jmp 0x747a
movq 0x1cb8c(%rip), %rdi     # 0x23fd8
leaq 0x13056(%rip), %rsi     # 0x1a4a9
callq 0x21a0
movq %rax, 0x150(%rsp)
jmp 0x7462
movq 0x150(%rsp), %rdi
movq 0x1cb57(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7478
jmp 0x747a
movq 0x1cb57(%rip), %rdi     # 0x23fd8
movq 0x1cb40(%rip), %rsi     # 0x23fc8
callq 0x21d0
movq %rax, 0x148(%rsp)
jmp 0x7497
movq 0x148(%rsp), %rdi
leaq 0x1301a(%rip), %rsi     # 0x1a4c0
callq 0x21a0
movq %rax, 0x140(%rsp)
jmp 0x74b5
movq 0x140(%rsp), %rdi
movq 0x1cb04(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x74cb
leaq 0x13011(%rip), %rsi     # 0x1a4e3
leaq 0x2f8(%rsp), %rdi
movl $0x8, %edx
callq 0x2360
jmp 0x74e6
leaq 0x2e0(%rsp), %rdi
callq 0x7f80
leaq 0x2f8(%rsp), %rdi
callq 0x22b0
movb %al, 0x13f(%rsp)
jmp 0x7509
movb 0x13f(%rsp), %al
testb $0x1, %al
jne 0x7519
jmp 0x788b
jmp 0x751b
leaq 0x2f8(%rsp), %rdi
leaq 0x2dc(%rsp), %rsi
callq 0x2120
movq %rax, 0x130(%rsp)
jmp 0x753a
movq 0x130(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, 0x12f(%rsp)
jmp 0x755a
movb 0x12f(%rsp), %al
testb $0x1, %al
jne 0x7567
jmp 0x7599
leaq 0x2e0(%rsp), %rdi
leaq 0x2dc(%rsp), %rsi
callq 0x7fd0
jmp 0x757e
jmp 0x751b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7f2a
leaq 0x2f8(%rsp), %rdi
callq 0x2060
jmp 0x75a8
leaq 0x2c0(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x9520
jmp 0x75bf
leaq 0x2a8(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x9520
jmp 0x75d6
leaq 0x290(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x9520
jmp 0x75ed
leaq 0x2c0(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0x7f90
movq 0x120(%rsp), %rdi
movl %eax, %edx
xorl %esi, %esi
movl $0x1, %ecx
callq 0x2f50
jmp 0x761a
leaq 0x2a8(%rsp), %rdi
movq %rdi, 0x118(%rsp)
callq 0x7f90
movq 0x118(%rsp), %rdi
movl %eax, %edx
xorl %esi, %esi
movl $0x2, %ecx
callq 0x2f50
jmp 0x7647
leaq 0x290(%rsp), %rdi
movq %rdi, 0x110(%rsp)
callq 0x7f90
movq 0x110(%rsp), %rdi
movl %eax, %edx
xorl %esi, %esi
movl $0x3, %ecx
callq 0x2f50
jmp 0x7674
movq 0x1c95d(%rip), %rdi     # 0x23fd8
leaq 0x12e74(%rip), %rsi     # 0x1a4f6
callq 0x21a0
movq %rax, 0x108(%rsp)
jmp 0x7691
movq 0x108(%rsp), %rdi
movl 0x1cb45(%rip), %esi     # 0x241e4
callq 0x2320
movq %rax, 0x100(%rsp)
jmp 0x76ae
movq 0x100(%rsp), %rdi
movq 0x1c90b(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x76c4
movq 0x1c90d(%rip), %rdi     # 0x23fd8
leaq 0x12e4c(%rip), %rsi     # 0x1a51e
callq 0x21a0
movq %rax, 0xf8(%rsp)
jmp 0x76e1
movq 0xf8(%rsp), %rdi
movl 0x1caf9(%rip), %esi     # 0x241e8
callq 0x2320
movq %rax, 0xf0(%rsp)
jmp 0x76fe
movq 0xf0(%rsp), %rdi
movq 0x1c8bb(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7714
movq 0x1c8bd(%rip), %rdi     # 0x23fd8
leaq 0x12e23(%rip), %rsi     # 0x1a545
callq 0x21a0
movq %rax, 0xe8(%rsp)
jmp 0x7731
movq 0xe8(%rsp), %rdi
movl 0x1caad(%rip), %esi     # 0x241ec
callq 0x2320
movq %rax, 0xe0(%rsp)
jmp 0x774e
movq 0xe0(%rsp), %rdi
movq 0x1c86b(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7764
cmpl $0x27925, 0x1ca76(%rip) # imm = 0x27925
jne 0x7772
jmp 0x77e9
leaq 0x12df5(%rip), %rdi     # 0x1a56e
leaq 0x12d03(%rip), %rsi     # 0x1a483
movl $0x56, %edx
leaq 0x12d00(%rip), %rcx     # 0x1a48c
callq 0x2140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7879
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x786c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
leaq 0x290(%rsp), %rdi
callq 0x8300
jmp 0x786c
cmpl $0x2811b, 0x1c9f5(%rip) # imm = 0x2811B
jne 0x77f7
jmp 0x7816
leaq 0x12d93(%rip), %rdi     # 0x1a591
leaq 0x12c7e(%rip), %rsi     # 0x1a483
movl $0x57, %edx
leaq 0x12c7b(%rip), %rcx     # 0x1a48c
callq 0x2140
cmpl $0x21c8e, 0x1c9cc(%rip) # imm = 0x21C8E
jne 0x7824
jmp 0x7843
leaq 0x12d88(%rip), %rdi     # 0x1a5b3
leaq 0x12c51(%rip), %rsi     # 0x1a483
movl $0x58, %edx
leaq 0x12c4e(%rip), %rcx     # 0x1a48c
callq 0x2140
leaq 0x290(%rsp), %rdi
callq 0x8300
leaq 0x2a8(%rsp), %rdi
callq 0x8300
leaq 0x2c0(%rsp), %rdi
callq 0x8300
jmp 0x78c0
leaq 0x2a8(%rsp), %rdi
callq 0x8300
leaq 0x2c0(%rsp), %rdi
callq 0x8300
jmp 0x7f2a
movq 0x1c746(%rip), %rdi     # 0x23fd8
leaq 0x12c10(%rip), %rsi     # 0x1a4a9
callq 0x21a0
movq %rax, 0xd8(%rsp)
jmp 0x78a8
movq 0xd8(%rsp), %rdi
movq 0x1c711(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x78be
jmp 0x78c0
movq 0x1c711(%rip), %rdi     # 0x23fd8
movq 0x1c6fa(%rip), %rsi     # 0x23fc8
callq 0x21d0
movq %rax, 0xd0(%rsp)
jmp 0x78dd
movq 0xd0(%rsp), %rdi
leaq 0x12ceb(%rip), %rsi     # 0x1a5d7
callq 0x21a0
movq %rax, 0xc8(%rsp)
jmp 0x78fb
movq 0xc8(%rsp), %rdi
movq 0x1c6be(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7911
leaq 0x237(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0x2340
movq 0xc0(%rsp), %rdx
leaq 0x12cc5(%rip), %rsi     # 0x1a5fa
leaq 0x238(%rsp), %rdi
callq 0x2250
jmp 0x7944
leaq 0x258(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x9620
jmp 0x795b
leaq 0x238(%rsp), %rdi
callq 0x2130
leaq 0x237(%rsp), %rdi
callq 0x21e0
movl $0x0, 0x230(%rsp)
cmpl $0xa, 0x230(%rsp)
jge 0x7a6f
movq 0x1c643(%rip), %rdi     # 0x23fd8
leaq 0x12c74(%rip), %rsi     # 0x1a610
callq 0x21a0
movq %rax, 0xb8(%rsp)
jmp 0x79ab
leaq 0x258(%rsp), %rdi
callq 0x9940
movl %eax, 0xb4(%rsp)
jmp 0x79c1
movl 0xb4(%rsp), %esi
movq 0xb8(%rsp), %rdi
callq 0x2320
movq %rax, 0xa8(%rsp)
jmp 0x79df
movq 0xa8(%rsp), %rdi
movq 0x1c5da(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x79f5
jmp 0x79f7
movl 0x230(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x230(%rsp)
jmp 0x7980
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7a44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x2130
leaq 0x237(%rsp), %rdi
callq 0x21e0
jmp 0x7f2a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7f1d
movq 0x1c562(%rip), %rdi     # 0x23fd8
movq 0x1c54b(%rip), %rsi     # 0x23fc8
callq 0x21d0
movq %rax, 0xa0(%rsp)
jmp 0x7a8c
movq 0xa0(%rsp), %rdi
leaq 0x12b85(%rip), %rsi     # 0x1a620
callq 0x21a0
movq %rax, 0x98(%rsp)
jmp 0x7aaa
movq 0x98(%rsp), %rdi
movq 0x1c50f(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7ac0
callq 0x3560
jmp 0x7ac7
movq 0x1c50a(%rip), %rdi     # 0x23fd8
leaq 0x12b6e(%rip), %rsi     # 0x1a643
callq 0x21a0
movq %rax, 0x90(%rsp)
jmp 0x7ae4
movq 0x90(%rsp), %rdi
movq 0x1c4d5(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7afa
callq 0x43b0
jmp 0x7b01
movq 0x1c4d0(%rip), %rdi     # 0x23fd8
leaq 0x12b57(%rip), %rsi     # 0x1a666
callq 0x21a0
movq %rax, 0x88(%rsp)
jmp 0x7b1e
movq 0x88(%rsp), %rdi
movq 0x1c49b(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7b34
movq 0x1c49d(%rip), %rdi     # 0x23fd8
movq 0x1c486(%rip), %rsi     # 0x23fc8
callq 0x21d0
movq %rax, 0x80(%rsp)
jmp 0x7b51
movq 0x80(%rsp), %rdi
leaq 0x12b37(%rip), %rsi     # 0x1a697
callq 0x21a0
movq %rax, 0x78(%rsp)
jmp 0x7b6c
movq 0x78(%rsp), %rdi
movq 0x1c450(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7b7f
leaq 0x20f(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x2340
movq 0x70(%rsp), %rdx
leaq 0x12b1d(%rip), %rsi     # 0x1a6ba
leaq 0x210(%rsp), %rdi
callq 0x2250
jmp 0x7bac
leaq 0x210(%rsp), %rdi
callq 0x5da0
jmp 0x7bbb
leaq 0x210(%rsp), %rdi
callq 0x2130
leaq 0x20f(%rsp), %rdi
callq 0x21e0
callq 0x60d0
jmp 0x7bdc
movq 0x1c3f5(%rip), %rdi     # 0x23fd8
movq 0x1c3de(%rip), %rsi     # 0x23fc8
callq 0x21d0
movq %rax, 0x68(%rsp)
jmp 0x7bf6
movq 0x68(%rsp), %rdi
leaq 0x12ace(%rip), %rsi     # 0x1a6d0
callq 0x21a0
movq %rax, 0x60(%rsp)
jmp 0x7c0e
movq 0x60(%rsp), %rdi
movq 0x1c3ae(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7c21
leaq 0x1df(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x2340
movq 0x58(%rsp), %rdx
leaq 0x12ab2(%rip), %rsi     # 0x1a6f1
leaq 0x1e0(%rsp), %rdi
callq 0x2250
jmp 0x7c4e
leaq 0x1e0(%rsp), %rdi
callq 0x6500
movl %eax, 0x54(%rsp)
jmp 0x7c61
movl 0x54(%rsp), %eax
cltq
movq %rax, 0x40(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x2130
leaq 0x1df(%rsp), %rdi
callq 0x21e0
movq 0x40(%rsp), %rax
movq %rax, 0x200(%rsp)
movq 0x1c33e(%rip), %rdi     # 0x23fd8
leaq 0x12a75(%rip), %rsi     # 0x1a716
callq 0x21a0
movq %rax, 0x48(%rsp)
jmp 0x7cad
movq 0x48(%rsp), %rdi
movq 0x200(%rsp), %rsi
callq 0x20f0
movq %rax, 0x38(%rsp)
jmp 0x7cc6
movq 0x38(%rsp), %rdi
movq 0x1c2f6(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7cd9
movq 0x1c2f8(%rip), %rdi     # 0x23fd8
movq 0x1c2e1(%rip), %rsi     # 0x23fc8
callq 0x21d0
movq %rax, 0x30(%rsp)
jmp 0x7cf3
movq 0x30(%rsp), %rdi
leaq 0x12a2b(%rip), %rsi     # 0x1a72a
callq 0x21a0
movq %rax, 0x28(%rsp)
jmp 0x7d0b
movq 0x28(%rsp), %rdi
movq 0x1c2b1(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7d1e
leaq 0x1b7(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x2340
movq 0x20(%rsp), %rdx
leaq 0x12a0f(%rip), %rsi     # 0x1a74b
leaq 0x1b8(%rsp), %rdi
callq 0x2250
jmp 0x7d4b
leaq 0x1b8(%rsp), %rdi
callq 0x6c70
movl %eax, 0x1c(%rsp)
jmp 0x7d5e
movl 0x1c(%rsp), %eax
movslq %eax, %rcx
imulq $0x68db8bad, %rcx, %rcx # imm = 0x68DB8BAD
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x2c, %rcx
addl %edx, %ecx
imull $0x2710, %ecx, %ecx     # imm = 0x2710
subl %ecx, %eax
movl %eax, 0xc(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0x2130
leaq 0x1b7(%rsp), %rdi
callq 0x21e0
movl 0xc(%rsp), %eax
movl %eax, 0x1d8(%rsp)
movq 0x1c227(%rip), %rdi     # 0x23fd8
leaq 0x129a3(%rip), %rsi     # 0x1a75b
callq 0x21a0
movq %rax, 0x10(%rsp)
jmp 0x7dc4
movq 0x10(%rsp), %rdi
movl 0x1d8(%rsp), %esi
callq 0x2320
movq %rax, (%rsp)
jmp 0x7ddb
movq (%rsp), %rdi
movq 0x1c1e2(%rip), %rsi     # 0x23fc8
callq 0x21d0
jmp 0x7ded
leaq 0x258(%rsp), %rdi
callq 0xa100
leaq 0x2e0(%rsp), %rdi
callq 0x8300
leaq 0x2f8(%rsp), %rdi
callq 0x2080
leaq 0x510(%rsp), %rdi
callq 0x8300
leaq 0x528(%rsp), %rdi
callq 0x2080
leaq 0x780(%rsp), %rdi
callq 0x8300
movl 0x7a4(%rsp), %eax
addq $0x7a8, %rsp            # imm = 0x7A8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7e81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x2130
leaq 0x20f(%rsp), %rdi
callq 0x21e0
jmp 0x7f1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7eca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
leaq 0x1e0(%rsp), %rdi
callq 0x2130
leaq 0x1df(%rsp), %rdi
callq 0x21e0
jmp 0x7f1d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
jmp 0x7f10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x740(%rsp)
movl %eax, 0x73c(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0x2130
leaq 0x1b7(%rsp), %rdi
callq 0x21e0
leaq 0x258(%rsp), %rdi
callq 0xa100
leaq 0x2e0(%rsp), %rdi
callq 0x8300
leaq 0x2f8(%rsp), %rdi
callq 0x2080
leaq 0x510(%rsp), %rdi
callq 0x8300
leaq 0x528(%rsp), %rdi
callq 0x2080
leaq 0x780(%rsp), %rdi
callq 0x8300
movq 0x740(%rsp), %rdi
callq 0x2330
nopl (%rax,%rax)