// File: mshabbirhasan[P]ups-indel/src/ups_indel.cpp
// Function: generateEir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, _IO_FILE*)
void generateEir(string chrom, string pos, string id, string refer, string alt,
    string qual, string filter, string info, string * sequence,
    unsigned long int position, string pattern, string type,
    FILE * fout) {
    if (type == "I") {
        string x;
        string x_prime;
        string str1;
        string str2;
        unsigned long int ir, il;

        int length_difference = alt.length() - refer.length();

        if (refer.length() > 1 && refer == alt.substr(0, refer.length())) {
            position += refer.length() - 1;
        } else if (refer.length() > 2 &&
            refer == alt.substr(length_difference, alt.length())) {
            position -= 1;
        }

        /*********Extend to the right *************/
        x = pattern;
        x_prime = getLeftCircularPermutation( & x);
        ir = position - 1; // because in VCF file position starts from 1 but in

        if ((ir + 1) < sequence -> length()) {
            string r(1, sequence -> at(ir + 1));

            str1 = x + r;
            str2 = r + x_prime;

            while (str1.compare(str2) == 0) {
                x = x_prime;
                ir++;
                if ((ir + 1) >= sequence -> length()) {
                    ir--;
                    break;
                }
                r = sequence -> at(ir + 1);
                x_prime = getLeftCircularPermutation( & x);

                str1 = x + r;
                str2 = r + x_prime;
            }
        } else {
            ir--;
        }

        /*********Extend to the left *************/
        x = pattern;
        x_prime = getRightCircularPermutation( &x);
        il = position - 1; // because in VCF file position starts from 1 but seqan
        // starts string index from 0.
        if (il > 0) {
            string l(1, sequence -> at(il));

            str1 = l + x;
            str2 = x_prime + l;

            while (str1.compare(str2) == 0) {
                x = x_prime;
                il--;
                if (il < 0) {
                    break;
                }
                l = sequence -> at(il);
                x_prime = getRightCircularPermutation( &x);

                str1 = l + x;
                str2 = x_prime + l;
            }
        }

        fprintf(fout, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s%s%s%lu%s%lu%s\t%s\n",
            chrom.c_str(), pos.c_str(), id.c_str(), refer.c_str(), alt.c_str(),
            qual.c_str(), filter.c_str(), "+", x.c_str(), "[", (il + 2), " - ",
            (ir + 2), "]", info.c_str());
    } else if (type == "D") {
        string x;
        string x_prime;
        string str1;
        string str2;
        unsigned long int ir, il;

        int deletionLength = refer.length() - alt.length();

        if ((alt.length() > 1 && alt == refer.substr(0, alt.length()))) {
            if (alt != refer.substr(deletionLength, refer.length())) { // TCA TC
                position += alt.length() - 1;
            } else {
                if (alt.length() <= 2) { // AAAAAAAAA AA
                    position += alt.length() - 1;
                } else { // AAACAAA AAA
                    position += deletionLength - 1;
                }
            }
        } else if (alt.length() == 1 && alt == refer.substr(0, alt.length()) &&
            alt == refer.substr(refer.length() - 1)) { // CAC C
            if (deletionLength == 1) { // CC C
                position -= 1;
            } else { // CAC C
                position -= alt.length() + 1;
            }
        } else if (alt == refer.substr(deletionLength, refer.length()) &&
            refer.length() != 4 && alt.length() != 2 &&
            alt != refer.substr(0, deletionLength - 1)) { // TATAC TAC
            position -= 1;
        }

        /*********Extend to the right *************/

        x = pattern;

        int length = strlen(pattern.c_str());
        x_prime = getLeftCircularPermutation( & x);

        ir = position + 1;
        if (ir < sequence -> length()) {
            string substring = sequence -> substr(ir, length);

            while (substring.compare(x_prime) == 0) {
                ir++;
                x = x_prime;
                x_prime = getLeftCircularPermutation( & x);
                substring = sequence -> substr(ir, length);
            }
        }

        /*********Extend to the left *************/
        x = pattern;
        x_prime = getRightCircularPermutation( & x);
        il = position - 1;
        if (il >= 0) {
            string l(1, sequence -> at(il));

            str1 = l + x;
            str2 = x_prime + l;

            while (str1.compare(str2) == 0) {
                x = x_prime;
                il--;
                if (il < 0) {
                    break;
                }
                l = sequence -> at(il);
                x_prime = getRightCircularPermutation( & x);

                str1 = l + x;
                str2 = x_prime + l;
            }
        }

        fprintf(fout, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s%s%s%lu%s%lu%s\t%s\n",
            chrom.c_str(), pos.c_str(), id.c_str(), refer.c_str(), alt.c_str(),
            qual.c_str(), filter.c_str(), "-", x.c_str(), "[", (il + 2), " - ",
            ir, "]", info.c_str());
    } else if (type == "N/A") {
        fprintf(fout, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", chrom.c_str(),
            pos.c_str(), id.c_str(), refer.c_str(), alt.c_str(), qual.c_str(),
            filter.c_str(), "N/A[]", info.c_str());
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x898, %rsp            # imm = 0x898
movq %r9, -0x648(%rbp)
movq %r8, -0x640(%rbp)
movq %rcx, -0x638(%rbp)
movq %rdx, -0x630(%rbp)
movq %rsi, -0x628(%rbp)
movq %rdi, %rax
movq %rax, -0x620(%rbp)
movq 0x40(%rbp), %rdi
movq 0x38(%rbp), %rdi
movq %rdi, -0x618(%rbp)
movq 0x30(%rbp), %r10
movq %r10, -0x610(%rbp)
movq 0x28(%rbp), %r10
movq 0x20(%rbp), %r10
movq 0x18(%rbp), %r10
movq %r10, -0x608(%rbp)
movq 0x10(%rbp), %r10
movq %r10, -0x600(%rbp)
movq %rax, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
leaq 0x22d26(%rip), %rsi     # 0x282fe
callq 0xa360
testb $0x1, %al
jne 0x55e6
jmp 0x5fc5
leaq -0x78(%rbp), %rdi
callq 0x45f0
leaq -0x98(%rbp), %rdi
callq 0x45f0
leaq -0xb8(%rbp), %rdi
callq 0x45f0
leaq -0xd8(%rbp), %rdi
callq 0x45f0
movq -0x640(%rbp), %rdi
callq 0x4650
movq -0x638(%rbp), %rdi
movq %rax, -0x658(%rbp)
callq 0x4650
movq -0x638(%rbp), %rdi
movq %rax, %rcx
movq -0x658(%rbp), %rax
subq %rcx, %rax
movl %eax, -0xec(%rbp)
callq 0x4650
movq %rax, %rcx
movb $0x0, -0x11d(%rbp)
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, -0x649(%rbp)
jbe 0x56b1
movq -0x638(%rbp), %rdi
callq 0x4650
movq -0x640(%rbp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x110(%rbp), %rdi
callq 0x4460
jmp 0x5691
movq -0x638(%rbp), %rdi
movb $0x1, -0x11d(%rbp)
leaq -0x110(%rbp), %rsi
callq 0xa2a0
movb %al, -0x649(%rbp)
movb -0x649(%rbp), %al
movb %al, -0x659(%rbp)
testb $0x1, -0x11d(%rbp)
jne 0x56c8
jmp 0x56d4
leaq -0x110(%rbp), %rdi
callq 0x48b8
movb -0x659(%rbp), %al
testb $0x1, %al
jne 0x56e0
jmp 0x5714
movq -0x638(%rbp), %rdi
callq 0x4650
subq $0x1, %rax
addq 0x28(%rbp), %rax
movq %rax, 0x28(%rbp)
jmp 0x57ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x5f93
movq -0x638(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
movb $0x0, -0x141(%rbp)
xorl %eax, %eax
cmpq $0x2, %rcx
movb %al, -0x65a(%rbp)
jbe 0x5791
movq -0x640(%rbp), %rdi
movslq -0xec(%rbp), %rax
movq %rax, -0x668(%rbp)
callq 0x4650
movq -0x640(%rbp), %rsi
movq -0x668(%rbp), %rdx
movq %rax, %rcx
leaq -0x140(%rbp), %rdi
callq 0x4460
jmp 0x5771
movq -0x638(%rbp), %rdi
movb $0x1, -0x141(%rbp)
leaq -0x140(%rbp), %rsi
callq 0xa2a0
movb %al, -0x65a(%rbp)
movb -0x65a(%rbp), %al
movb %al, -0x669(%rbp)
testb $0x1, -0x141(%rbp)
jne 0x57a8
jmp 0x57b4
leaq -0x140(%rbp), %rdi
callq 0x48b8
movb -0x669(%rbp), %al
testb $0x1, %al
jne 0x57c0
jmp 0x57cc
movq 0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, 0x28(%rbp)
jmp 0x57ce
movq -0x610(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x4070
jmp 0x57e0
leaq -0x168(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x5300
jmp 0x57f2
leaq -0x98(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x4510
leaq -0x168(%rbp), %rdi
callq 0x48b8
movq 0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x678(%rbp)
movq 0x20(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
movq -0x678(%rbp), %rax
cmpq %rcx, %rax
jae 0x5b01
movq 0x20(%rbp), %rdi
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x4850
movq %rax, -0x680(%rbp)
jmp 0x586a
movq -0x680(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x68c(%rbp)
leaq -0x189(%rbp), %rdi
movq %rdi, -0x688(%rbp)
callq 0x4780
movl -0x68c(%rbp), %edx
movq -0x688(%rbp), %rcx
leaq -0x188(%rbp), %rdi
movl $0x1, %esi
callq 0x42f0
jmp 0x58ad
leaq -0x189(%rbp), %rdi
callq 0x44a0
leaq -0x1b0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0xa390
jmp 0x58d2
leaq -0xb8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
movq %rsi, -0x698(%rbp)
callq 0x4510
movq -0x698(%rbp), %rdi
callq 0x48b8
leaq -0x1d0(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0xa390
jmp 0x5914
leaq -0xd8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x4510
leaq -0x1d0(%rbp), %rdi
callq 0x48b8
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4060
movl %eax, -0x69c(%rbp)
jmp 0x594e
movl -0x69c(%rbp), %eax
cmpl $0x0, %eax
jne 0x5af3
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4070
jmp 0x596f
movq -0xe0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x6a8(%rbp)
movq 0x20(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
movq -0x6a8(%rbp), %rax
cmpq %rcx, %rax
jb 0x5a08
movq -0xe0(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xe0(%rbp)
jmp 0x5af3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x189(%rbp), %rdi
callq 0x44a0
jmp 0x5f93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x48b8
jmp 0x5f93
movq 0x20(%rbp), %rdi
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x4850
movq %rax, -0x6b0(%rbp)
jmp 0x5a24
movq -0x6b0(%rbp), %rax
movsbl (%rax), %esi
leaq -0x188(%rbp), %rdi
callq 0x46f0
jmp 0x5a3c
leaq -0x1f0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x5300
jmp 0x5a4e
leaq -0x98(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
movq %rsi, -0x6b8(%rbp)
callq 0x4510
movq -0x6b8(%rbp), %rdi
callq 0x48b8
leaq -0x210(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0xa390
jmp 0x5a8d
leaq -0xb8(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq %rsi, -0x6c0(%rbp)
callq 0x4510
movq -0x6c0(%rbp), %rdi
callq 0x48b8
leaq -0x230(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0xa390
jmp 0x5acf
leaq -0xd8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x4510
leaq -0x230(%rbp), %rdi
callq 0x48b8
jmp 0x5933
leaq -0x188(%rbp), %rdi
callq 0x48b8
jmp 0x5b13
movq -0xe0(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xe0(%rbp)
movq -0x610(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x4070
jmp 0x5b25
leaq -0x250(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x5420
jmp 0x5b37
leaq -0x98(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x4510
leaq -0x250(%rbp), %rdi
callq 0x48b8
movq 0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
jbe 0x5dec
movq 0x20(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x4850
movq %rax, -0x6c8(%rbp)
jmp 0x5b8c
movq -0x6c8(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x6d4(%rbp)
leaq -0x271(%rbp), %rdi
movq %rdi, -0x6d0(%rbp)
callq 0x4780
movl -0x6d4(%rbp), %edx
movq -0x6d0(%rbp), %rcx
leaq -0x270(%rbp), %rdi
movl $0x1, %esi
callq 0x42f0
jmp 0x5bcf
leaq -0x271(%rbp), %rdi
callq 0x44a0
leaq -0x298(%rbp), %rdi
leaq -0x270(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0xa390
jmp 0x5bf4
leaq -0xb8(%rbp), %rdi
leaq -0x298(%rbp), %rsi
movq %rsi, -0x6e0(%rbp)
callq 0x4510
movq -0x6e0(%rbp), %rdi
callq 0x48b8
leaq -0x2b8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x270(%rbp), %rdx
callq 0xa390
jmp 0x5c36
leaq -0xd8(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x4510
leaq -0x2b8(%rbp), %rdi
callq 0x48b8
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4060
movl %eax, -0x6e4(%rbp)
jmp 0x5c70
movl -0x6e4(%rbp), %eax
cmpl $0x0, %eax
jne 0x5de0
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x4070
jmp 0x5c91
movq -0xe8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
jae 0x5cf8
jmp 0x5de0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x271(%rbp), %rdi
callq 0x44a0
jmp 0x5f93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x48b8
jmp 0x5f93
movq 0x20(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x4850
movq %rax, -0x6f0(%rbp)
jmp 0x5d11
movq -0x6f0(%rbp), %rax
movsbl (%rax), %esi
leaq -0x270(%rbp), %rdi
callq 0x46f0
jmp 0x5d29
leaq -0x2d8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x5420
jmp 0x5d3b
leaq -0x98(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
movq %rsi, -0x6f8(%rbp)
callq 0x4510
movq -0x6f8(%rbp), %rdi
callq 0x48b8
leaq -0x2f8(%rbp), %rdi
leaq -0x270(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0xa390
jmp 0x5d7a
leaq -0xb8(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
movq %rsi, -0x700(%rbp)
callq 0x4510
movq -0x700(%rbp), %rdi
callq 0x48b8
leaq -0x318(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x270(%rbp), %rdx
callq 0xa390
jmp 0x5dbc
leaq -0xd8(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0x4510
leaq -0x318(%rbp), %rdi
callq 0x48b8
jmp 0x5c55
leaq -0x270(%rbp), %rdi
callq 0x48b8
movq -0x620(%rbp), %rdi
movq 0x40(%rbp), %rax
movq %rax, -0x750(%rbp)
callq 0x41e0
movq -0x628(%rbp), %rdi
movq %rax, -0x748(%rbp)
callq 0x41e0
movq -0x630(%rbp), %rdi
movq %rax, -0x740(%rbp)
callq 0x41e0
movq -0x638(%rbp), %rdi
movq %rax, -0x738(%rbp)
callq 0x41e0
movq -0x640(%rbp), %rdi
movq %rax, -0x730(%rbp)
callq 0x41e0
movq -0x648(%rbp), %rdi
movq %rax, -0x720(%rbp)
callq 0x41e0
movq -0x600(%rbp), %rdi
movq %rax, -0x718(%rbp)
callq 0x41e0
movq %rax, -0x710(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x41e0
movq -0x608(%rbp), %rdi
movq %rax, %r12
movq -0xe8(%rbp), %r14
addq $0x2, %r14
movq -0xe0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x728(%rbp)
callq 0x41e0
movq -0x750(%rbp), %rdi
movq -0x748(%rbp), %rdx
movq -0x740(%rbp), %rcx
movq -0x738(%rbp), %r8
movq -0x730(%rbp), %r9
movq -0x728(%rbp), %r11
movq %rax, %rsi
movq -0x720(%rbp), %rax
movq %rsi, -0x708(%rbp)
leaq 0x2240d(%rip), %rsi     # 0x28300
leaq 0x22430(%rip), %r13     # 0x2832a
leaq 0x2242b(%rip), %r15     # 0x2832c
leaq 0x22426(%rip), %rbx     # 0x2832e
leaq 0x22bef(%rip), %r10     # 0x28afe
movq %rax, (%rsp)
movq -0x718(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x710(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x708(%rbp), %rax
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movb $0x0, %al
callq 0x4620
leaq -0xd8(%rbp), %rdi
callq 0x48b8
leaq -0xb8(%rbp), %rdi
callq 0x48b8
leaq -0x98(%rbp), %rdi
callq 0x48b8
leaq -0x78(%rbp), %rdi
callq 0x48b8
jmp 0x6c22
leaq -0xd8(%rbp), %rdi
callq 0x48b8
leaq -0xb8(%rbp), %rdi
callq 0x48b8
leaq -0x98(%rbp), %rdi
callq 0x48b8
leaq -0x78(%rbp), %rdi
callq 0x48b8
jmp 0x6c34
movq -0x618(%rbp), %rdi
leaq 0x22ba8(%rip), %rsi     # 0x28b7b
callq 0xa360
testb $0x1, %al
jne 0x5fe1
jmp 0x6b17
leaq -0x338(%rbp), %rdi
callq 0x45f0
leaq -0x358(%rbp), %rdi
callq 0x45f0
leaq -0x378(%rbp), %rdi
callq 0x45f0
leaq -0x398(%rbp), %rdi
callq 0x45f0
movq -0x638(%rbp), %rdi
callq 0x4650
movq -0x640(%rbp), %rdi
movq %rax, -0x760(%rbp)
callq 0x4650
movq -0x640(%rbp), %rdi
movq %rax, %rcx
movq -0x760(%rbp), %rax
subq %rcx, %rax
movl %eax, -0x3ac(%rbp)
callq 0x4650
movq %rax, %rcx
movb $0x0, -0x3d1(%rbp)
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, -0x751(%rbp)
jbe 0x60af
movq -0x640(%rbp), %rdi
callq 0x4650
movq -0x638(%rbp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x3d0(%rbp), %rdi
callq 0x4460
jmp 0x608f
movq -0x640(%rbp), %rdi
movb $0x1, -0x3d1(%rbp)
leaq -0x3d0(%rbp), %rsi
callq 0xa2a0
movb %al, -0x751(%rbp)
movb -0x751(%rbp), %al
movb %al, -0x761(%rbp)
testb $0x1, -0x3d1(%rbp)
jne 0x60c6
jmp 0x60d2
leaq -0x3d0(%rbp), %rdi
callq 0x48b8
movb -0x761(%rbp), %al
testb $0x1, %al
jne 0x60e1
jmp 0x61c2
movq -0x638(%rbp), %rdi
movslq -0x3ac(%rbp), %rax
movq %rax, -0x770(%rbp)
callq 0x4650
movq -0x638(%rbp), %rsi
movq -0x770(%rbp), %rdx
movq %rax, %rcx
leaq -0x3f8(%rbp), %rdi
callq 0x4460
jmp 0x611a
movq -0x640(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0xa330
movb %al, -0x771(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x48b8
movb -0x771(%rbp), %al
testb $0x1, %al
jne 0x614b
jmp 0x617c
movq -0x640(%rbp), %rdi
callq 0x4650
subq $0x1, %rax
addq 0x28(%rbp), %rax
movq %rax, 0x28(%rbp)
jmp 0x61bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x6ae2
movq -0x640(%rbp), %rdi
callq 0x4650
cmpq $0x2, %rax
ja 0x61a8
movq -0x640(%rbp), %rdi
callq 0x4650
subq $0x1, %rax
addq 0x28(%rbp), %rax
movq %rax, 0x28(%rbp)
jmp 0x61bb
movl -0x3ac(%rbp), %eax
subl $0x1, %eax
cltq
addq 0x28(%rbp), %rax
movq %rax, 0x28(%rbp)
jmp 0x61bd
jmp 0x6492
movq -0x640(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
movb $0x0, -0x419(%rbp)
movb $0x0, -0x441(%rbp)
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, -0x772(%rbp)
jne 0x6292
movq -0x640(%rbp), %rdi
callq 0x4650
movq -0x638(%rbp), %rsi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x418(%rbp), %rdi
callq 0x4460
jmp 0x6219
movq -0x640(%rbp), %rdi
movb $0x1, -0x419(%rbp)
leaq -0x418(%rbp), %rsi
callq 0xa2a0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x772(%rbp)
jne 0x6244
jmp 0x6292
movq -0x638(%rbp), %rdi
callq 0x4650
movq -0x638(%rbp), %rsi
movq %rax, %rdx
decq %rdx
leaq -0x440(%rbp), %rdi
movq $-0x1, %rcx
callq 0x4460
jmp 0x6272
movq -0x640(%rbp), %rdi
movb $0x1, -0x441(%rbp)
leaq -0x440(%rbp), %rsi
callq 0xa2a0
movb %al, -0x772(%rbp)
movb -0x772(%rbp), %al
movb %al, -0x773(%rbp)
testb $0x1, -0x441(%rbp)
jne 0x62a9
jmp 0x62b5
leaq -0x440(%rbp), %rdi
callq 0x48b8
testb $0x1, -0x419(%rbp)
jne 0x62c0
jmp 0x62cc
leaq -0x418(%rbp), %rdi
callq 0x48b8
movb -0x773(%rbp), %al
testb $0x1, %al
jne 0x62d8
jmp 0x6340
cmpl $0x1, -0x3ac(%rbp)
jne 0x631d
movq 0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, 0x28(%rbp)
jmp 0x633b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
testb $0x1, -0x419(%rbp)
jne 0x630c
jmp 0x6318
leaq -0x418(%rbp), %rdi
callq 0x48b8
jmp 0x6ae2
movq -0x640(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
addq $0x1, %rcx
movq 0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, 0x28(%rbp)
jmp 0x6490
movq -0x638(%rbp), %rdi
movslq -0x3ac(%rbp), %rax
movq %rax, -0x780(%rbp)
callq 0x4650
movq -0x638(%rbp), %rsi
movq -0x780(%rbp), %rdx
movq %rax, %rcx
movb $0x0, -0x489(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x4460
jmp 0x6380
movq -0x640(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0xa2a0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x781(%rbp)
jne 0x63a4
jmp 0x6422
movq -0x638(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x4, %rcx
movb %al, -0x781(%rbp)
je 0x6422
movq -0x640(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x2, %rcx
movb %al, -0x781(%rbp)
je 0x6422
movq -0x638(%rbp), %rsi
movl -0x3ac(%rbp), %eax
decl %eax
movslq %eax, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x488(%rbp), %rdi
callq 0x4460
jmp 0x6402
movq -0x640(%rbp), %rdi
movb $0x1, -0x489(%rbp)
leaq -0x488(%rbp), %rsi
callq 0xa330
movb %al, -0x781(%rbp)
movb -0x781(%rbp), %al
movb %al, -0x782(%rbp)
testb $0x1, -0x489(%rbp)
jne 0x6439
jmp 0x6445
leaq -0x488(%rbp), %rdi
callq 0x48b8
leaq -0x468(%rbp), %rdi
callq 0x48b8
movb -0x782(%rbp), %al
testb $0x1, %al
jne 0x645d
jmp 0x648e
movq 0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, 0x28(%rbp)
jmp 0x648e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x468(%rbp), %rdi
callq 0x48b8
jmp 0x6ae2
jmp 0x6490
jmp 0x6492
movq -0x610(%rbp), %rsi
leaq -0x338(%rbp), %rdi
callq 0x4070
jmp 0x64a7
movq -0x610(%rbp), %rdi
callq 0x41e0
movq %rax, %rdi
callq 0x4200
movl %eax, -0x490(%rbp)
leaq -0x4b0(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x5300
jmp 0x64d6
leaq -0x358(%rbp), %rdi
leaq -0x4b0(%rbp), %rsi
callq 0x4510
leaq -0x4b0(%rbp), %rdi
callq 0x48b8
movq 0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x3a0(%rbp)
movq -0x3a0(%rbp), %rax
movq %rax, -0x790(%rbp)
movq 0x20(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
movq -0x790(%rbp), %rax
cmpq %rcx, %rax
jae 0x664e
movq 0x20(%rbp), %rsi
movq -0x3a0(%rbp), %rdx
movslq -0x490(%rbp), %rcx
leaq -0x4d0(%rbp), %rdi
callq 0x4460
jmp 0x654e
jmp 0x6550
leaq -0x4d0(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x4060
movl %eax, -0x794(%rbp)
jmp 0x656b
movl -0x794(%rbp), %eax
cmpl $0x0, %eax
jne 0x6642
movq -0x3a0(%rbp), %rax
incq %rax
movq %rax, -0x3a0(%rbp)
leaq -0x338(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x4070
jmp 0x65a0
leaq -0x4f0(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x5300
jmp 0x65b5
leaq -0x358(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
movq %rsi, -0x7a0(%rbp)
callq 0x4510
movq -0x7a0(%rbp), %rdi
callq 0x48b8
movq 0x20(%rbp), %rsi
movq -0x3a0(%rbp), %rdx
movslq -0x490(%rbp), %rcx
leaq -0x510(%rbp), %rdi
callq 0x4460
jmp 0x65fb
leaq -0x4d0(%rbp), %rdi
leaq -0x510(%rbp), %rsi
callq 0x4510
leaq -0x510(%rbp), %rdi
callq 0x48b8
jmp 0x6550
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x48b8
jmp 0x6ae2
leaq -0x4d0(%rbp), %rdi
callq 0x48b8
movq -0x610(%rbp), %rsi
leaq -0x338(%rbp), %rdi
callq 0x4070
jmp 0x6663
leaq -0x530(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x5420
jmp 0x6678
leaq -0x358(%rbp), %rdi
leaq -0x530(%rbp), %rsi
callq 0x4510
leaq -0x530(%rbp), %rdi
callq 0x48b8
movq 0x28(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x3a8(%rbp)
cmpq $0x0, -0x3a8(%rbp)
jb 0x6939
movq 0x20(%rbp), %rdi
movq -0x3a8(%rbp), %rsi
callq 0x4850
movq %rax, -0x7a8(%rbp)
jmp 0x66cd
movq -0x7a8(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x7b4(%rbp)
leaq -0x551(%rbp), %rdi
movq %rdi, -0x7b0(%rbp)
callq 0x4780
movl -0x7b4(%rbp), %edx
movq -0x7b0(%rbp), %rcx
leaq -0x550(%rbp), %rdi
movl $0x1, %esi
callq 0x42f0
jmp 0x6710
leaq -0x551(%rbp), %rdi
callq 0x44a0
leaq -0x578(%rbp), %rdi
leaq -0x550(%rbp), %rsi
leaq -0x338(%rbp), %rdx
callq 0xa390
jmp 0x6738
leaq -0x378(%rbp), %rdi
leaq -0x578(%rbp), %rsi
movq %rsi, -0x7c0(%rbp)
callq 0x4510
movq -0x7c0(%rbp), %rdi
callq 0x48b8
leaq -0x598(%rbp), %rdi
leaq -0x358(%rbp), %rsi
leaq -0x550(%rbp), %rdx
callq 0xa390
jmp 0x677a
leaq -0x398(%rbp), %rdi
leaq -0x598(%rbp), %rsi
callq 0x4510
leaq -0x598(%rbp), %rdi
callq 0x48b8
leaq -0x378(%rbp), %rdi
leaq -0x398(%rbp), %rsi
callq 0x4060
movl %eax, -0x7c4(%rbp)
jmp 0x67b4
movl -0x7c4(%rbp), %eax
cmpl $0x0, %eax
jne 0x692d
leaq -0x338(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x4070
jmp 0x67d8
movq -0x3a8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x3a8(%rbp)
cmpq $0x0, -0x3a8(%rbp)
jae 0x683f
jmp 0x692d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x551(%rbp), %rdi
callq 0x44a0
jmp 0x6ae2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x550(%rbp), %rdi
callq 0x48b8
jmp 0x6ae2
movq 0x20(%rbp), %rdi
movq -0x3a8(%rbp), %rsi
callq 0x4850
movq %rax, -0x7d0(%rbp)
jmp 0x6858
movq -0x7d0(%rbp), %rax
movsbl (%rax), %esi
leaq -0x550(%rbp), %rdi
callq 0x46f0
jmp 0x6870
leaq -0x5b8(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x5420
jmp 0x6885
leaq -0x358(%rbp), %rdi
leaq -0x5b8(%rbp), %rsi
movq %rsi, -0x7d8(%rbp)
callq 0x4510
movq -0x7d8(%rbp), %rdi
callq 0x48b8
leaq -0x5d8(%rbp), %rdi
leaq -0x550(%rbp), %rsi
leaq -0x338(%rbp), %rdx
callq 0xa390
jmp 0x68c7
leaq -0x378(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
movq %rsi, -0x7e0(%rbp)
callq 0x4510
movq -0x7e0(%rbp), %rdi
callq 0x48b8
leaq -0x5f8(%rbp), %rdi
leaq -0x358(%rbp), %rsi
leaq -0x550(%rbp), %rdx
callq 0xa390
jmp 0x6909
leaq -0x398(%rbp), %rdi
leaq -0x5f8(%rbp), %rsi
callq 0x4510
leaq -0x5f8(%rbp), %rdi
callq 0x48b8
jmp 0x6799
leaq -0x550(%rbp), %rdi
callq 0x48b8
movq -0x620(%rbp), %rdi
movq 0x40(%rbp), %rax
movq %rax, -0x830(%rbp)
callq 0x41e0
movq -0x628(%rbp), %rdi
movq %rax, -0x828(%rbp)
callq 0x41e0
movq -0x630(%rbp), %rdi
movq %rax, -0x820(%rbp)
callq 0x41e0
movq -0x638(%rbp), %rdi
movq %rax, -0x818(%rbp)
callq 0x41e0
movq -0x640(%rbp), %rdi
movq %rax, -0x810(%rbp)
callq 0x41e0
movq -0x648(%rbp), %rdi
movq %rax, -0x800(%rbp)
callq 0x41e0
movq -0x600(%rbp), %rdi
movq %rax, -0x7f8(%rbp)
callq 0x41e0
movq %rax, -0x7f0(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x41e0
movq -0x608(%rbp), %rdi
movq %rax, %r12
movq -0x3a8(%rbp), %r14
addq $0x2, %r14
movq -0x3a0(%rbp), %rax
movq %rax, -0x808(%rbp)
callq 0x41e0
movq -0x830(%rbp), %rdi
movq -0x828(%rbp), %rdx
movq -0x820(%rbp), %rcx
movq -0x818(%rbp), %r8
movq -0x810(%rbp), %r9
movq -0x808(%rbp), %r11
movq %rax, %rsi
movq -0x800(%rbp), %rax
movq %rsi, -0x7e8(%rbp)
leaq 0x218c1(%rip), %rsi     # 0x28300
leaq 0x218b6(%rip), %r13     # 0x282fc
leaq 0x218df(%rip), %r15     # 0x2832c
leaq 0x218da(%rip), %rbx     # 0x2832e
leaq 0x220a3(%rip), %r10     # 0x28afe
movq %rax, (%rsp)
movq -0x7f8(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x7f0(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x7e8(%rbp), %rax
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movb $0x0, %al
callq 0x4620
leaq -0x398(%rbp), %rdi
callq 0x48b8
leaq -0x378(%rbp), %rdi
callq 0x48b8
leaq -0x358(%rbp), %rdi
callq 0x48b8
leaq -0x338(%rbp), %rdi
callq 0x48b8
jmp 0x6c20
leaq -0x398(%rbp), %rdi
callq 0x48b8
leaq -0x378(%rbp), %rdi
callq 0x48b8
leaq -0x358(%rbp), %rdi
callq 0x48b8
leaq -0x338(%rbp), %rdi
callq 0x48b8
jmp 0x6c34
movq -0x618(%rbp), %rdi
leaq 0x2180d(%rip), %rsi     # 0x28332
callq 0xa360
testb $0x1, %al
jne 0x6b33
jmp 0x6c1e
movq -0x620(%rbp), %rdi
movq 0x40(%rbp), %rax
movq %rax, -0x860(%rbp)
callq 0x41e0
movq -0x628(%rbp), %rdi
movq %rax, -0x858(%rbp)
callq 0x41e0
movq -0x630(%rbp), %rdi
movq %rax, -0x850(%rbp)
callq 0x41e0
movq -0x638(%rbp), %rdi
movq %rax, -0x848(%rbp)
callq 0x41e0
movq -0x640(%rbp), %rdi
movq %rax, -0x840(%rbp)
callq 0x41e0
movq -0x648(%rbp), %rdi
movq %rax, %r14
callq 0x41e0
movq -0x600(%rbp), %rdi
movq %rax, %rbx
callq 0x41e0
movq -0x608(%rbp), %rdi
movq %rax, -0x838(%rbp)
callq 0x41e0
movq -0x860(%rbp), %rdi
movq -0x858(%rbp), %rdx
movq -0x850(%rbp), %rcx
movq -0x848(%rbp), %r8
movq -0x840(%rbp), %r9
movq -0x838(%rbp), %r11
leaq 0x2173e(%rip), %rsi     # 0x28336
leaq 0x21753(%rip), %r10     # 0x28352
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x4620
jmp 0x6c20
jmp 0x6c22
addq $0x898, %rsp            # imm = 0x898
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x118(%rbp), %rdi
callq 0x4770