// File: /workspace/github_cpp_makefile_star2_O3/icemiliang[P]vot/demo/votx.cpp
// Function: main
int main(int argc, char* argv[]) {

    try {
        std::string appName = fs::basename(argv[0]); 
        std::string dmFile, emFile;
        int maxIterP, maxIterH; // Position of centroids & Minimizier H
        double thres, plotScale, learnRate;
        std::string outDir;
        bool verb, debug;

        // Define and parse the program options //
        po::options_description desc("Options");
        desc.add_options()
            ("dirac,d", po::value<std::string>(&dmFile)->required(), 
                "Particles associated with Dirac measures")
            ("empirical,e", po::value<std::string>(&emFile)->required(), 
                "Test points associated with Empirical measures")
            ("iterD,p", po::value<int>(&maxIterP)->default_value(5), 
                "Max iteration for updating Dirac positions. Default is 5.")
            ("iterH,h", po::value<int>(&maxIterH)->default_value(1000), 
                "Max iteration for updating diagram/'H', or size of cells. Default is 1000.")
            ("threshold,t", po::value<double>(&thres)->default_value(1.0e-06), 
                "Threshold for terminating the program. Default is 1e-06")
            ("scale,s", po::value<double>(&plotScale)->default_value(1), 
                "Scale of the output diagram. Default is 1.")
            ("rate,r", po::value<double>(&learnRate)->default_value(0.2), 
                "Learning rate. Setting this parameter means you want to use GD instead of Newton.")
            ("outdir,o", po::value<std::string>(&outDir), 
                "Output directory")
            ("verbose,v", po::value<bool>(&verb)->default_value(false), 
                "Verbose output (both console and files). Default is False.")
            ("debug,b", po::value<bool>(&debug)->default_value(false), 
                "Multiple-point check. Default is False.")
            ("help", "Print help messages");
        po::variables_map vm;
        
        try {
            po::store(po::parse_command_line(argc, argv, desc), vm); // can throw 

            //  --help option  //
            if (vm.count("help") || argc < 2) {
                print_welcome_message();
                std::cout << desc << std::endl;
                return SUCCESS;
            }

            po::notify(vm); // TODO: What does this line do?
        }
        catch(po::required_option& e) {
            std::cerr << "ERROR: " << e.what() << std::endl << std::endl; 
            return ERROR_IN_COMMAND_LINE; 
        }
        catch(po::error& e){
            std::cerr << "ERROR: " << e.what() << std::endl << std::endl;
            std::cerr << desc << std::endl;
            return ERROR_IN_COMMAND_LINE;
        }

        // Displaying paramters // 
        int slashD = dmFile.find_last_of("/\\");
        int slashE = emFile.find_last_of("/\\");
        std::string outPrefix = "D" 
                              + dmFile.substr(slashD + 1, dmFile.length() - 6 - slashD) 
                              + "_E" 
                              + emFile.substr(slashE + 1, emFile.length() - 6 - slashE);
                              
        if (!outDir.empty()) outPrefix = outDir + "/" + outPrefix;

        fs::path dir(outDir.c_str());
        if (!outDir.empty() && !fs::is_directory(outDir)) {
            std::cerr << "Directory not found: " << std::endl;
            std::cerr << "Creating: " << std::endl;
            if (fs::create_directory(dir)) { 
                std::cerr << "Directory created: " << outDir << std::endl; 
            }
            else {
                std::cerr << "Error during creating the directory. "
                          << "Write output in the current directory." << std::endl;  
                outDir.clear();
            }   
        }
        
        std::cout << "Dirac measure file: " << dmFile << std::endl;
        std::cout << "Empirical measure file: " << emFile << std::endl;
        std::cout << "Max iteration for updating centroid positions: " << maxIterP << std::endl;
        std::cout << "Max iteration for updating 'H': " << maxIterH << std::endl;
        std::cout << "Learning rate: " << learnRate << std::endl;
        std::cout << "Threshold for terminating the program: " << thres << std::endl;
        std::cout << "Scale of the output diagram: " << plotScale << std::endl;
        std::cout << "Output prefix: " << outPrefix << std::endl;
        std::cout << "Berbose flag: " << verb << std::endl;
        std::cout << "Debug flag: " << debug << std::endl;

        // ----------------------------//
        // ------- Start program ------//
        // ----------------------------//

        OTX *otx = new OTX();
        std::cout << std::endl;

        otx->import_data(dmFile, emFile);

        std::cout << "--> Setting up parameters... " << std::endl;
        otx->setup(maxIterP, maxIterH, thres, learnRate, verb, plotScale, outPrefix, debug);
        std::cout << std::endl;

        std::cout << "--> Running variational Wasserstein clustering..." << std::endl << std::endl;
        otx->cluster();

    }
    catch(std::exception& e){
        std::cerr << "Unhandled Exception reached the top of main: " 
                  << e.what() << ", application will now exit" << std::endl;
        return ERROR_UNHANDLED_EXCEPTION;
    }

    return SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rsi
leaq 0x1d0(%rsp), %rdi
leaq 0x250(%rsp), %rdx
callq 0x938a
leaq 0x250(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x70d0
leaq 0x128(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x250(%rsp), %rsi
movq 0x258(%rsp), %rdx
addq %rsi, %rdx
leaq 0x118(%rsp), %rdi
callq 0x9d5e
leaq 0x260(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x7d2b
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x7350
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7d4c
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x7350
leaq 0xd0(%rsp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0xb0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
leaq 0x90(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x250(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xc329(%rip), %rsi      # 0x140c2
leaq 0xc329(%rip), %rdx      # 0x140c9
callq 0x9df4
movq 0x131c4(%rip), %rax     # 0x1af70
movl (%rax), %edx
movl %edx, %ecx
shrl %ecx
leaq 0x1d0(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x7460
movq 0x250(%rsp), %rdi
cmpq %r15, %rdi
je 0x7de4
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x7350
leaq 0x1d0(%rsp), %rdi
callq 0x73c0
movq %rax, 0x250(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x93d2
movb $0x1, 0x8c(%rax)
leaq 0xc2b6(%rip), %rsi      # 0x140ca
leaq 0xc2b7(%rip), %rcx      # 0x140d2
leaq 0x250(%rsp), %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x93d2
movb $0x1, 0x8c(%rax)
leaq 0xc2b2(%rip), %rsi      # 0x140fb
leaq 0xc2b7(%rip), %rcx      # 0x14107
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0x7c(%rsp), %rdi
callq 0x9449
leaq 0x138(%rsp), %rsi
movl $0x5, (%rsi)
movq %rax, %rdi
callq 0x94c0
leaq 0xc2b1(%rip), %rsi      # 0x14136
leaq 0xc2b2(%rip), %rcx      # 0x1413e
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0x78(%rsp), %rdi
callq 0x9449
leaq 0xf8(%rsp), %rsi
movl $0x3e8, (%rsi)          # imm = 0x3E8
movq %rax, %rdi
callq 0x94c0
leaq 0xc2b7(%rip), %rsi      # 0x14178
leaq 0xc2b8(%rip), %rcx      # 0x14180
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0xf0(%rsp), %rdi
callq 0x95cd
movabsq $0x3eb0c6f7a0b5ed8d, %rcx # imm = 0x3EB0C6F7A0B5ED8D
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x9644
leaq 0xc2c7(%rip), %rsi      # 0x141cb
leaq 0xc2cc(%rip), %rcx      # 0x141d7
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0xe8(%rsp), %rdi
callq 0x95cd
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
leaq 0x38(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x9644
leaq 0xc2c8(%rip), %rsi      # 0x1420f
leaq 0xc2c9(%rip), %rcx      # 0x14217
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0xe0(%rsp), %rdi
callq 0x95cd
movabsq $0x3fc999999999999a, %rcx # imm = 0x3FC999999999999A
leaq 0x58(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x9644
leaq 0xc2b8(%rip), %rsi      # 0x14242
leaq 0xc2b8(%rip), %rcx      # 0x14249
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x93d2
leaq 0xc2e8(%rip), %rsi      # 0x1429b
leaq 0xc2ea(%rip), %rcx      # 0x142a4
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0xd(%rsp), %rdi
callq 0x96c5
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
movq %rax, %rdi
callq 0x973c
leaq 0xc2cc(%rip), %rsi      # 0x142b5
leaq 0xc2cf(%rip), %rcx      # 0x142bf
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
movq %rax, %r15
leaq 0xc(%rsp), %rdi
callq 0x96c5
leaq 0xe(%rsp), %rsi
movb $0x0, (%rsi)
movq %rax, %rdi
callq 0x973c
leaq 0xc2db(%rip), %rsi      # 0x142fa
leaq 0xc2dc(%rip), %rcx      # 0x14302
movq %r15, %rdi
movq %rax, %rdx
callq 0x76c0
leaq 0xc2f2(%rip), %rsi      # 0x1432a
leaq 0xc2f0(%rip), %rdx      # 0x1432f
movq %rax, %rdi
callq 0x7660
leaq 0x250(%rsp), %rdi
callq 0x7160
xorps %xmm0, %xmm0
leaq 0x2f0(%rsp), %r9
movaps %xmm0, (%r9)
movaps %xmm0, 0x10(%r9)
leaq 0x10(%rsp), %rdi
leaq 0x1d0(%rsp), %rcx
movl %ebx, %esi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x9813
leaq 0x10(%rsp), %rdi
leaq 0x250(%rsp), %rsi
xorl %edx, %edx
callq 0x7610
leaq 0x10(%rsp), %rdi
callq 0x99ba
leaq 0x2f0(%rsp), %rdi
callq 0x990e
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc26d(%rip), %rsi      # 0x1432a
leaq 0xc26a(%rip), %rdx      # 0x1432e
leaq 0x10(%rsp), %rdi
callq 0x9df4
leaq 0x260(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xfa32
leaq 0x268(%rsp), %rcx
cmpq %rcx, %rax
setne %al
cmpl $0x2, %ebx
setl %bl
orb %al, %bl
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x810d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7350
testb %bl, %bl
je 0x815b
callq 0x7c2c
movq 0x12e8b(%rip), %rdi     # 0x1afa8
leaq 0x1d0(%rsp), %rsi
callq 0x70b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x7240
jmp 0x8d31
leaq 0x250(%rsp), %rdi
callq 0x71e0
leaq 0xc1dc(%rip), %rbx      # 0x1434b
leaq 0xc0(%rsp), %r14
movl $0x2, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rdx
callq 0x7700
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
movl $0x2, %ecx
movq %rbx, %rsi
movq $-0x1, %rdx
callq 0x7700
movq %rax, %rbx
leal 0x1(%r15), %eax
movslq %eax, %rdx
movq 0x8(%r14), %rax
movslq %r15d, %rcx
negq %rcx
addq %rax, %rcx
addq $-0x6, %rcx
leaq 0x138(%rsp), %rdi
movq %r14, %rsi
callq 0x7360
leaq 0xc16f(%rip), %rcx      # 0x1434e
leaq 0x138(%rsp), %rdi
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x7390
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x821d
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x8224
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x58(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc109(%rip), %rsi      # 0x14350
callq 0x76b0
movabsq $0x100000000, %rcx      # imm = 0x100000000
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rsi
je 0x827d
movq %rsi, 0x38(%rsp)
movq (%rdx), %rsi
movq %rsi, 0x48(%rsp)
jmp 0x8284
movups (%rdx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rsi
movq %rsi, 0x40(%rsp)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdx
shlq $0x20, %rdx
addq %rcx, %rdx
sarq $0x20, %rdx
leaq 0xa0(%rsp), %rsi
movq 0x8(%rsi), %rax
movslq %ebx, %rcx
negq %rcx
addq %rax, %rcx
addq $-0x6, %rcx
leaq 0xf8(%rsp), %rdi
callq 0x7360
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
movq 0x100(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r14, %rcx
je 0x82f5
movq 0x48(%rsp), %rdi
movq 0xf8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x8321
leaq 0x108(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x831c
movq 0x108(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x832d
leaq 0x38(%rsp), %rdi
callq 0x7110
jmp 0x833e
leaq 0xf8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7390
leaq 0x20(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x8363
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x8369
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x83a7
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x83be
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x83d5
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x7350
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x83f6
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x88(%rsp), %rdx
testq %rdx, %rdx
je 0x84c3
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
movq 0x80(%rsp), %rsi
addq %rsi, %rdx
callq 0x9d5e
leaq 0xbf2d(%rip), %rsi      # 0x14353
leaq 0x58(%rsp), %rdi
callq 0x76b0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0x7110
movq %r14, 0x38(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8467
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x846e
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x38(%rsp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x73e0
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x84ac
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x84c3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x80(%rsp), %rsi
leaq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x938a
movq 0x88(%rsp), %rdx
testq %rdx, %rdx
je 0x86b1
leaq 0x58(%rsp), %rdi
movq %r15, (%rdi)
movq 0x80(%rsp), %rsi
addq %rsi, %rdx
callq 0x9d5e
leaq 0x138(%rsp), %rdi
leaq 0x58(%rsp), %rsi
xorl %edx, %edx
callq 0x74f0
movl 0x138(%rsp), %ebx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x8535
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x7350
cmpl $0x3, %ebx
je 0x86b1
movq 0x12a9b(%rip), %rbx     # 0x1afe0
leaq 0xbe09(%rip), %rsi      # 0x14355
movl $0x15, %edx
movq %rbx, %rdi
callq 0x73a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq 0x12a69(%rip), %rdi     # 0x1afe0
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x12a55(%rip), %rbx     # 0x1afe0
leaq 0xbdd9(%rip), %rsi      # 0x1436b
movl $0xa, %edx
movq %rbx, %rdi
callq 0x73a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq 0x12a23(%rip), %rdi     # 0x1afe0
callq 0x7040
movq %rax, %rdi
callq 0x7240
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7500
testb %al, %al
je 0x863c
movq 0x129fd(%rip), %rdi     # 0x1afe0
leaq 0xbd8c(%rip), %rsi      # 0x14376
movl $0x13, %edx
callq 0x73a0
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x129d5(%rip), %rdi     # 0x1afe0
callq 0x73a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
jmp 0x86b1
movq 0x1299d(%rip), %rdi     # 0x1afe0
leaq 0xbd40(%rip), %rsi      # 0x1438a
movl $0x25, %edx
callq 0x73a0
movq 0x12985(%rip), %rbx     # 0x1afe0
leaq 0xbd4e(%rip), %rsi      # 0x143b0
movl $0x26, %edx
movq %rbx, %rdi
callq 0x73a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq 0x12953(%rip), %rdi     # 0x1afe0
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq $0x0, 0x88(%rsp)
movq 0x80(%rsp), %rax
movb $0x0, (%rax)
movq 0x128f0(%rip), %rdi     # 0x1afa8
leaq 0xbd18(%rip), %rsi      # 0x143d7
movl $0x14, %edx
callq 0x73a0
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
movq 0x128c8(%rip), %rdi     # 0x1afa8
callq 0x73a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x12892(%rip), %rdi     # 0x1afa8
leaq 0xbccf(%rip), %rsi      # 0x143ec
movl $0x18, %edx
callq 0x73a0
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0x1286a(%rip), %rdi     # 0x1afa8
callq 0x73a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x12834(%rip), %rdi     # 0x1afa8
leaq 0xbc8a(%rip), %rsi      # 0x14405
movl $0x2f, %edx
callq 0x73a0
movl 0x7c(%rsp), %esi
movq 0x12818(%rip), %rdi     # 0x1afa8
callq 0x75f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x127e2(%rip), %rdi     # 0x1afa8
leaq 0xbc68(%rip), %rsi      # 0x14435
movl $0x20, %edx
callq 0x73a0
movl 0x78(%rsp), %esi
movq 0x127c6(%rip), %rdi     # 0x1afa8
callq 0x75f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x12790(%rip), %rdi     # 0x1afa8
leaq 0xbc37(%rip), %rsi      # 0x14456
movl $0xf, %edx
callq 0x73a0
movsd 0xe0(%rsp), %xmm0
movq 0x1276f(%rip), %rdi     # 0x1afa8
callq 0x7560
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x12739(%rip), %rdi     # 0x1afa8
leaq 0xbbf0(%rip), %rsi      # 0x14466
movl $0x27, %edx
callq 0x73a0
movsd 0xf0(%rsp), %xmm0
movq 0x12718(%rip), %rdi     # 0x1afa8
callq 0x7560
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x126e2(%rip), %rdi     # 0x1afa8
leaq 0xbbc1(%rip), %rsi      # 0x1448e
movl $0x1d, %edx
callq 0x73a0
movsd 0xe8(%rsp), %xmm0
movq 0x126c1(%rip), %rdi     # 0x1afa8
callq 0x7560
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x1268b(%rip), %rdi     # 0x1afa8
leaq 0xbb88(%rip), %rsi      # 0x144ac
movl $0xf, %edx
callq 0x73a0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x12669(%rip), %rdi     # 0x1afa8
callq 0x73a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x12633(%rip), %rdi     # 0x1afa8
leaq 0xbb40(%rip), %rsi      # 0x144bc
movl $0xe, %edx
callq 0x73a0
movzbl 0xd(%rsp), %esi
movq 0x12616(%rip), %rdi     # 0x1afa8
callq 0x75b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x125e0(%rip), %rdi     # 0x1afa8
leaq 0xbafc(%rip), %rsi      # 0x144cb
movl $0xc, %edx
callq 0x73a0
movzbl 0xc(%rsp), %esi
movq 0x125c3(%rip), %r14     # 0x1afa8
movq %r14, %rdi
callq 0x75b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movl $0xa8, %edi
callq 0x7340
movq %rax, %rbx
addq $0x98, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rax, 0x88(%rbx)
movq $0x0, 0x90(%rbx)
movb $0x0, 0x98(%rbx)
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq 0x1252d(%rip), %rdi     # 0x1afa8
callq 0x7040
movq %rax, %rdi
callq 0x7240
leaq 0x1c0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1b0(%rsp), %rdi
callq 0x9d5e
leaq 0x1a0(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x190(%rsp), %rdi
callq 0x9d5e
leaq 0x1b0(%rsp), %rsi
leaq 0x190(%rsp), %rdx
movq %rbx, %rdi
callq 0xfc12
movq 0x190(%rsp), %rdi
cmpq %r13, %rdi
je 0x8b15
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x1b0(%rsp), %rdi
cmpq %r15, %rdi
je 0x8b32
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x1246f(%rip), %r14     # 0x1afa8
leaq 0xb998(%rip), %rsi      # 0x144d8
movl $0x1d, %edx
movq %r14, %rdi
callq 0x73a0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq 0x1243d(%rip), %r14     # 0x1afa8
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movl 0x7c(%rsp), %ebp
movl 0x78(%rsp), %r15d
movsd 0xf0(%rsp), %xmm0
movsd %xmm0, 0x168(%rsp)
movsd 0xe0(%rsp), %xmm0
movsd %xmm0, 0x160(%rsp)
movb 0xd(%rsp), %r12b
movsd 0xe8(%rsp), %xmm0
movsd %xmm0, 0x158(%rsp)
leaq 0x180(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x170(%rsp), %rdi
callq 0x9d5e
movzbl 0xc(%rsp), %r9d
movzbl %r12b, %ecx
leaq 0x170(%rsp), %r8
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
movsd 0x168(%rsp), %xmm0
movsd 0x160(%rsp), %xmm1
movsd 0x158(%rsp), %xmm2
callq 0xfabc
movq 0x170(%rsp), %rdi
cmpq %r13, %rdi
je 0x8c3c
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x7350
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq 0x1234e(%rip), %rdi     # 0x1afa8
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x1233a(%rip), %r14     # 0x1afa8
leaq 0xb881(%rip), %rsi      # 0x144f6
movl $0x31, %edx
movq %r14, %rdi
callq 0x73a0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq 0x12308(%rip), %rdi     # 0x1afa8
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq %rbx, %rdi
callq 0x10e40
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x8cfb
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
leaq 0x128(%rsp), %r12
leaq 0xd0(%rsp), %r13
leaq 0xb0(%rsp), %rbp
je 0x8d2f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7350
xorl %ebx, %ebx
movq 0x12280(%rip), %rax     # 0x1afb8
addq $0x10, %rax
leaq 0x2c0(%rsp), %rdi
movq %rax, -0x70(%rdi)
callq 0x9ad2
leaq 0x290(%rsp), %rdi
callq 0x9b64
leaq 0x260(%rsp), %rdi
callq 0x9bdc
leaq 0x238(%rsp), %r14
movq %r14, %rdi
callq 0x9ca0
movq -0x28(%r14), %rdi
testq %rdi, %rdi
je 0x8db8
movq 0x230(%rsp), %rsi
subq %rdi, %rsi
callq 0x7350
xorl %eax, %eax
movq %rax, 0x210(%rsp)
movl %eax, 0x218(%rsp)
movq %rax, 0x220(%rsp)
movl %eax, 0x228(%rsp)
movq %rax, 0x230(%rsp)
leaq 0x1f8(%rsp), %r14
movq %r14, %rdi
callq 0x9ce8
movq -0x28(%r14), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x8de9
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x8e0e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0xa0(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8e2b
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0x8e48
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x118(%rsp), %rdi
cmpq %r12, %rdi
je 0x8e65
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x7350
movl %ebx, %eax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movq %rax, %r14
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x921e
movq 0x68(%rsp), %rsi
jmp 0x8f23
jmp 0x9218
jmp 0x8e9e
movq %rdx, %rbx
movq %rax, %r14
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x923a
movq 0x68(%rsp), %rsi
jmp 0x9232
jmp 0x8f30
movq %rdx, %rbx
movq %rax, %r14
movq 0x170(%rsp), %rdi
cmpq %r13, %rdi
je 0x921e
movq 0x180(%rsp), %rsi
jmp 0x8f23
movq %rdx, %rbx
movq %rax, %r14
movq 0x190(%rsp), %rdi
cmpq %r13, %rdi
je 0x8f0a
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x8f0a
movq %rdx, %rbx
movq %rax, %r14
movq 0x1b0(%rsp), %rdi
cmpq %r15, %rdi
je 0x921e
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x921e
movq %rdx, %rbx
movq %rax, %r14
jmp 0x923a
movq %r14, %r12
movq %rdx, %rbx
movq %rax, %r14
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8f70
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x8f70
movq %r14, %r12
movq %rdx, %rbx
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x8f8f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x8f8f
movq %rdx, %rbx
movq %rax, %r14
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x8fae
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x8fae
movq %rdx, %rbx
movq %rax, %r14
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9256
movq 0x148(%rsp), %rsi
jmp 0x924e
movq %rdx, %rbx
movq %rax, %r14
jmp 0x9256
movq %rdx, %rbx
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x90ce
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x90ce
jmp 0x90c8
movq %rdx, %rbx
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x99ba
jmp 0x901e
movq %rdx, %rbx
movq %rax, %r14
leaq 0x2f0(%rsp), %rdi
callq 0x990e
jmp 0x90ce
jmp 0x920e
movq %rdx, %rbx
movq %rax, %r14
movq 0x250(%rsp), %rdi
cmpq %r15, %rdi
je 0x9270
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x9270
movq %rdx, %rbx
movq %rax, %r14
jmp 0x9270
movq %rdx, %rbx
movq %rax, %r14
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x909b
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x7350
jmp 0x909b
movq %rdx, %rbx
movq %rax, %r14
leaq 0x1e0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9304
movq 0x1e0(%rsp), %rsi
jmp 0x92fc
movq %rdx, %rbx
movq %rax, %r14
jmp 0x9304
movq %rdx, %rbx
movq %rax, %r14
cmpl $0x3, %ebx
jne 0x9145
movq %r14, %rdi
callq 0x7150
movq %rax, %rbx
movq 0x11efb(%rip), %rdi     # 0x1afe0
leaq 0xb257(%rip), %rsi      # 0x14343
movl $0x7, %edx
callq 0x73a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x11eda(%rip), %rdi     # 0x1afe0
movq %rax, %rsi
callq 0x7330
movq %rax, %rdi
callq 0x7190
movq %rax, %rdi
callq 0x7190
movl $0x1, %ebx
leaq 0x128(%rsp), %r12
leaq 0xd0(%rsp), %r13
leaq 0xb0(%rsp), %rbp
callq 0x7590
jmp 0x8d31
cmpl $0x2, %ebx
jne 0x9256
movq %r14, %rdi
callq 0x7150
movq %rax, %rbx
movq 0x11e80(%rip), %rdi     # 0x1afe0
leaq 0xb1dc(%rip), %rsi      # 0x14343
movl $0x7, %edx
callq 0x73a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x11e5f(%rip), %rdi     # 0x1afe0
movq %rax, %rsi
callq 0x7330
movq %rax, %rdi
callq 0x7190
movq %rax, %rdi
callq 0x7190
movq 0x11e40(%rip), %rdi     # 0x1afe0
leaq 0x1d0(%rsp), %rsi
callq 0x70b0
movq %rax, %rdi
callq 0x7190
movl $0x1, %ebx
leaq 0x128(%rsp), %r12
leaq 0xd0(%rsp), %r13
leaq 0xb0(%rsp), %rbp
callq 0x7590
jmp 0x8d31
jmp 0x8fd0
jmp 0x8fd0
movq %rdx, %rbx
movq %rax, %r14
callq 0x7590
jmp 0x9256
movq %rdx, %rbx
movq %rax, %r14
callq 0x7590
jmp 0x9256
jmp 0x920e
jmp 0x920e
jmp 0x920e
jmp 0x920e
jmp 0x920e
jmp 0x920e
jmp 0x920e
movq %rdx, %rbx
movq %rax, %r14
jmp 0x9263
jmp 0x9218
movq %rdx, %rbx
movq %rax, %r14
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x923a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9256
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7350
leaq 0x250(%rsp), %rdi
callq 0x9946
leaq 0x1d0(%rsp), %rdi
callq 0x9978
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x9295
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x92ba
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x92df
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x7350
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x9304
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x7350
cmpl $0x1, %ebx
jne 0x937a
movq %r14, %rdi
callq 0x7150
movq %rax, %rbx
movq 0x11cc5(%rip), %rdi     # 0x1afe0
leaq 0xb206(%rip), %rsi      # 0x14528
movl $0x2d, %edx
callq 0x73a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x11ca4(%rip), %rdi     # 0x1afe0
movq %rax, %rsi
callq 0x7330
movq %rax, %rbx
leaq 0xb208(%rip), %rsi      # 0x14556
movl $0x1b, %edx
movq %rax, %rdi
callq 0x73a0
movq %rbx, %rdi
callq 0x7190
callq 0x7590
movl $0x2, %ebx
jmp 0x8e65
movq %rax, %r14
callq 0x7590
movq %r14, %rdi
callq 0x7620
movq %rax, %rdi
callq 0x93c7