// File: /workspace/github_cpp_makefile_star2_O1/jackz314[P]bars-to-bwav/./bars-to-bwav.cpp
// Function: main
int main(int argc, char const *argv[])
{
    if(argc < 2){
        cout << "Missing file arguments!" << endl;
        displayHelp();
        return -1;
    }

    if(argc == 2 && string(argv[1]) == "-h"){
        displayHelp();
        return 0;
    }

    vector<string> barsFiles;
    if(filesystem::is_directory(argv[1])){// process a directory of bars files
        filesystem::directory_iterator end_itr;
        filesystem::path p(argv[1]);
        cout << "BARS file to be processed in directory " << argv[1] << ':' << endl;
        for(filesystem::directory_iterator itr(p); itr != end_itr; itr++){
            //only deal with bars files
            if (is_regular_file(itr->path()) && itr->path().extension().generic_string() == ".bars") {
                string fileName = itr->path().string();
                barsFiles.push_back(fileName);
                cout << fileName << endl;
            }
        }

    }else{// process single file
        barsFiles.push_back(argv[1]);
        cout << "BARS file to be processed: " << argv[1] << endl;
    }

    string baseOutputDir;
    if(argc > 2){// have output folder or no overwrite
        if(argc == 4 && string(argv[3]) == "--no-overwrite"){ // have no overwrite and output folder
            baseOutputDir = argv[2];
            OVERWRITE = false;
        }
        if(argc == 3 && string(argv[2]) == "--no-overwrite"){ // only no overwrite
            baseOutputDir = "BWAV-Output/";
            OVERWRITE = false;
        }else{ // only out dir
            cout << '['<<argv[2]<<']' << endl;
            baseOutputDir = argv[2];
        }
        if(baseOutputDir.back() != '/' || baseOutputDir.back() != '\\'){
            baseOutputDir += '/';
        }
    }else{
        baseOutputDir = "BWAV-Output/";
    }

    string spliter = "----------------------------------------";
    
    int totalBWAVCount = 0;

    int countB = 0;
    for(string barsFile : barsFiles){
        ifstream inFile(barsFile, ios::binary);
        if(!inFile){
            cout << "Failed to open BARS file " << barsFile << endl;
            return -2;
        }
        inFile.seekg(0, ios::end);
        streamsize barsSize = inFile.tellg();
        inFile.seekg(0,ios::beg);
        
        cout << spliter << '(' << dec << ++countB << '/' << barsFiles.size() << ')' << spliter << endl;
        cout << "Processing BARS file " << barsFile << " size: " << barsSize << endl;

        vector<char> fBuf(barsSize);
        if(!inFile.read(fBuf.data(), barsSize)){
            //read filed
            cout << "Read file failed." << endl;
        }

        vector<string> audioNames;
        vector<streamoff> startOffsets;

        for (streamoff i = 0; i < barsSize - 4; i+=4){
            //Hex representation of BWAV's header start (BWAV: 0x42 0x57 0x41 0x56)
            if(fBuf[i] == 0x42 && fBuf[i+1] == 0x57 && fBuf[i+2] == 0x41 && fBuf[i+3] == 0x56){
                //matched BWAV, send to start offsets
                startOffsets.push_back(i);
               if(VERBOSE) cout << "Found BWAV at offset 0x" << hex << i <<endl;
            }

            //Hex representation of BARS's AMTA header start (AMTA: 0x41 0x4D 0x54 0x41)
            if(fBuf[i] == 0x41 && fBuf[i+1] == 0x4D && fBuf[i+2] == 0x54 && fBuf[i+3] == 0x41){
                //matched AMTA, send to file names
                streamsize nameLen = 0;
                streamoff nameStart = i+0x48;//start of name string offset +0x48 after start of AMTA tag (possibly after a padding)
                if(fBuf[nameStart] == 0x01){
                    //start is 0x01, skip padding (or something else) of 0x8 to the actual file name
                    nameStart += 0x8;
                    /* for(; nameStart < barsSize; nameStart++){
                        if(fBuf[nameStart] != '\0') break; // start of name, not null
                    } */
                }
                //go to file name end
                for(streamoff j = nameStart; j < barsSize; j++, nameLen++){
                    // cout << "CHAR:[" << fBuf[j] << "]. Int: " << int(fBuf[j]) << endl;
                    if(fBuf[j] == -0x3e){ // some files needs to move start idx forward if -c2 is present, inconsistent
                        // cout << "FOUND -3e" << endl; // c2 in signed byte is -3e
                        nameStart = j + 1;
                        nameLen = -1; // so it's 0 when the next iteration begins
                    }
                    if(fBuf[j] == '\0') break; // end of name, null
                }
                string name = string(fBuf.begin() + nameStart, fBuf.begin() + nameStart + nameLen);
                if(find(audioNames.begin(),audioNames.end(), name) != audioNames.end()){//already exists
                    //deal with duplicates with repeat counter
                    int repeatCounter = 1;
                    while(find(audioNames.begin(),audioNames.end(), name + '-' + to_string(repeatCounter)) != audioNames.end()){
                        repeatCounter++;
                    }
                    name += '-' + to_string(repeatCounter);
                }
                audioNames.push_back(name);
                if(VERBOSE) cout << "Found AMTA tag at offset 0x" << hex << i << " Name: " << name << endl;
            }
        }

        cout << endl << "Found all BWAV files. Total count: " << dec << startOffsets.size() << ". Writing bwav files to " << baseOutputDir << endl;
        
        if(!createDirIfNotExist(baseOutputDir)) return -3;

        if(audioNames.size() < startOffsets.size()){
            cout << "BWAV names count is not the same as BWAV counts!" << endl;
            for(size_t i = 1; i < startOffsets.size() - audioNames.size() + 1; i++){
                audioNames.push_back("extra_" + to_string(i));
            }
        }

        //write bwav files
        string onlyBarsFileName = filesystem::path(barsFile).filename().string();
        string outputDir = onlyBarsFileName.substr(0, onlyBarsFileName.size() - 5) + '/';//remove the extension and add directory slash
        cout << "Output subdirectory: " << outputDir << endl;
        if(!createDirIfNotExist(baseOutputDir + outputDir)) return -3;
        int illegal_counter = 0;
        for(size_t i = 0; i < startOffsets.size(); i++){
            streamoff offset = startOffsets[i];
            streamoff nextOffset;
            if(i+1 == startOffsets.size()){
                nextOffset = barsSize;
            }else{
                nextOffset = startOffsets[i+1];            
            }
            streamsize writeSize = nextOffset - offset;
            string fName = audioNames[i] + ".bwav";
            if(VERBOSE) cout << dec << '(' << i+1 << '/' << startOffsets.size() << ") Writing " << fName << " from offset 0x" << hex << offset << endl;
            string oFilePath = baseOutputDir + outputDir + fName;

            //deal with duplicate file names, already dealt with before, here to deal with pre-existing ones
            if(!OVERWRITE && filesystem::exists(oFilePath)){//don't overwrite
                int repeatCounter = 1;
                string newOFilePath = oFilePath.substr(0,oFilePath.size()-5) + '-';
                while(filesystem::exists(newOFilePath + to_string(repeatCounter) + ".bwav")){//already exists, use another name
                    repeatCounter++;
                }
                oFilePath = newOFilePath + to_string(repeatCounter) + ".bwav";
            }

            fstream oFile(oFilePath, ios::out | ios::binary);
            if(!oFile.write(fBuf.data()+offset, writeSize)){// if failed, probably due to illegal name
                ++illegal_counter;
                oFilePath = baseOutputDir + outputDir + "illegal_name_" + to_string(illegal_counter) + ".bwav";
                fstream oFileRetry(oFilePath, ios::out | ios::binary); // try again
                if(!oFileRetry.write(fBuf.data()+offset, writeSize)){ // still failed
                    cout << "Write bwav failed. Path: [" << oFilePath << "] Count: " << dec << i << " Offset: 0x" << hex << offset << endl;
                }else{
                    ++totalBWAVCount;
                }
                oFileRetry.close();
            }else{
                ++totalBWAVCount;
            }
            oFile.close();
        }
    }

    cout << spliter << spliter << endl;
    cout << "Done! Processed " << dec << barsFiles.size() << " BARS files and generated " << totalBWAVCount << " BWAV files in total." << endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x948, %rsp            # imm = 0x948
cmpl $0x1, %edi
jg 0x187e1
leaq 0xf7d6a(%rip), %rbx     # 0x110500
leaq 0xb7967(%rip), %rsi     # 0xd0104
movl $0x17, %edx
movq %rbx, %rdi
callq 0x84ff0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
callq 0x186b2
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x1ac2d
movq %rsi, %r12
movl %edi, %r13d
cmpl $0x2, %edi
jne 0x1881d
movq 0x8(%r12), %rsi
leaq -0x710(%rbp), %rbx
leaq -0x103(%rbp), %rdx
movq %rbx, %rdi
callq 0x1b3fe
leaq 0xb790e(%rip), %rsi     # 0xd011c
movq %rbx, %rdi
callq 0x8db00
testl %eax, %eax
sete %bl
jmp 0x1881f
xorl %ebx, %ebx
cmpl $0x2, %r13d
jne 0x18844
leaq -0x700(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18844
movq -0x700(%rbp), %rsi
incq %rsi
callq 0x1c3a0
testb %bl, %bl
je 0x18855
callq 0x186b2
xorl %r14d, %r14d
jmp 0x1ac2d
xorps %xmm0, %xmm0
movaps %xmm0, -0x1b0(%rbp)
movq $0x0, -0x1a0(%rbp)
leaq 0x8(%r12), %rbx
leaq -0x668(%rbp), %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x1b43c
leaq -0x668(%rbp), %rdi
callq 0xaaa10
movq %rax, %r14
leaq -0x668(%rbp), %rdi
callq 0x1b3b6
cmpb $0x2, %r14b
jne 0x188fe
leaq -0x668(%rbp), %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x1b43c
leaq 0xf7c41(%rip), %r14     # 0x110500
leaq 0xb7859(%rip), %rsi     # 0xd011f
movl $0x27, %edx
movq %r14, %rdi
callq 0x84ff0
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1898c
movq %rbx, %rdi
callq 0x13360
leaq 0xf7c12(%rip), %rdi     # 0x110500
movq %rbx, %rsi
movq %rax, %rdx
callq 0x84ff0
jmp 0x189a4
movq (%rbx), %rsi
leaq -0x668(%rbp), %rdi
leaq -0x458(%rbp), %rdx
callq 0x1b3fe
leaq -0x1b0(%rbp), %rdi
leaq -0x668(%rbp), %rsi
callq 0x1be66
leaq -0x658(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18946
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq 0xf7bb3(%rip), %r15     # 0x110500
leaq 0xb77f9(%rip), %rsi     # 0xd014d
movl $0x1b, %edx
movq %r15, %rdi
callq 0x84ff0
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x18c1e
movq %rbx, %rdi
callq 0x13360
leaq 0xf7b84(%rip), %rdi     # 0x110500
movq %rbx, %rsi
movq %rax, %rdx
callq 0x84ff0
jmp 0x18c36
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x65e70
leaq -0x458(%rbp), %rsi
movb $0x3a, (%rsi)
leaq 0xf7b4b(%rip), %rdi     # 0x110500
movl $0x1, %edx
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq %r12, -0xe8(%rbp)
leaq -0x970(%rbp), %rdi
leaq -0x668(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa76c0
cmpq $0x0, -0x968(%rbp)
je 0x18c09
leaq -0x970(%rbp), %r15
movl %r13d, %r12d
movq %r15, %rdi
callq 0xa6a20
movq %rax, %rdi
callq 0xaaa10
movzbl %al, %r14d
cmpq $0x1, %r14
jne 0x18ab8
movq %r15, %rdi
callq 0xa6a20
movq %rax, %rdi
callq 0xb5020
testq %rax, %rax
setne %cl
cmpq $-0x1, %rdx
setne %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x18abd
leaq -0x458(%rbp), %r13
movq %r13, %rdi
movq %rax, %rsi
movq $-0x1, %rcx
callq 0x8e160
leaq -0x6d0(%rbp), %rdi
movq %r13, %rsi
movl $0x2, %edx
callq 0x1b634
movq -0x458(%rbp), %rdi
leaq -0x448(%rbp), %rax
cmpq %rax, %rdi
je 0x18aaf
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x6d0(%rbp), %r13
jmp 0x18acc
xorl %r13d, %r13d
jmp 0x18afa
leaq -0x6d0(%rbp), %r13
movq %r13, %rdi
callq 0x1b750
leaq -0x6f0(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
leaq -0x458(%rbp), %rdx
callq 0x1b77a
movq %rbx, %rdi
leaq 0xb7658(%rip), %rsi     # 0xd0147
callq 0x8db00
testl %eax, %eax
sete %r13b
cmpl $0x1, %r14d
jne 0x18b2e
movq -0x6f0(%rbp), %rdi
leaq -0x6e0(%rbp), %rax
cmpq %rax, %rdi
je 0x18b22
movq -0x6e0(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x6d0(%rbp), %rdi
callq 0x1b3b6
testb %r13b, %r13b
movl %r12d, %r13d
je 0x18bde
movq %r15, %rdi
callq 0xa6a20
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x448(%rbp), %rax
movq %rax, -0x458(%rbp)
leaq -0x458(%rbp), %r14
movq %r14, %rdi
callq 0x1b926
leaq -0x1b0(%rbp), %rdi
movq %r14, %rsi
callq 0x1b4c4
movq -0x458(%rbp), %rsi
movq -0x450(%rbp), %rdx
leaq 0xf7973(%rip), %rdi     # 0x110500
callq 0x84ff0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %r14, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq -0x458(%rbp), %rdi
leaq -0x448(%rbp), %rax
cmpq %rax, %rdi
je 0x18bde
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x768(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1b510
leaq -0x768(%rbp), %rdi
callq 0x1b3b6
cmpq $0x0, -0x968(%rbp)
jne 0x18a1f
leaq -0x668(%rbp), %rdi
callq 0x1b3b6
movq -0xe8(%rbp), %r12
jmp 0x18c61
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x65e70
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
leaq 0xf78ac(%rip), %rdi     # 0x110500
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
cmpl $0x2, %r13d
jne 0x18c9a
leaq 0xb74f6(%rip), %rcx     # 0xd0178
leaq -0x50(%rbp), %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x8c540
jmp 0x18e87
cmpl $0x4, %r13d
jne 0x18cd2
movq 0x18(%r12), %rsi
leaq -0x6a8(%rbp), %rdi
leaq -0x102(%rbp), %rdx
callq 0x1b3fe
leaq 0xb74aa(%rip), %rsi     # 0xd0169
leaq -0x6a8(%rbp), %rdi
callq 0x8db00
testl %eax, %eax
sete %bl
jmp 0x18cd4
xorl %ebx, %ebx
cmpl $0x4, %r13d
jne 0x18cf9
leaq -0x698(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18cf9
movq -0x698(%rbp), %rsi
incq %rsi
callq 0x1c3a0
testb %bl, %bl
je 0x18d2c
movq 0x10(%r12), %rbx
leaq -0x50(%rbp), %r14
movq 0x8(%r14), %r15
movq %rbx, %rdi
callq 0x13360
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x8c540
movb $0x0, 0xf6744(%rip)     # 0x10f470
cmpl $0x3, %r13d
jne 0x18d64
movq 0x10(%r12), %rsi
leaq -0x688(%rbp), %rdi
leaq -0x101(%rbp), %rdx
callq 0x1b3fe
leaq 0xb7418(%rip), %rsi     # 0xd0169
leaq -0x688(%rbp), %rdi
callq 0x8db00
testl %eax, %eax
sete %bl
jmp 0x18d66
xorl %ebx, %ebx
cmpl $0x3, %r13d
jne 0x18d8b
leaq -0x678(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18d8b
movq -0x678(%rbp), %rsi
incq %rsi
callq 0x1c3a0
testb %bl, %bl
je 0x18db7
leaq -0x50(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0xb73da(%rip), %rcx     # 0xd0178
movl $0xc, %r8d
xorl %esi, %esi
callq 0x8c540
movb $0x0, 0xf66be(%rip)     # 0x10f470
jmp 0x18e79
leaq -0x668(%rbp), %rsi
movb $0x5b, (%rsi)
leaq 0xf7738(%rip), %rdi     # 0x110500
movl $0x1, %edx
callq 0x84ff0
movq %rax, %rbx
movq 0x10(%r12), %r14
testq %r14, %r14
je 0x18df7
movq %r14, %rdi
callq 0x13360
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x84ff0
jmp 0x18e10
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x65e70
leaq -0x668(%rbp), %rsi
movb $0x5d, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq 0x10(%r12), %rbx
leaq -0x50(%rbp), %r14
movq 0x8(%r14), %r15
movq %rbx, %rdi
callq 0x13360
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x8c540
leaq -0x50(%rbp), %rdi
movl $0x2f, %esi
callq 0x8bf80
leaq -0x1e8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xb72ec(%rip), %rsi     # 0xd0185
leaq 0xb730d(%rip), %rdx     # 0xd01ad
leaq -0x1f8(%rbp), %rdi
callq 0x1b926
movq -0x1b0(%rbp), %rcx
movq -0x1a8(%rbp), %rax
movq %rax, -0x238(%rbp)
cmpq %rax, %rcx
sete %al
je 0x1aaba
leaq -0x60(%rbp), %r13
leaq -0x448(%rbp), %r12
leaq -0x218(%rbp), %rbx
leaq -0x458(%rbp), %r15
movl $0xd1b71759, %r14d      # imm = 0xD1B71759
movl $0x0, -0x74(%rbp)
movl $0x0, -0x134(%rbp)
movl $0x0, -0xbc(%rbp)
movb %al, -0x29(%rbp)
leaq -0x208(%rbp), %rax
movq %rax, -0x218(%rbp)
movq (%rcx), %rsi
movq %rcx, -0x240(%rbp)
movq 0x8(%rcx), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x1bb7e
leaq -0x970(%rbp), %rdi
movq %rbx, %rsi
movl $0x4, %edx
callq 0x619e0
movq -0x970(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x950(%rbp,%rax)
je 0x18fcc
movl $0x19, %edx
leaq 0xf759a(%rip), %rdi     # 0x110500
leaq 0xb7241(%rip), %rsi     # 0xd01ae
callq 0x84ff0
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdx
leaq 0xf7579(%rip), %rdi     # 0x110500
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movl $0xfffffffe, -0x74(%rbp) # imm = 0xFFFFFFFE
movl $0x0, -0xc0(%rbp)
jmp 0x1aa5f
leaq -0x970(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x6ae10
leaq -0x970(%rbp), %rbx
movq %rbx, %rdi
callq 0x6aba0
movq %rax, -0x110(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6ae10
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
leaq 0xf74ea(%rip), %rdi     # 0x110500
callq 0x84ff0
movb $0x28, -0x668(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x668(%rbp), %rsi
callq 0x84ff0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl -0x134(%rbp), %esi
incl %esi
movq %rax, %rdi
movl %esi, -0x134(%rbp)
callq 0x858c0
movb $0x2f, -0x668(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x668(%rbp), %rsi
callq 0x84ff0
movq -0x1a8(%rbp), %rsi
subq -0x1b0(%rbp), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x858f0
movb $0x29, -0x668(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x668(%rbp), %rsi
callq 0x84ff0
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
movq %rax, %rdi
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movl $0x15, %edx
leaq 0xf7403(%rip), %rdi     # 0x110500
leaq 0xb70c4(%rip), %rsi     # 0xd01c8
callq 0x84ff0
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdx
leaq 0xf73e2(%rip), %rdi     # 0x110500
callq 0x84ff0
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0xb70a9(%rip), %rsi     # 0xd01de
callq 0x84ff0
movq %rbx, %rdi
movq -0x110(%rbp), %rsi
callq 0x85640
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
leaq -0x230(%rbp), %rdi
movq -0x110(%rbp), %rbx
movq %rbx, %rsi
leaq -0x668(%rbp), %rdx
callq 0x1b566
movq -0x230(%rbp), %rsi
leaq -0x970(%rbp), %rdi
movq %rbx, %rdx
callq 0x6a550
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x191fe
movl $0x11, %edx
leaq 0xf7340(%rip), %rdi     # 0x110500
leaq 0xb701f(%rip), %rsi     # 0xd01e6
callq 0x84ff0
leaq 0xf732d(%rip), %rcx     # 0x110500
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
leaq 0xf730f(%rip), %rdi     # 0x110500
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
xorps %xmm0, %xmm0
movaps %xmm0, -0x130(%rbp)
xorl %eax, %eax
movq %rax, -0x120(%rbp)
movq %rax, -0xf0(%rbp)
movaps %xmm0, -0x100(%rbp)
movq %rax, -0x158(%rbp)
cmpq $0x5, -0x110(%rbp)
jl 0x19835
movq -0x110(%rbp), %rax
leaq -0x4(%rax), %rcx
movq %rcx, -0xe8(%rbp)
negq %rax
movq %rax, -0x1b8(%rbp)
xorl %eax, %eax
movq -0x230(%rbp), %rcx
cmpb $0x42, (%rcx,%rax)
jne 0x1932a
cmpb $0x57, 0x1(%rcx,%rax)
jne 0x1932a
cmpb $0x41, 0x2(%rcx,%rax)
jne 0x1932a
cmpb $0x56, 0x3(%rcx,%rax)
jne 0x1932a
movq -0xf8(%rbp), %rsi
cmpq -0xf0(%rbp), %rsi
je 0x192a4
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, -0xf8(%rbp)
jmp 0x192b7
leaq -0x100(%rbp), %rdi
leaq -0x158(%rbp), %rdx
callq 0x1c0b8
cmpb $0x1, 0xf6324(%rip)     # 0x10f5e2
jne 0x1932a
movl $0x17, %edx
leaq 0xf7234(%rip), %rdi     # 0x110500
leaq 0xb6f25(%rip), %rsi     # 0xd01f8
callq 0x84ff0
leaq 0xf7221(%rip), %rdi     # 0x110500
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rdi,%rax)
movq -0x158(%rbp), %rsi
callq 0x85640
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq -0x158(%rbp), %rcx
movq -0x230(%rbp), %rsi
cmpb $0x41, (%rsi,%rcx)
jne 0x19816
cmpb $0x4d, 0x1(%rsi,%rcx)
jne 0x19816
cmpb $0x54, 0x2(%rsi,%rcx)
jne 0x19816
cmpb $0x41, 0x3(%rsi,%rcx)
jne 0x19816
leaq 0x48(%rcx), %rax
cmpb $0x1, 0x48(%rsi,%rcx)
leaq 0x50(%rcx), %rcx
cmoveq %rcx, %rax
cmpq -0x110(%rbp), %rax
jge 0x193bb
leaq 0x1(%rax), %rcx
xorl %edx, %edx
movb -0x1(%rsi,%rcx), %dil
cmpb $-0x3e, %dil
movq $-0x1, %r8
cmoveq %r8, %rdx
cmoveq %rcx, %rax
testb %dil, %dil
je 0x193bd
incq %rdx
movq -0x1b8(%rbp), %rdi
addq %rcx, %rdi
incq %rdi
incq %rcx
cmpq $0x1, %rdi
jne 0x19383
jmp 0x193bd
xorl %edx, %edx
addq %rax, %rsi
addq %rsi, %rdx
leaq -0x658(%rbp), %rax
movq %rax, -0x668(%rbp)
leaq -0x668(%rbp), %rbx
movq %rbx, %rdi
callq 0x1c1f8
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rsi
movq %rbx, %rdx
callq 0x1c270
cmpq -0x128(%rbp), %rax
je 0x1973d
movl $0x1, %ebx
movq -0x130(%rbp), %r15
movq -0x128(%rbp), %r12
movq %r13, -0x70(%rbp)
movq -0x668(%rbp), %rsi
movq -0x660(%rbp), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %r13
movq %r13, %rdi
callq 0x1bb7e
movq -0x68(%rbp), %rsi
movl $0x1, %ecx
movq %r13, %rdi
xorl %edx, %edx
movl $0x2d, %r8d
callq 0x8c230
movl $0x1, %r13d
cmpl $0xa, %ebx
jb 0x1949c
movl $0x4, %r13d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x19493
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x19499
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x1949c
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x19463
addl $-0x3, %r13d
jmp 0x1949c
addl $-0x2, %r13d
jmp 0x1949c
decl %r13d
movl %r13d, %esi
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
movl $0x2d, %edx
callq 0x8b250
movq -0x98(%rbp), %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x1ba8c
movq -0x70(%rbp), %rcx
movl $0xf, %esi
leaq -0x60(%rbp), %r13
cmpq %r13, %rcx
je 0x194e5
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %r8
movq -0x90(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x1951a
movl $0xf, %esi
leaq -0x88(%rbp), %rdi
cmpq %rdi, -0x98(%rbp)
je 0x19515
movq -0x88(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x1952c
movq -0x98(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x8cf60
jmp 0x1953c
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8c8e0
leaq -0x448(%rbp), %rsi
movq %rsi, -0x458(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x19569
movq %rdx, -0x458(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x448(%rbp)
jmp 0x1956f
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x450(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %r15, %rdi
movq %r12, %rsi
leaq -0x458(%rbp), %rdx
callq 0x1c270
movq %rax, %r15
movq -0x128(%rbp), %r12
movq -0x458(%rbp), %rdi
leaq -0x448(%rbp), %rax
cmpq %rax, %rdi
je 0x195cc
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x195ee
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x19603
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x1c3a0
cmpq %r12, %r15
je 0x1960f
incl %ebx
jmp 0x19408
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x1965b
movl $0x4, %r15d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x19652
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x19658
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x1965b
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x19622
addl $-0x3, %r15d
jmp 0x1965b
addl $-0x2, %r15d
jmp 0x1965b
decl %r15d
movl %r15d, %esi
movq %r13, -0x70(%rbp)
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x8b250
movq -0x70(%rbp), %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x1ba8c
movl $0x1, %edx
movq %r12, %rdi
xorl %esi, %esi
movl $0x2d, %ecx
callq 0x8c390
leaq -0x448(%rbp), %r15
movq %r15, -0x458(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x196c8
movq %r15, %r12
movq %rdx, -0x458(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x448(%rbp)
jmp 0x196d2
movups (%rcx), %xmm0
movq %r15, %r12
movups %xmm0, (%r15)
leaq -0x458(%rbp), %r15
movq 0x8(%rax), %rdx
movq %rdx, -0x450(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x458(%rbp), %rsi
movq -0x450(%rbp), %rdx
leaq -0x668(%rbp), %rdi
callq 0x8cf60
movq -0x458(%rbp), %rdi
cmpq %r12, %rdi
je 0x19728
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x1973d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x130(%rbp), %rdi
leaq -0x668(%rbp), %rsi
callq 0x1b4c4
cmpb $0x1, 0xf5e8b(%rip)     # 0x10f5e2
jne 0x197f4
movl $0x1b, %edx
leaq 0xf6d97(%rip), %rdi     # 0x110500
leaq 0xb6aa0(%rip), %rsi     # 0xd0210
callq 0x84ff0
leaq 0xf6d84(%rip), %rdi     # 0x110500
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rdi,%rax)
movq -0x158(%rbp), %rsi
callq 0x85640
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0xb6a7d(%rip), %rsi     # 0xd022c
callq 0x84ff0
movq -0x668(%rbp), %rsi
movq -0x660(%rbp), %rdx
movq %rbx, %rdi
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x19816
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x158(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x158(%rbp)
cmpq -0xe8(%rbp), %rax
jl 0x19252
leaq 0xf6cc4(%rip), %rcx     # 0x110500
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
leaq 0xf6ca6(%rip), %rdi     # 0x110500
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq %rax, %rbx
movl $0x23, %edx
movq %rax, %rdi
leaq 0xb69bb(%rip), %rsi     # 0xd0234
callq 0x84ff0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq -0xf8(%rbp), %rsi
subq -0x100(%rbp), %rsi
sarq $0x3, %rsi
movq %rbx, %rdi
callq 0x858f0
movq %rax, %rbx
movl $0x18, %edx
movq %rax, %rdi
leaq 0xb6999(%rip), %rsi     # 0xd0258
callq 0x84ff0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
leaq -0x50(%rbp), %rdi
callq 0x185ec
testb %al, %al
je 0x19b8c
movq -0x128(%rbp), %rax
subq -0x130(%rbp), %rax
sarq $0x5, %rax
movq -0xf8(%rbp), %rcx
subq -0x100(%rbp), %rcx
sarq $0x3, %rcx
cmpq %rcx, %rax
jae 0x19b30
movl $0x30, %edx
leaq 0xf6bb8(%rip), %rdi     # 0x110500
leaq 0xb6922(%rip), %rsi     # 0xd0271
callq 0x84ff0
leaq 0xf6ba5(%rip), %rcx     # 0x110500
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
leaq 0xf6b87(%rip), %rdi     # 0x110500
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq -0xf8(%rbp), %rax
subq -0x100(%rbp), %rax
sarq $0x3, %rax
movq -0x128(%rbp), %rcx
subq -0x130(%rbp), %rcx
sarq $0x5, %rcx
subq %rcx, %rax
incq %rax
cmpq $0x2, %rax
jb 0x19b30
movl $0x1, %ebx
movl $0x1, %esi
cmpq $0xa, %rbx
jb 0x19a19
movl $0x4, %esi
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0x19a12
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x19a17
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x19a19
movq %rcx, %rax
movabsq $0x346dc5d63886594b, %rdx # imm = 0x346DC5D63886594B
mulq %rdx
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x199d2
addl $-0x3, %esi
jmp 0x19a19
addl $-0x2, %esi
jmp 0x19a19
decl %esi
movl %esi, %esi
movq %r12, -0x458(%rbp)
movq %r15, %rdi
xorl %edx, %edx
callq 0x8b250
movq -0x458(%rbp), %rdi
movl -0x450(%rbp), %esi
movq %rbx, %rdx
callq 0x1bafe
movl $0x6, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xb684d(%rip), %rcx     # 0xd02a2
callq 0x8c8e0
leaq -0x658(%rbp), %rsi
movq %rsi, -0x668(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x19a8a
movq %rdx, -0x668(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x658(%rbp)
jmp 0x19a90
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x660(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x130(%rbp), %rdi
leaq -0x668(%rbp), %rsi
callq 0x1be66
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x19adf
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x458(%rbp), %rdi
cmpq %r12, %rdi
je 0x19afa
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
incq %rbx
movq -0xf8(%rbp), %rax
subq -0x100(%rbp), %rax
sarq $0x3, %rax
movq -0x128(%rbp), %rcx
subq -0x130(%rbp), %rcx
sarq $0x5, %rcx
subq %rcx, %rax
incq %rax
cmpq %rax, %rbx
jb 0x199bf
movq %r15, %rdi
leaq -0x218(%rbp), %rsi
movl $0x2, %edx
callq 0x1b336
movq -0x450(%rbp), %rax
testq %rax, %rax
je 0x19beb
movq -0x438(%rbp), %rcx
movl %ecx, %edx
notb %dl
movq %r15, %rsi
testb $0x3, %dl
je 0x19bdd
movl %ecx, %edx
andl $0x3, %edx
jne 0x19beb
movq -0x458(%rbp), %rdx
cmpb $0x2f, -0x1(%rdx,%rax)
je 0x19beb
testb $0x3, %cl
je 0x19ba2
xorl %eax, %eax
leaq -0x438(%rbp), %rbx
jmp 0x19bb1
movl $0xfffffffd, -0x74(%rbp) # imm = 0xFFFFFFFD
movl $0x0, -0xc0(%rbp)
jmp 0x1aa1d
leaq -0x438(%rbp), %rbx
movq %rbx, %rdi
callq 0xb4200
movq -0x438(%rbp), %rcx
leaq -0x30(%rax), %rsi
testb $0x3, %cl
cmovneq %rax, %rsi
leaq 0x20(%rsi), %rax
testb $0x3, %cl
cmovneq %rbx, %rax
movl (%rax), %eax
notl %eax
testb $0x3, %al
jne 0x19beb
testb $0x3, %cl
cmovneq %r15, %rsi
leaq -0x668(%rbp), %rdi
callq 0x1b9c0
jmp 0x19bf7
leaq -0x668(%rbp), %rdi
callq 0x1b750
movq -0x668(%rbp), %rsi
movq %r13, -0x70(%rbp)
movq -0x660(%rbp), %rdx
addq %rsi, %rdx
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0x1b926
leaq -0x668(%rbp), %rbx
movq %rbx, %rdi
callq 0x1b3b6
leaq -0x458(%rbp), %rdi
callq 0x1b3b6
movq -0x68(%rbp), %rcx
addq $-0x5, %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x8e160
movq -0x660(%rbp), %rsi
movl $0x1, %ecx
movq %rbx, %rdi
xorl %edx, %edx
movl $0x2f, %r8d
callq 0x8c230
leaq -0x88(%rbp), %rsi
movq %rsi, -0x98(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x458(%rbp), %r15
je 0x19c9b
movq %rdx, -0x98(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x88(%rbp)
jmp 0x19ca1
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x90(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x19cdd
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movl $0x15, %edx
leaq 0xf6817(%rip), %rdi     # 0x110500
leaq 0xb65b9(%rip), %rsi     # 0xd02a9
callq 0x84ff0
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq 0xf67f6(%rip), %rdi     # 0x110500
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
leaq -0x668(%rbp), %rbx
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x1b5d0
movq %rbx, %rdi
callq 0x185ec
movl %eax, -0xc0(%rbp)
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x19d83
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
cmpb $0x0, -0xc0(%rbp)
je 0x1a9df
movq -0x100(%rbp), %rax
movq -0xf8(%rbp), %rcx
subq %rax, %rcx
je 0x1a9e6
sarq $0x3, %rcx
xorl %esi, %esi
movl $0x0, -0x138(%rbp)
leaq 0x1(%rsi), %r12
movq -0x110(%rbp), %r13
cmpq %rcx, %r12
je 0x19dcb
movq (%rax,%r12,8), %r13
movq (%rax,%rsi,8), %rax
movq %rax, -0xe8(%rbp)
movq -0x130(%rbp), %rax
movq %rsi, -0x248(%rbp)
movq %rsi, %rcx
shlq $0x5, %rcx
leaq -0x148(%rbp), %rdx
movq %rdx, -0x158(%rbp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
leaq -0x158(%rbp), %rbx
movq %rbx, %rdi
callq 0x1bb7e
leaq -0x668(%rbp), %r15
movq %rbx, %rdi
leaq 0xb649a(%rip), %rsi     # 0xd02bf
callq 0x8d0a0
cmpb $0x1, 0xf57b1(%rip)     # 0x10f5e2
jne 0x19f35
leaq 0xf66c2(%rip), %rdi     # 0x110500
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rdi,%rax)
movb $0x28, -0x668(%rbp)
movl $0x1, %edx
movq %r15, %rsi
callq 0x84ff0
movq %rax, %rdi
movq %r12, %rsi
callq 0x858f0
movb $0x2f, -0x668(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x84ff0
movq -0xf8(%rbp), %rsi
subq -0x100(%rbp), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x858f0
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0xb6410(%rip), %rsi     # 0xd02c5
callq 0x84ff0
movq -0x158(%rbp), %rsi
movq -0x150(%rbp), %rdx
movq %rbx, %rdi
callq 0x84ff0
movq %rax, %rbx
movl $0xf, %edx
movq %rax, %rdi
leaq 0xb63ee(%rip), %rsi     # 0xd02d0
callq 0x84ff0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movq -0xe8(%rbp), %rsi
callq 0x85640
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x1b5d0
movq -0x158(%rbp), %rsi
movq -0x150(%rbp), %rdx
movq %r15, %rdi
callq 0x8cf60
leaq -0x168(%rbp), %rsi
movq %rsi, -0x178(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x738(%rbp), %r15
je 0x19f95
movq %rdx, -0x178(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x168(%rbp)
jmp 0x19f9b
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x170(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x19fd7
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movb 0xf5493(%rip), %bl      # 0x10f470
testb %bl, %bl
je 0x19fe6
xorl %r15d, %r15d
jmp 0x1a017
movq %r15, %rdi
leaq -0x178(%rbp), %rsi
movl $0x2, %edx
callq 0x1b336
movq %r15, %rdi
callq 0xaaa10
movl $0xff, %edx
andq %rdx, %rax
setne %cl
cmpq %rdx, %rax
setne %r15b
andb %cl, %r15b
movq %r12, -0x1b8(%rbp)
testb %bl, %bl
jne 0x1a02e
leaq -0x738(%rbp), %rdi
callq 0x1b3b6
testb %r15b, %r15b
leaq -0x448(%rbp), %r12
leaq -0x458(%rbp), %r15
je 0x1a4d0
movq -0x170(%rbp), %rcx
addq $-0x5, %rcx
leaq -0x668(%rbp), %rbx
movq %rbx, %rdi
leaq -0x178(%rbp), %rsi
xorl %edx, %edx
callq 0x8e160
movq -0x660(%rbp), %rsi
movl $0x1, %ecx
movq %rbx, %rdi
xorl %edx, %edx
movl $0x2d, %r8d
callq 0x8c230
movq %r12, -0x458(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1a0ad
movq %rdx, -0x458(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x448(%rbp)
jmp 0x1a0b5
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x450(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x1a0f1
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movl $0x1, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0x1a13f
movl $0x4, %ebx
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x1a138
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x1a13d
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x1a13f
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x1a10a
addl $-0x3, %ebx
jmp 0x1a13f
addl $-0x2, %ebx
jmp 0x1a13f
decl %ebx
movl %ebx, %esi
leaq -0x188(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0x198(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x8b250
movq -0x198(%rbp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x1ba8c
movq -0x458(%rbp), %rcx
movq -0x450(%rbp), %r8
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8c8e0
leaq -0xd0(%rbp), %rsi
movq %rsi, -0xe0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0xe0(%rbp), %rdi
je 0x1a1c5
movq %rdx, -0xe0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd0(%rbp)
jmp 0x1a1cb
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0xd8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb60d3(%rip), %rsi     # 0xd02bf
callq 0x8d0a0
leaq -0xa8(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1a221
movq %rdx, -0xb8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa8(%rbp)
jmp 0x1a227
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0xb0(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x668(%rbp), %r12
movq %r12, %rdi
leaq -0xb8(%rbp), %rsi
movl $0x2, %edx
callq 0x1b634
movq %r12, %rdi
callq 0xaaa10
movq %rax, %rbx
movq %r12, %rdi
callq 0x1b3b6
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1a291
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1a2b3
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x1a2d5
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x1c3a0
testb %bl, %bl
je 0x1a2eb
movzbl %bl, %eax
cmpl $0xff, %eax
je 0x1a2eb
incl %r15d
jmp 0x1a0f7
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0x1a333
movl $0x4, %ebx
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x1a32c
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x1a331
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x1a333
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x1a2fe
addl $-0x3, %ebx
jmp 0x1a333
addl $-0x2, %ebx
jmp 0x1a333
decl %ebx
movl %ebx, %esi
leaq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x8b250
movq -0xe0(%rbp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x1ba8c
movq -0x458(%rbp), %rcx
movq -0x450(%rbp), %r8
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8c8e0
leaq -0xa8(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq -0x448(%rbp), %r12
je 0x1a3b9
movq %rdx, -0xb8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa8(%rbp)
jmp 0x1a3bf
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
leaq -0x458(%rbp), %r15
movq 0x8(%rax), %rdx
movq %rdx, -0xb0(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xb8(%rbp), %rdi
leaq 0xb5ed1(%rip), %rsi     # 0xd02bf
callq 0x8d0a0
leaq -0x658(%rbp), %rbx
movq %rbx, -0x668(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1a423
movq %rdx, -0x668(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x658(%rbp)
jmp 0x1a429
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x660(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x178(%rbp), %rdi
leaq -0x668(%rbp), %rsi
callq 0x8b940
movq -0x668(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1a471
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1a493
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1a4b5
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x458(%rbp), %rdi
cmpq %r12, %rdi
je 0x1a4d0
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x668(%rbp), %rdi
leaq -0x178(%rbp), %rsi
movl $0x14, %edx
callq 0x613e0
movq -0xe8(%rbp), %rax
subq %rax, %r13
movq -0x230(%rbp), %rsi
addq %rax, %rsi
leaq -0x658(%rbp), %rdi
movq %r13, %rdx
callq 0x84c70
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x1a572
leaq -0x198(%rbp), %rbx
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x1b5d0
movq %rbx, %rdi
leaq 0xb5da3(%rip), %rsi     # 0xd02e0
callq 0x8d0a0
leaq -0xd0(%rbp), %rsi
movq %rsi, -0xe0(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1a57d
movq %rdx, -0xe0(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd0(%rbp)
jmp 0x1a583
incl -0xbc(%rbp)
jmp 0x1a955
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movl -0x138(%rbp), %esi
incl %esi
movq 0x8(%rax), %rdx
movq %rdx, -0xd8(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %esi, %r15d
negl %r15d
cmovsl %esi, %r15d
movl $0x1, %ebx
cmpl $0xa, %r15d
jb 0x1a5f7
movl $0x4, %ebx
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x1a5f0
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x1a5f5
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x1a5f7
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x1a5c2
addl $-0x3, %ebx
jmp 0x1a5f7
addl $-0x2, %ebx
jmp 0x1a5f7
decl %ebx
movl %esi, -0x138(%rbp)
movl %esi, %r12d
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq -0x1c8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x1d8(%rbp), %rdi
movl $0x2d, %edx
callq 0x8b250
movl %r12d, %edi
addq -0x1d8(%rbp), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x1ba8c
movq -0xe0(%rbp), %rcx
movl $0xf, %esi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rcx
je 0x1a65a
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %r8
movq -0x1d0(%rbp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq -0x448(%rbp), %r12
leaq -0x458(%rbp), %r15
jbe 0x1a6a0
movl $0xf, %esi
leaq -0x1c8(%rbp), %rdi
cmpq %rdi, -0x1d8(%rbp)
je 0x1a69b
movq -0x1c8(%rbp), %rsi
cmpq %rsi, %rax
jbe 0x1a6b5
movq -0x1d8(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x8cf60
jmp 0x1a6c5
leaq -0x1d8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8c8e0
leaq -0xa8(%rbp), %rsi
movq %rsi, -0xb8(%rbp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x1a6f2
movq %rdx, -0xb8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xa8(%rbp)
jmp 0x1a6f8
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0xb0(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0xb8(%rbp), %rdi
leaq 0xb5b9a(%rip), %rsi     # 0xd02bf
callq 0x8d0a0
movq %r12, %rbx
movq %r12, -0x458(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1a756
movq %rdx, -0x458(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x448(%rbp)
jmp 0x1a75c
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x450(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x178(%rbp), %rdi
movq %r15, %rsi
callq 0x8b940
movq -0x458(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1a7a0
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1a7c2
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x1a7e4
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1a806
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x1a828
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq %r15, %rdi
leaq -0x178(%rbp), %rsi
movl $0x14, %edx
callq 0x613e0
movq -0x230(%rbp), %rsi
addq -0xe8(%rbp), %rsi
leaq -0x448(%rbp), %rdi
movq %r13, %rdx
callq 0x84c70
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x1a93f
movl $0x1a, %edx
leaq 0xf5c89(%rip), %rdi     # 0x110500
leaq 0xb5a70(%rip), %rsi     # 0xd02ee
callq 0x84ff0
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
leaq 0xf5c68(%rip), %rdi     # 0x110500
callq 0x84ff0
movq %rax, %rbx
movl $0x9, %edx
movq %rax, %rdi
leaq 0xb5a5a(%rip), %rsi     # 0xd0309
callq 0x84ff0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movq -0x248(%rbp), %rsi
callq 0x858f0
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0xb5a29(%rip), %rsi     # 0xd0313
callq 0x84ff0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
movq -0xe8(%rbp), %rsi
callq 0x85640
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
jmp 0x1a945
incl -0xbc(%rbp)
movq %r15, %rdi
callq 0x623e0
movq %r15, %rdi
callq 0x62bb0
leaq -0x668(%rbp), %rdi
callq 0x623e0
leaq -0x668(%rbp), %rdi
callq 0x62bb0
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x1a98f
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
leaq -0x60(%rbp), %r13
je 0x1a9b5
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x100(%rbp), %rax
movq -0xf8(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq -0x1b8(%rbp), %rdx
movq %rdx, %rsi
cmpq %rcx, %rdx
jb 0x19db7
jmp 0x1a9e6
movl $0xfffffffd, -0x74(%rbp) # imm = 0xFFFFFFFD
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x1aa08
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x1aa1d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x100(%rbp), %rdi
testq %rdi, %rdi
je 0x1aa38
movq -0xf0(%rbp), %rsi
subq %rdi, %rsi
callq 0x1c3a0
leaq -0x130(%rbp), %rdi
callq 0x1b6d8
movq -0x230(%rbp), %rdi
testq %rdi, %rdi
je 0x1aa5f
movq -0x220(%rbp), %rsi
subq %rdi, %rsi
callq 0x1c3a0
leaq -0x970(%rbp), %rdi
callq 0x62710
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x1aa8d
movq -0x208(%rbp), %rsi
incq %rsi
callq 0x1c3a0
cmpb $0x0, -0xc0(%rbp)
je 0x1aacd
movq -0x240(%rbp), %rcx
addq $0x20, %rcx
cmpq -0x238(%rbp), %rcx
sete %al
leaq -0x218(%rbp), %rbx
jne 0x18f07
jmp 0x1aad0
movl $0x0, -0xbc(%rbp)
movl $0x0, -0x74(%rbp)
jmp 0x1aad0
movb -0x29(%rbp), %al
testb $0x1, %al
movl -0x74(%rbp), %r14d
je 0x1abe6
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
leaq 0xf5a0f(%rip), %rdi     # 0x110500
callq 0x84ff0
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
movq %rax, %rdi
callq 0x84ff0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
movq %rax, %rdi
callq 0x840c0
leaq 0xf59c3(%rip), %rbx     # 0x110500
leaq 0xb57db(%rip), %rsi     # 0xd031f
movl $0x10, %edx
movq %rbx, %rdi
callq 0x84ff0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq -0x1a8(%rbp), %rsi
subq -0x1b0(%rbp), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0x858f0
movq %rax, %rbx
leaq 0xb57a6(%rip), %rsi     # 0xd0330
movl $0x1a, %edx
movq %rax, %rdi
callq 0x84ff0
movq %rbx, %rdi
movl -0xbc(%rbp), %esi
callq 0x858c0
movq %rax, %rbx
leaq 0xb579c(%rip), %rsi     # 0xd034b
movl $0x15, %edx
movq %rax, %rdi
callq 0x84ff0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x66140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x84af0
xorl %r14d, %r14d
movq %rax, %rdi
callq 0x840c0
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x40(%rbp), %rbx
je 0x1ac0c
movq -0x1e8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1ac21
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x1b0(%rbp), %rdi
callq 0x1b6d8
movl %r14d, %eax
addq $0x948, %rsp            # imm = 0x948
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ad62
movq %rax, %rbx
jmp 0x1b30c
movq %rax, %rbx
jmp 0x1ad09
jmp 0x1ad5a
movq %rax, %rbx
leaq -0x658(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b321
movq -0x658(%rbp), %rsi
jmp 0x1b319
jmp 0x1ad52
jmp 0x1ad52
jmp 0x1ad62
jmp 0x1ad5a
jmp 0x1ad52
movq %rax, %rbx
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x1afe4
movq -0x658(%rbp), %rsi
jmp 0x1afdc
jmp 0x1afba
movq %rax, %rbx
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x1aced
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1aced
movq %rax, %rbx
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r13
jmp 0x1b265
movq %rax, %rbx
leaq -0x668(%rbp), %rdi
callq 0x1b3b6
leaq -0x458(%rbp), %rdi
callq 0x1b3b6
jmp 0x1b0f5
jmp 0x1b04e
movq %rax, %rbx
movq -0x458(%rbp), %rdi
cmpq %r12, %rdi
je 0x1b0b5
movq -0x448(%rbp), %rsi
jmp 0x1b0a6
jmp 0x1b0b2
jmp 0x1b0d0
jmp 0x1affd
jmp 0x1aff8
movq %rax, %rbx
jmp 0x1b321
movq %rax, %rbx
jmp 0x1b033
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0x1b30c
jmp 0x1b0d0
jmp 0x1b04e
jmp 0x1b056
jmp 0x1b056
jmp 0x1aff8
movq %rax, %rbx
leaq -0x6d0(%rbp), %rdi
callq 0x1b3b6
jmp 0x1b022
jmp 0x1ae52
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1adcf
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1adcf
jmp 0x1b1d2
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1b1d5
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b1d5
jmp 0x1af7f
jmp 0x1af7f
movq %rax, %rbx
leaq -0x738(%rbp), %rdi
callq 0x1b3b6
jmp 0x1b119
movq %rax, %rbx
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x1b119
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b119
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0x1afec
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0x1b2ea
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0x1b2c8
jmp 0x1b04e
jmp 0x1b046
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1aead
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1aead
movq %rax, %rbx
jmp 0x1aef1
jmp 0x1b046
movq %rax, %rbx
jmp 0x1aecf
movq %rax, %rbx
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x1aecf
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1aef1
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x1b10d
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b10d
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0x1b2a1
movq %rax, %rbx
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x1af52
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1af52
movq %rax, %rbx
movq -0x458(%rbp), %rdi
leaq -0x448(%rbp), %rax
cmpq %rax, %rdi
je 0x1b0f5
movq -0x448(%rbp), %rsi
jmp 0x1b0ed
jmp 0x1b04e
jmp 0x1b0d0
movq %rax, %rbx
jmp 0x1b119
jmp 0x1b126
movq %rax, %rbx
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x1b129
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b129
movq %rax, %rbx
jmp 0x1afe4
movq %rax, %rbx
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x1afe4
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r13
leaq -0x88(%rbp), %r12
jmp 0x1b24a
movq %rax, %rbx
jmp 0x1b022
movq %rax, %rbx
movq -0x458(%rbp), %rdi
leaq -0x448(%rbp), %rax
cmpq %rax, %rdi
je 0x1b022
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x968(%rbp), %rdi
testq %rdi, %rdi
je 0x1b033
callq 0x1ba20
leaq -0x668(%rbp), %rdi
callq 0x1b3b6
jmp 0x1b321
jmp 0x1b056
movq %rax, %rbx
jmp 0x1b10d
movq %rax, %rbx
jmp 0x1b0f5
movq %rax, %rbx
leaq -0x40(%rbp), %r14
jmp 0x1b2bc
movq %rax, %rbx
jmp 0x1b08c
movq %rax, %rbx
movq -0x458(%rbp), %rdi
leaq -0x448(%rbp), %rax
cmpq %rax, %rdi
je 0x1b08c
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x1b0b5
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b0b5
jmp 0x1b0b2
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x1b0d3
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b0d3
movq %rax, %rbx
movq -0x668(%rbp), %rdi
leaq -0x658(%rbp), %rax
cmpq %rax, %rdi
je 0x1b0f5
movq -0x658(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x40(%rbp), %r14
jmp 0x1b27a
movq %rax, %rbx
leaq -0x458(%rbp), %rdi
callq 0x62bb0
leaq -0x668(%rbp), %rdi
callq 0x62bb0
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r13
jmp 0x1b1ff
movq %rax, %rbx
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r13
leaq -0x88(%rbp), %r12
jmp 0x1b228
movq %rax, %rbx
jmp 0x1b156
movq %rax, %rbx
jmp 0x1b19f
movq %rax, %rbx
leaq -0x668(%rbp), %rdi
callq 0x1b3b6
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x1b17d
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b17d
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x1b19f
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r13
leaq -0x448(%rbp), %r15
movq -0x198(%rbp), %rdi
leaq -0x188(%rbp), %rax
cmpq %rax, %rdi
je 0x1b1e4
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x1c3a0
jmp 0x1b1e4
movq %rax, %rbx
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r13
leaq -0x448(%rbp), %r15
movq -0x458(%rbp), %rdi
cmpq %r15, %rdi
je 0x1b1ff
movq -0x448(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x88(%rbp), %r12
movq -0x178(%rbp), %rdi
leaq -0x168(%rbp), %rax
cmpq %rax, %rdi
je 0x1b228
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x158(%rbp), %rdi
leaq -0x148(%rbp), %rax
cmpq %rax, %rdi
je 0x1b24a
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0x1b265
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x1b27a
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x100(%rbp), %rdi
testq %rdi, %rdi
je 0x1b295
movq -0xf0(%rbp), %rsi
subq %rdi, %rsi
callq 0x1c3a0
leaq -0x130(%rbp), %rdi
callq 0x1b6d8
movq -0x230(%rbp), %rdi
testq %rdi, %rdi
je 0x1b2bc
movq -0x220(%rbp), %rsi
subq %rdi, %rsi
callq 0x1c3a0
leaq -0x970(%rbp), %rdi
callq 0x62710
movq -0x218(%rbp), %rdi
leaq -0x208(%rbp), %rax
cmpq %rax, %rdi
je 0x1b2ea
movq -0x208(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x1b30c
movq -0x1e8(%rbp), %rsi
incq %rsi
callq 0x1c3a0
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x1b321
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x1c3a0
leaq -0x1b0(%rbp), %rdi
callq 0x1b6d8
movq %rbx, %rdi
callq 0x137c0
nop