// File: /workspace/github_cpp_makefile_star2_O1/PrzemekWirkus[P]functional-workshop/src/examples.cpp
// Function: main
int main(int argc, char *argv[]) {
    // ######### Example 1 - sorting with binary predicate #########
    {
        cout << "Example 1:" << endl;

        int Table[] = {55, -7, 3, -9, 2, -9198, -937, 1, 473};
        const int TableSize = sizeof(Table) / sizeof(int);

        // Print C-style table:
        // for_each(Table, Table + TableSize, [] (int i) { cout << i << " "; }); cout << endl;
        TABLE_PRINT();

        // ### Variation 1.1, std::less predicate
        std::less<int> normalCompare;
        bool b = normalCompare(4, 6); // 4 < 6
        bubble_sort(Table, TableSize, normalCompare);     // Sort big -> small
        TABLE_PRINT();
        // or
        bubble_sort(Table, TableSize, std::less<int>());  // Like above
        TABLE_PRINT();

        // ### Variation 1.2, reverse sorting order
        bubble_sort(Table, TableSize, std::greater<int>()); // Sort small -> big, reverse order
        TABLE_PRINT();
        // or
        bubble_sort(Table, TableSize, std::not2(std::less<int>())); // Sort small -> big, reverse order
        TABLE_PRINT();

        // ### variation 1.3, sort as if values in array are absolute
        bubble_sort(Table, TableSize, absoluteLess());
        TABLE_PRINT();
        // or in reverse order
        bubble_sort(Table, TableSize, std::not2(absoluteLess()));
        TABLE_PRINT();
    }

    // ######### Example 2 #########
    {
        cout << "Example 2:" << endl;

        vector<int> vec = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
        VECTOR_PRINT();

        // ### variation 2.1
        // finds the first number in the int vector v which is less than 3
        vector<int>::reverse_iterator f = vec.rend();
        f = find_if(vec.rbegin(), vec.rend(), bind2nd(less<int>(), 3)); // bind 2nd!
        F_PRINT();

        // ### variation 2.2
        // finds the first number in the int vector v which is not less than 5
        f = std::find_if(vec.rbegin(), vec.rend(), std::bind1st(std::less<int>(), 5)); // bind 1nd!
        F_PRINT();

        // ### variation 2.3
        // finds the first number in the int vector v which is greater than 7
        f = std::find_if(vec.rbegin(), vec.rend(), std::bind2nd(std::greater<int>(), 7)); // bind 2nd!
        F_PRINT();

        // ### variation 2.4
        // finds the first number in the int vector v which is equal to 4
        f = std::find_if(vec.rbegin(), vec.rend(), std::bind1st(std::equal_to<int>(), 4)); // bind 1nd!
        F_PRINT();
    }

    // ######### Example 3 #########
    {
        // ### variation 3.1

    	vector<string> Gals = {
            string("Annabella"),
            string("Scheherazade"),
            string("Xaviera")};
        vector<string> Guys = {
            string("Bogey"),
            string("Amadeus"),
            string("Wladimir")};
        vector<string> Couples(3);

        // ### variation 3.2 transform with unary predicate
        // target == source
        std::transform(Guys.begin(),
                       Guys.end(),
                       Guys.begin(),
                        [] (string &s) {
                            for_each(begin(s), end(s),
                                [] (string::value_type &c) {
                                    if (c >= 'a' && c <= 'z') {
                                        c -= 'a' - 'A';
                                    }
                                }
                            );
                            return s;
                        });

        // Print
        for_each(Guys.begin(), Guys.end(), [] (const string &s) { cout << s << " "; }); cout << endl;

        // ### variation 3.3, transform and grab in lambda global variable as reference
        string connector = " and ";

        std::transform(Gals.begin(),
                       Gals.end(),
                       Guys.begin(),
                       Couples.begin(),
                       [&connector] (const std::string& a, const std::string& b) {
                            return a + connector + b;
                       });

        // Print
        for_each(Couples.begin(), Couples.end(), [] (const string &s) { cout << s << endl; });

    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq 0x3b38(%rip), %rbx      # 0x5fd8
leaq 0x1b8b(%rip), %rsi      # 0x4032
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2120
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movaps 0x1c0e(%rip), %xmm0     # 0x40f0
movaps %xmm0, 0x30(%rsp)
movaps 0x1bf2(%rip), %xmm0     # 0x40e0
movaps %xmm0, 0x20(%rsp)
movl $0x1d9, 0x40(%rsp)      # imm = 0x1D9
xorl %r15d, %r15d
leaq 0x1b1c(%rip), %r14      # 0x4021
movl 0x20(%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x4, %r15
cmpq $0x24, %r15
jne 0x2505
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
xorl %eax, %eax
cmpq $0x7, %rax
ja 0x257b
movq %rax, %rcx
movl 0x20(%rsp,%rax,4), %edx
movl 0x24(%rsp,%rcx,4), %esi
cmpl %esi, %edx
jge 0x2572
movl %esi, 0x20(%rsp,%rax,4)
movl %edx, 0x24(%rsp,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x255e
incq %rax
cmpq $0x9, %rax
jne 0x2555
xorl %r15d, %r15d
movq 0x3a4a(%rip), %rbx      # 0x5fd8
leaq 0x1a8c(%rip), %r14      # 0x4021
movl 0x20(%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x4, %r15
cmpq $0x24, %r15
jne 0x2595
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
xorl %eax, %eax
cmpq $0x7, %rax
ja 0x260b
movq %rax, %rcx
movl 0x20(%rsp,%rax,4), %edx
movl 0x24(%rsp,%rcx,4), %esi
cmpl %esi, %edx
jge 0x2602
movl %esi, 0x20(%rsp,%rax,4)
movl %edx, 0x24(%rsp,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x25ee
incq %rax
cmpq $0x9, %rax
jne 0x25e5
xorl %r15d, %r15d
movq 0x39ba(%rip), %rbx      # 0x5fd8
leaq 0x19fc(%rip), %r14      # 0x4021
movl 0x20(%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x4, %r15
cmpq $0x24, %r15
jne 0x2625
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
xorl %eax, %eax
cmpq $0x7, %rax
ja 0x269b
movq %rax, %rcx
movl 0x20(%rsp,%rax,4), %edx
movl 0x24(%rsp,%rcx,4), %esi
cmpl %esi, %edx
jle 0x2692
movl %esi, 0x20(%rsp,%rax,4)
movl %edx, 0x24(%rsp,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x267e
incq %rax
cmpq $0x9, %rax
jne 0x2675
xorl %r15d, %r15d
movq 0x392a(%rip), %rbx      # 0x5fd8
leaq 0x196c(%rip), %r14      # 0x4021
movl 0x20(%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x4, %r15
cmpq $0x24, %r15
jne 0x26b5
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
xorl %eax, %eax
cmpq $0x7, %rax
ja 0x272b
movq %rax, %rcx
movl 0x20(%rsp,%rax,4), %edx
movl 0x24(%rsp,%rcx,4), %esi
cmpl %esi, %edx
jl 0x2722
movl %esi, 0x20(%rsp,%rax,4)
movl %edx, 0x24(%rsp,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x270e
incq %rax
cmpq $0x9, %rax
jne 0x2705
xorl %r15d, %r15d
movq 0x389a(%rip), %rbx      # 0x5fd8
leaq 0x18dc(%rip), %r14      # 0x4021
movl 0x20(%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x4, %r15
cmpq $0x24, %r15
jne 0x2745
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
xorl %eax, %eax
cmpq $0x7, %rax
ja 0x27cd
movq %rax, %rcx
movl 0x20(%rsp,%rax,4), %edx
movl 0x24(%rsp,%rcx,4), %esi
movl %edx, %edi
negl %edi
cmovsl %edx, %edi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
cmpl %r8d, %edi
jae 0x27c4
movl %esi, 0x20(%rsp,%rax,4)
movl %edx, 0x24(%rsp,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x279e
incq %rax
cmpq $0x9, %rax
jne 0x2795
xorl %r15d, %r15d
movq 0x37f8(%rip), %rbx      # 0x5fd8
leaq 0x183a(%rip), %r14      # 0x4021
movl 0x20(%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x4, %r15
cmpq $0x24, %r15
jne 0x27e7
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
xorl %eax, %eax
cmpq $0x7, %rax
ja 0x286f
movq %rax, %rcx
movl 0x20(%rsp,%rax,4), %edx
movl 0x24(%rsp,%rcx,4), %esi
movl %edx, %edi
negl %edi
cmovsl %edx, %edi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
cmpl %r8d, %edi
jb 0x2866
movl %esi, 0x20(%rsp,%rax,4)
movl %edx, 0x24(%rsp,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x2840
incq %rax
cmpq $0x9, %rax
jne 0x2837
xorl %r15d, %r15d
movq 0x3756(%rip), %rbx      # 0x5fd8
leaq 0x1798(%rip), %r14      # 0x4021
movl 0x20(%rsp,%r15), %esi
movq %rbx, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
addq $0x4, %r15
cmpq $0x24, %r15
jne 0x2889
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq 0x175f(%rip), %rsi      # 0x403d
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2120
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq 0x17eb(%rip), %rsi      # 0x4104
leaq 0x20(%rsp), %rax
movl $0x13, %ecx
movq %rax, %rdi
rep  movsl (%rsi), %es:(%rdi)
movq %rsp, %rdi
leaq 0x98(%rsp), %rcx
movl $0x13, %edx
movq %rax, %rsi
callq 0x311a
movq (%rsp), %r12
movq 0x8(%rsp), %r13
cmpq %r13, %r12
je 0x2981
movq 0x3683(%rip), %r14      # 0x5fd8
leaq 0x16c5(%rip), %r15      # 0x4021
movl (%r12), %esi
movq %r14, %rdi
callq 0x2190
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2120
addq $0x4, %r12
cmpq %r13, %r12
jne 0x295c
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq 0x3639(%rip), %rdi      # 0x5fd8
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x98(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x80(%rsp), %rdi
movabsq $0x300000000, %rcx      # imm = 0x300000000
callq 0x3317
movq 0x80(%rsp), %rax
movl -0x4(%rax), %esi
movq 0x35e7(%rip), %rdi      # 0x5fd8
callq 0x2190
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x98(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x80(%rsp), %rdi
movabsq $0x500000000, %rcx      # imm = 0x500000000
callq 0x33c4
movq 0x80(%rsp), %rax
movl -0x4(%rax), %esi
movq 0x3573(%rip), %rdi      # 0x5fd8
callq 0x2190
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x98(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x80(%rsp), %rdi
movabsq $0x700000000, %rcx      # imm = 0x700000000
callq 0x3471
movq 0x80(%rsp), %rax
movl -0x4(%rax), %esi
movq 0x34ff(%rip), %rdi      # 0x5fd8
callq 0x2190
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x98(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x80(%rsp), %rdi
movabsq $0x400000000, %rcx      # imm = 0x400000000
callq 0x351e
movq 0x80(%rsp), %rax
movl -0x4(%rax), %esi
movq 0x348b(%rip), %rbx      # 0x5fd8
movq %rbx, %rdi
callq 0x2190
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2b8d
callq 0x20f0
leaq 0x30(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x14ab(%rip), %rsi      # 0x4048
leaq 0x14ad(%rip), %rdx      # 0x4051
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x35cc
leaq 0x40(%rsp), %r14
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x148c(%rip), %rsi      # 0x4052
leaq 0x1491(%rip), %rdx      # 0x405e
movq %r14, %rdi
callq 0x35cc
leaq 0x60(%rsp), %r14
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1474(%rip), %rsi      # 0x405f
leaq 0x1474(%rip), %rdx      # 0x4066
movq %r14, %rdi
callq 0x35cc
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rcx
movl $0x3, %edx
callq 0x3158
leaq 0x70(%rsp), %r12
xorl %r14d, %r14d
movq 0x60(%rsp,%r14), %rdi
leaq (%r12,%r14), %rax
cmpq %rdi, %rax
je 0x2c2f
callq 0x20f0
addq $-0x20, %r14
cmpq $-0x60, %r14
jne 0x2c1c
leaq 0x20(%rsp), %r15
movq %rbp, (%r15)
leaq 0x141f(%rip), %rsi      # 0x4067
leaq 0x141d(%rip), %rdx      # 0x406c
movq %r15, %rdi
callq 0x35cc
leaq 0x40(%rsp), %r14
movq %r13, (%r14)
leaq 0x1407(%rip), %rsi      # 0x406d
leaq 0x1407(%rip), %rdx      # 0x4074
movq %r14, %rdi
callq 0x35cc
leaq 0x60(%rsp), %r14
movq %r12, (%r14)
leaq 0x13f1(%rip), %rsi      # 0x4075
leaq 0x13f2(%rip), %rdx      # 0x407d
movq %r14, %rdi
callq 0x35cc
leaq 0xb8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rcx
movl $0x3, %edx
callq 0x3158
leaq 0x70(%rsp), %r14
xorl %r15d, %r15d
movq 0x60(%rsp,%r15), %rdi
leaq (%r14,%r15), %rax
cmpq %rdi, %rax
je 0x2cc8
callq 0x20f0
addq $-0x20, %r15
cmpq $-0x60, %r15
jne 0x2cb5
leaq 0xd0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movl $0x3, %esi
callq 0x319a
movq 0xb8(%rsp), %r14
movq 0xc0(%rsp), %r12
cmpq %r12, %r14
je 0x2d68
leaq 0x20(%rsp), %r15
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x2d2e
movq (%r14), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
leal -0x61(%rsi), %edi
cmpb $0x19, %dil
ja 0x2d26
addb $-0x20, %sil
movb %sil, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x2d11
movq %rbp, 0x20(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x378e
movq %r14, %rdi
movq %r15, %rsi
callq 0x2130
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2d5f
callq 0x20f0
addq $0x20, %r14
cmpq %r12, %r14
jne 0x2d03
movq 0xb8(%rsp), %r12
movq 0xc0(%rsp), %r13
cmpq %r13, %r12
je 0x2db5
movq 0x3254(%rip), %r14      # 0x5fd8
leaq 0x1296(%rip), %r15      # 0x4021
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x2120
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2120
addq $0x20, %r12
cmpq %r13, %r12
jne 0x2d8b
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq 0x3205(%rip), %rdi      # 0x5fd8
callq 0x2030
movq %rax, %rdi
callq 0x20a0
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x128b(%rip), %rsi      # 0x407e
leaq 0x1289(%rip), %rdx      # 0x4083
leaq 0x98(%rsp), %rdi
callq 0x35cc
movq 0x80(%rsp), %rbx
movq 0x88(%rsp), %rbp
cmpq %rbp, %rbx
je 0x2ee1
movq 0xd0(%rsp), %r14
movq 0xb8(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x98(%rsp), %rdx
callq 0x381e
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x2050
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2e7f
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2e87
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2eb3
callq 0x20f0
movq %r14, %rdi
movq %rsp, %rsi
callq 0x2130
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2ecc
callq 0x20f0
addq $0x20, %rbx
addq $0x20, %r12
addq $0x20, %r14
cmpq %rbp, %rbx
jne 0x2e3a
movq 0xd0(%rsp), %r15
movq 0xd8(%rsp), %r12
cmpq %r12, %r15
je 0x2f3f
movq 0x30db(%rip), %rbx      # 0x5fd8
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x2120
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
addq $0x20, %r15
cmpq %r12, %r15
jne 0x2efd
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x2f59
callq 0x20f0
leaq 0xd0(%rsp), %rdi
callq 0x3224
leaq 0xb8(%rsp), %rdi
callq 0x3224
leaq 0x80(%rsp), %rdi
callq 0x3224
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30b5
movq %rax, %rbx
jmp 0x30f7
movq %rax, %rbx
movq $-0x60, %r13
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x2fba
callq 0x20f0
addq $-0x20, %r12
addq $0x20, %r13
jne 0x2fab
movb $0x1, %al
jmp 0x2fd9
jmp 0x2fca
movq %rax, %rbx
xorl %eax, %eax
jmp 0x2fd9
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r14
cmpq %r14, %r15
sete %cl
orb %al, %cl
jne 0x3104
addq $-0x10, %r14
leaq 0x20(%rsp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x2ffe
callq 0x20f0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x2ff0
jmp 0x3104
movq %rax, %rbx
movq $-0x60, %r13
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x302c
callq 0x20f0
addq $-0x20, %r12
addq $0x20, %r13
jne 0x301d
movb $0x1, %al
jmp 0x304b
jmp 0x303c
movq %rax, %rbx
xorl %eax, %eax
jmp 0x304b
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r14
cmpq %r14, %r15
sete %cl
orb %al, %cl
jne 0x3111
addq $-0x10, %r14
leaq 0x20(%rsp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x3070
callq 0x20f0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x3062
jmp 0x3111
jmp 0x30ba
jmp 0x30ba
jmp 0x30ba
jmp 0x30ba
movq %rax, %rbx
jmp 0x3111
jmp 0x30b5
jmp 0x30ba
jmp 0x30ba
jmp 0x30cd
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x30d0
callq 0x20f0
jmp 0x30d0
jmp 0x30b5
movq %rax, %rbx
jmp 0x30ea
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3111
callq 0x20f0
jmp 0x3111
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x30ea
callq 0x20f0
leaq 0xd0(%rsp), %rdi
callq 0x3224
leaq 0xb8(%rsp), %rdi
callq 0x3224
leaq 0x80(%rsp), %rdi
callq 0x3224
movq %rbx, %rdi
callq 0x21a0
nop