// File: /workspace/github_cpp_makefile_star2_O1/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 $0x188, %rsp            # imm = 0x188
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r13
movq %rdx, -0x130(%rbp)
movq %rsi, -0x128(%rbp)
movq %rdi, -0x120(%rbp)
movq 0x38(%rbp), %rbx
leaq 0xd0d8(%rip), %rsi      # 0x11022
movq %rbx, %rdi
callq 0x30e0
testl %eax, %eax
movq %r15, -0x40(%rbp)
movq %r13, -0x38(%rbp)
je 0x3ff8
leaq 0xd0ed(%rip), %rsi      # 0x11056
movq %rbx, %rdi
callq 0x30e0
testl %eax, %eax
je 0x40a9
leaq 0xd0d8(%rip), %rsi      # 0x11058
movq %rbx, %rdi
callq 0x30e0
testl %eax, %eax
jne 0x4e7a
movq -0x120(%rbp), %rax
movq (%rax), %rdx
movq -0x128(%rbp), %rax
movq (%rax), %rcx
movq -0x130(%rbp), %rax
movq (%rax), %r8
movq -0x38(%rbp), %rax
movq (%rax), %r9
subq $0x8, %rsp
leaq 0xd0b8(%rip), %r10      # 0x11078
leaq 0xd095(%rip), %rsi      # 0x1105c
movq 0x40(%rbp), %rdi
xorl %eax, %eax
movq 0x18(%rbp), %r11
pushq (%r11)
pushq %r10
movq 0x10(%rbp), %r10
pushq (%r10)
pushq (%r14)
movq -0x40(%rbp), %r10
pushq (%r10)
callq 0x3480
addq $0x1b8, %rsp            # imm = 0x1B8
jmp 0x4e81
movq %r14, -0x118(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
xorl %r12d, %r12d
movq %r12, -0x8(%rax)
movb %r12b, (%rax)
leaq -0xc0(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r12, -0x8(%rax)
movb %r12b, (%rax)
leaq -0x100(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r12, -0x8(%rax)
movb %r12b, (%rax)
leaq -0xe0(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r12, -0x8(%rax)
movb %r12b, (%rax)
movq 0x8(%r15), %r14
movq 0x8(%r13), %rbx
cmpq $0x2, %rbx
jb 0x416b
leaq -0x190(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x3360
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
cmpq -0x188(%rbp), %rdx
jne 0x415b
testq %rdx, %rdx
je 0x4168
movq -0x190(%rbp), %rsi
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x3350
testl %eax, %eax
sete %r12b
jmp 0x416b
movq %r14, -0x118(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
xorl %r15d, %r15d
movq %r15, -0x8(%rax)
movb %r15b, (%rax)
leaq -0xc0(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r15, -0x8(%rax)
movb %r15b, (%rax)
leaq -0x100(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r15, -0x8(%rax)
movb %r15b, (%rax)
leaq -0xe0(%rbp), %rax
movq %rax, -0x10(%rax)
movq %r15, -0x8(%rax)
movb %r15b, (%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %r14
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rbx
cmpq $0x2, %rbx
jb 0x47ce
leaq -0x190(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x3360
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdx
cmpq -0x188(%rbp), %rdx
jne 0x4160
testq %rdx, %rdx
je 0x47cb
movq -0x190(%rbp), %rsi
movq (%rax), %rdi
callq 0x3350
testl %eax, %eax
sete %r15b
jmp 0x47ce
xorl %r12d, %r12d
jmp 0x416b
xorl %r15d, %r15d
jmp 0x47ce
movb $0x1, %r12b
cmpq $0x2, %rbx
jb 0x4186
leaq -0x180(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4186
callq 0x32f0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %r15
testb %r12b, %r12b
je 0x419f
decq %r15
movq %r15, -0x68(%rbp)
jmp 0x421f
cmpq $0x3, %r15
jb 0x41f6
subq %rbx, %r14
movslq %r14d, %rdx
movq -0x40(%rbp), %rsi
movq 0x8(%rsi), %rcx
leaq -0x170(%rbp), %rdi
callq 0x3360
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
cmpq -0x168(%rbp), %rdx
jne 0x41f6
testq %rdx, %rdx
je 0x4f77
movq -0x170(%rbp), %rsi
movq (%rax), %rdi
callq 0x3350
xorl %ecx, %ecx
cmpl $0x1, %eax
sbbq %rcx, %rcx
movq %rcx, -0x68(%rbp)
jmp 0x41fe
movq $0x0, -0x68(%rbp)
cmpq $0x3, %r15
jb 0x421f
leaq -0x160(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x20(%rbp), %r14
je 0x4223
callq 0x32f0
jmp 0x4223
movq 0x20(%rbp), %r14
leaq -0x90(%rbp), %rdi
movq 0x30(%rbp), %rsi
callq 0x31b0
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3da0
movq 0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rbx
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x427f
callq 0x32f0
movq -0x30(%rbp), %rbx
movq %rbx, -0x70(%rbp)
cmpq 0x8(%r14), %rbx
jae 0x4481
movq (%r14), %rax
movsbl (%rax,%rbx), %edx
leaq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
movq %rax, (%rdi)
movl $0x1, %esi
callq 0x33b0
leaq -0x60(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x8902
leaq -0x110(%rbp), %rdi
leaq -0x60(%rbp), %rbx
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
leaq -0x50(%rbp), %r14
cmpq %r14, %rdi
je 0x42ee
callq 0x32f0
leaq -0x60(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x8902
leaq -0xf0(%rbp), %rdi
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x4321
callq 0x32f0
movq 0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
addq %rcx, %rax
incq %rax
movq %rax, -0x70(%rbp)
leaq -0xd0(%rbp), %r15
leaq -0xb0(%rbp), %r12
leaq -0x60(%rbp), %r13
movq -0x108(%rbp), %r14
movq -0xe8(%rbp), %rbx
cmpq %r14, %rbx
movq %r14, %rdx
cmovbq %rbx, %rdx
testq %rdx, %rdx
je 0x437c
movq -0xf0(%rbp), %rsi
movq -0x110(%rbp), %rdi
callq 0x3350
testl %eax, %eax
sete %al
jmp 0x437e
movb $0x1, %al
testb %al, %al
je 0x4461
cmpq %rbx, %r14
jne 0x4461
leaq -0x90(%rbp), %rdi
movq %r15, %rsi
callq 0x31b0
movq 0x20(%rbp), %rax
movq -0x70(%rbp), %rcx
cmpq 0x8(%rax), %rcx
jae 0x4461
movq (%rax), %rax
movq -0x70(%rbp), %rcx
movsbl (%rax,%rcx), %r8d
movq -0xa8(%rbp), %rdx
movl $0x1, %ecx
movq %r12, %rdi
xorl %esi, %esi
callq 0x3620
movq %r13, %rdi
leaq -0x90(%rbp), %rsi
callq 0x3da0
movq %r15, %rdi
movq %r13, %rsi
callq 0x3400
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rbx
cmpq %rbx, %rdi
je 0x43fe
callq 0x32f0
movq %r13, %rdi
leaq -0x90(%rbp), %rsi
movq %r12, %rdx
callq 0x8902
leaq -0x110(%rbp), %rdi
movq %r13, %rsi
callq 0x3400
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x442d
callq 0x32f0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8902
leaq -0xf0(%rbp), %rdi
movq %r13, %rsi
callq 0x3400
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4458
callq 0x32f0
incq -0x70(%rbp)
jmp 0x4345
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x4479
callq 0x32f0
movq 0x20(%rbp), %r14
movq -0x30(%rbp), %rbx
leaq -0x90(%rbp), %rdi
movq 0x30(%rbp), %rsi
callq 0x31b0
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3e53
decq %rbx
movq %rbx, %r15
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rbx
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x44d4
callq 0x32f0
testq %r15, %r15
movq -0x38(%rbp), %rax
je 0x46db
movq %r15, %rsi
movq 0x8(%r14), %rdx
cmpq %r15, %rdx
jbe 0x4fb6
movq (%r14), %rax
movsbl (%rax,%rsi), %edx
leaq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
movq %rax, (%rdi)
movl $0x1, %esi
callq 0x33b0
leaq -0x60(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x8902
leaq -0x110(%rbp), %rdi
leaq -0x60(%rbp), %rbx
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
leaq -0x50(%rbp), %r14
cmpq %r14, %rdi
je 0x454e
callq 0x32f0
leaq -0x60(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x8902
leaq -0xf0(%rbp), %rdi
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x4581
callq 0x32f0
movq 0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
leaq (%rcx,%rax), %r14
addq $-0x2, %r14
leaq -0xb0(%rbp), %r12
leaq -0x60(%rbp), %r13
movq -0x108(%rbp), %rbx
movq -0xe8(%rbp), %r15
cmpq %rbx, %r15
movq %rbx, %rdx
cmovbq %r15, %rdx
testq %rdx, %rdx
je 0x45d3
movq -0xf0(%rbp), %rsi
movq -0x110(%rbp), %rdi
callq 0x3350
testl %eax, %eax
sete %al
jmp 0x45d5
movb $0x1, %al
testb %al, %al
je 0x46b9
cmpq %r15, %rbx
jne 0x46b9
leaq -0x90(%rbp), %r15
movq %r15, %rdi
leaq -0xd0(%rbp), %rsi
callq 0x31b0
movq 0x20(%rbp), %rax
leaq -0x50(%rbp), %rbx
movq 0x8(%rax), %rdx
cmpq %r14, %rdx
jbe 0x4f94
movq (%rax), %rax
movsbl (%rax,%r14), %r8d
movq -0xa8(%rbp), %rdx
movl $0x1, %ecx
movq %r12, %rdi
xorl %esi, %esi
callq 0x3620
movq %r13, %rdi
movq %r15, %rsi
callq 0x3e53
leaq -0xd0(%rbp), %rdi
movq %r13, %rsi
callq 0x3400
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4657
callq 0x32f0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x8902
leaq -0x110(%rbp), %rdi
movq %r13, %rsi
callq 0x3400
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4682
callq 0x32f0
movq %r13, %rdi
leaq -0xd0(%rbp), %rsi
movq %r12, %rdx
callq 0x8902
leaq -0xf0(%rbp), %rdi
movq %r13, %rsi
callq 0x3400
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x46b1
callq 0x32f0
decq %r14
jmp 0x459c
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x46d1
callq 0x32f0
addq $0x3, %r14
movq -0x38(%rbp), %rax
jmp 0x46e1
movl $0x2, %r14d
movq -0x120(%rbp), %rcx
movq (%rcx), %rdx
movq -0x128(%rbp), %rcx
movq (%rcx), %rcx
movq -0x130(%rbp), %rsi
movq (%rsi), %r8
movq (%rax), %r9
subq $0x8, %rsp
leaq 0xc96f(%rip), %r10      # 0x1107c
leaq 0xc93e(%rip), %r11      # 0x11052
leaq 0xc935(%rip), %rbx      # 0x11050
leaq 0xc92c(%rip), %r15      # 0x1104e
leaq 0xc8fb(%rip), %rsi      # 0x11024
movq 0x40(%rbp), %rdi
xorl %eax, %eax
movq 0x18(%rbp), %r12
pushq (%r12)
pushq %r10
pushq -0x70(%rbp)
pushq %r11
pushq %r14
pushq %rbx
pushq -0x90(%rbp)
pushq %r15
movq 0x10(%rbp), %r10
pushq (%r10)
movq -0x118(%rbp), %r10
pushq (%r10)
movq -0x40(%rbp), %r10
pushq (%r10)
callq 0x3480
addq $0x60, %rsp
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x4782
callq 0x32f0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x479a
callq 0x32f0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x47b2
callq 0x32f0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4e7a
jmp 0x4e75
movb $0x1, %r15b
cmpq $0x2, %rbx
jb 0x47e9
leaq -0x180(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47e9
callq 0x32f0
subq %rbx, %r14
testb %r15b, %r15b
je 0x4841
movslq %r14d, %rdx
movq -0x38(%rbp), %rsi
movq 0x8(%rsi), %rcx
leaq -0x170(%rbp), %rdi
callq 0x3360
movq -0x40(%rbp), %r15
movq 0x8(%r15), %rdx
movb $0x1, %bl
cmpq -0x168(%rbp), %rdx
jne 0x4980
testq %rdx, %rdx
je 0x497e
movq -0x170(%rbp), %rsi
movq (%r15), %rdi
callq 0x3350
testl %eax, %eax
setne %bl
jmp 0x4980
movq -0x40(%rbp), %r15
movq 0x8(%r15), %rbx
cmpq $0x1, %rbx
jne 0x4891
leaq -0x170(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x3360
movq 0x8(%r15), %rdx
cmpq -0x168(%rbp), %rdx
jne 0x4891
testq %rdx, %rdx
je 0x4e8c
movq -0x170(%rbp), %rsi
movq (%r15), %rdi
callq 0x3350
testl %eax, %eax
je 0x4e8c
xorl %r12d, %r12d
xorl %r15d, %r15d
testb %r12b, %r12b
je 0x48b1
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48b1
callq 0x32f0
cmpq $0x1, %rbx
movq -0x38(%rbp), %rbx
jne 0x48d0
leaq -0x160(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48d0
callq 0x32f0
testb %r15b, %r15b
je 0x48f3
cmpl $0x1, %r14d
movq -0x40(%rbp), %rax
movq 0x20(%rbp), %r15
jne 0x4975
movq 0x28(%rbp), %rax
decq %rax
jmp 0x49e0
movslq %r14d, %rdx
movq 0x8(%rbx), %rcx
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0x3360
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rbx
cmpq -0x58(%rbp), %rbx
jne 0x4934
testq %rbx, %rbx
je 0x4ee1
movq -0x60(%rbp), %rsi
movq (%rax), %rdi
movq %rbx, %rdx
callq 0x3350
testl %eax, %eax
je 0x4ee1
xorl %r15d, %r15d
movq $0x0, -0x30(%rbp)
testb %r15b, %r15b
movq 0x20(%rbp), %r15
je 0x495d
leaq -0x1a0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x495d
callq 0x32f0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x496f
callq 0x32f0
movq -0x30(%rbp), %rax
jmp 0x49dc
movq 0x8(%rax), %rax
notq %rax
jmp 0x49dc
xorl %ebx, %ebx
leaq -0x160(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4995
callq 0x32f0
movq 0x8(%r15), %rax
testb %bl, %bl
je 0x49b1
movq 0x28(%rbp), %rcx
addq %rcx, %rax
decq %rax
movq %rax, -0x30(%rbp)
movq 0x20(%rbp), %r15
jmp 0x49e4
cmpq $0x2, %rax
movq 0x20(%rbp), %r15
ja 0x49c7
movq 0x28(%rbp), %rcx
addq %rcx, %rax
decq %rax
jmp 0x49e0
shlq $0x20, %r14
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %r14, %rax
sarq $0x20, %rax
addq 0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x90(%rbp), %rdi
movq 0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x31b0
movq (%rbx), %rdi
callq 0x3170
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3da0
leaq -0xd0(%rbp), %rdi
leaq -0x60(%rbp), %r14
movq %r14, %rsi
callq 0x3400
movq (%r14), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4a36
callq 0x32f0
movq -0x30(%rbp), %rax
leaq 0x1(%rax), %r14
cmpq 0x8(%r15), %r14
movq %r14, -0x70(%rbp)
jae 0x4b54
movslq %ebx, %rcx
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rcx, -0x68(%rbp)
callq 0x3360
leaq -0x90(%rbp), %r14
leaq -0xd0(%rbp), %r12
leaq -0x150(%rbp), %r13
movq -0x58(%rbp), %rbx
movq -0xc8(%rbp), %r15
cmpq %rbx, %r15
movq %rbx, %rdx
cmovbq %r15, %rdx
testq %rdx, %rdx
je 0x4aa8
movq -0xd0(%rbp), %rsi
movq -0x60(%rbp), %rdi
callq 0x3350
testl %eax, %eax
sete %al
jmp 0x4aaa
movb $0x1, %al
testb %al, %al
je 0x4b3e
cmpq %r15, %rbx
jne 0x4b3e
movq %r14, %rdi
movq %r12, %rsi
callq 0x31b0
movq %r13, %rdi
movq %r14, %rsi
callq 0x3da0
movq 0x20(%rbp), %rbx
movq -0x70(%rbp), %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x3400
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x4afc
callq 0x32f0
incq %r15
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq -0x68(%rbp), %rcx
callq 0x3360
leaq -0x60(%rbp), %rdi
movq %r13, %rsi
callq 0x3400
movq -0x150(%rbp), %rdi
leaq -0x140(%rbp), %rax
cmpq %rax, %rdi
je 0x4b35
callq 0x32f0
movq %r15, -0x70(%rbp)
jmp 0x4a77
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4b50
callq 0x32f0
movq 0x20(%rbp), %r15
leaq -0x90(%rbp), %rdi
movq 0x30(%rbp), %rsi
callq 0x31b0
leaq -0x60(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3e53
leaq -0xd0(%rbp), %rdi
leaq -0x60(%rbp), %rbx
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4b98
callq 0x32f0
movq -0x30(%rbp), %rax
leaq -0x1(%rax), %rsi
movq 0x8(%r15), %rdx
cmpq %rsi, %rdx
jbe 0x4fc4
movq (%r15), %rax
movsbl (%rax,%rsi), %edx
leaq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
movq %rax, (%rdi)
movl $0x1, %esi
callq 0x33b0
leaq -0x150(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x8902
movq -0x30(%rbp), %r12
leaq -0x110(%rbp), %rdi
leaq -0x150(%rbp), %rbx
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
leaq -0x140(%rbp), %r14
cmpq %r14, %rdi
je 0x4c0e
callq 0x32f0
leaq -0x150(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x8902
leaq -0xf0(%rbp), %rdi
movq %rbx, %rsi
callq 0x3400
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x4c41
callq 0x32f0
addq $-0x2, %r12
leaq -0x60(%rbp), %r13
leaq -0x150(%rbp), %r14
movq -0x108(%rbp), %r15
movq -0xe8(%rbp), %rbx
cmpq %r15, %rbx
movq %r15, %rdx
cmovbq %rbx, %rdx
testq %rdx, %rdx
je 0x4c87
movq -0xf0(%rbp), %rsi
movq -0x110(%rbp), %rdi
callq 0x3350
testl %eax, %eax
sete %al
jmp 0x4c89
movb $0x1, %al
testb %al, %al
je 0x4d7b
cmpq %rbx, %r15
jne 0x4d7b
leaq -0x90(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x31b0
movq 0x20(%rbp), %rax
leaq -0x140(%rbp), %r15
movq 0x8(%rax), %rdx
cmpq %r12, %rdx
jbe 0x4fa5
movq (%rax), %rax
movsbl (%rax,%r12), %r8d
movq -0x58(%rbp), %rdx
movl $0x1, %ecx
movq %r13, %rdi
xorl %esi, %esi
callq 0x3620
movq %r14, %rdi
leaq -0x90(%rbp), %rsi
callq 0x3e53
leaq -0xd0(%rbp), %rdi
movq %r14, %rsi
callq 0x3400
movq -0x150(%rbp), %rdi
cmpq %r15, %rdi
je 0x4d0f
callq 0x32f0
movq %r14, %rdi
movq %r13, %rsi
leaq -0x90(%rbp), %rdx
callq 0x8902
leaq -0x110(%rbp), %rdi
movq %r14, %rsi
callq 0x3400
movq -0x150(%rbp), %rdi
cmpq %r15, %rdi
je 0x4d41
callq 0x32f0
movq %r14, %rdi
leaq -0xd0(%rbp), %rsi
movq %r13, %rdx
callq 0x8902
leaq -0xf0(%rbp), %rdi
movq %r14, %rsi
callq 0x3400
movq -0x150(%rbp), %rdi
cmpq %r15, %rdi
je 0x4d73
callq 0x32f0
decq %r12
jmp 0x4c50
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4d8d
callq 0x32f0
movq -0x120(%rbp), %rax
movq (%rax), %rdx
movq -0x128(%rbp), %rax
movq (%rax), %rcx
movq -0x130(%rbp), %rax
movq (%rax), %r8
movq -0x38(%rbp), %rax
movq (%rax), %r9
addq $0x3, %r12
subq $0x8, %rsp
leaq 0xc2bb(%rip), %r10      # 0x1107c
leaq 0xc28a(%rip), %r11      # 0x11052
leaq 0xc281(%rip), %rbx      # 0x11050
leaq 0xc24a(%rip), %r14      # 0x11020
leaq 0xc247(%rip), %rsi      # 0x11024
movq 0x40(%rbp), %rdi
xorl %eax, %eax
movq 0x18(%rbp), %r15
pushq (%r15)
pushq %r10
pushq -0x70(%rbp)
pushq %r11
pushq %r12
pushq %rbx
pushq -0x90(%rbp)
pushq %r14
movq 0x10(%rbp), %r10
pushq (%r10)
movq -0x118(%rbp), %r10
pushq (%r10)
movq -0x40(%rbp), %r10
pushq (%r10)
callq 0x3480
addq $0x60, %rsp
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x4e35
callq 0x32f0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x4e4d
callq 0x32f0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x4e65
callq 0x32f0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x4e7a
callq 0x32f0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %rsi
movq 0x8(%rsi), %rdx
decq %rdx
leaq -0xb0(%rbp), %rdi
movq $-0x1, %rcx
callq 0x3360
movq 0x8(%r15), %rdx
cmpq -0xa8(%rbp), %rdx
jne 0x4f84
movb $0x1, %r12b
testq %rdx, %rdx
je 0x4f8c
movq -0xb0(%rbp), %rsi
movq (%r15), %rdi
callq 0x3350
testl %eax, %eax
sete %r15b
jmp 0x4897
movq $0x0, -0x30(%rbp)
movl $0x0, %r15d
cmpq $0x2, %rbx
je 0x493f
movq -0x38(%rbp), %rsi
cmpq $0x4, 0x8(%rsi)
je 0x493f
shlq $0x20, %r14
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %r14, %rcx
sarq $0x20, %rcx
leaq -0x1b0(%rbp), %rdi
xorl %edx, %edx
callq 0x3360
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdx
movq $-0x1, -0x30(%rbp)
movb $0x1, %r15b
cmpq -0x1a8(%rbp), %rdx
jne 0x493f
testq %rdx, %rdx
je 0x4937
movq -0x1b0(%rbp), %rsi
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0x3350
xorl %ecx, %ecx
negl %eax
sbbq %rcx, %rcx
movq %rcx, -0x30(%rbp)
jmp 0x493f
movq $-0x1, -0x68(%rbp)
jmp 0x41fe
movb $0x1, %r12b
jmp 0x4894
movb $0x1, %r15b
jmp 0x4897
leaq 0xc770(%rip), %rdi      # 0x1170b
movq %r14, %rsi
xorl %eax, %eax
callq 0x34b0
leaq 0xc75f(%rip), %rdi      # 0x1170b
movq %r12, %rsi
xorl %eax, %eax
callq 0x34b0
leaq 0xc74e(%rip), %rdi      # 0x1170b
xorl %eax, %eax
callq 0x34b0
leaq 0xc740(%rip), %rdi      # 0x1170b
xorl %eax, %eax
callq 0x34b0
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x50a8
jmp 0x50a3
movq %rax, %rbx
leaq -0x160(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x50a8
jmp 0x50a3
jmp 0x5037
jmp 0x5037
jmp 0x5040
jmp 0x5037
jmp 0x5037
jmp 0x5037
jmp 0x5064
jmp 0x5064
jmp 0x5040
jmp 0x5040
jmp 0x5093
jmp 0x5093
jmp 0x5037
jmp 0x5037
jmp 0x5037
jmp 0x5037
jmp 0x5102
jmp 0x5102
jmp 0x5040
jmp 0x5040
jmp 0x5037
movq %rax, %rbx
jmp 0x50a8
jmp 0x5040
jmp 0x5040
movq %rax, %rbx
jmp 0x511d
jmp 0x5064
jmp 0x5064
jmp 0x5064
jmp 0x5052
jmp 0x5052
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x50a8
jmp 0x50a3
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x511d
jmp 0x5118
jmp 0x5093
jmp 0x5093
jmp 0x5093
jmp 0x5093
jmp 0x5102
jmp 0x5102
jmp 0x5102
jmp 0x5102
movq %rax, %rbx
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x50a8
callq 0x32f0
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x50c0
callq 0x32f0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x50d8
callq 0x32f0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x50f0
callq 0x32f0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x517a
jmp 0x5175
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x511d
callq 0x32f0
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x5135
callq 0x32f0
movq -0x110(%rbp), %rdi
leaq -0x100(%rbp), %rax
cmpq %rax, %rdi
je 0x514d
callq 0x32f0
movq -0xd0(%rbp), %rdi
leaq -0xc0(%rbp), %rax
cmpq %rax, %rdi
je 0x5165
callq 0x32f0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x517a
callq 0x32f0
movq %rbx, %rdi
callq 0x35b0