// File: /workspace/github_cpp_makefile_star2_O3/sebastienmeyer2[P]mst-clustering/src/main.cpp
// Function: main
int main(int argc, char** argv){

    bool run_mst_algo = false;
    bool run_mst_clust = false;
    bool run_mst_inc = false;
    bool run_mpi_prim = false;

    if (argc <= 1) 
    {
        exit_with_help();
    }
    
	for (int i = 1; i<argc; i++)
	{
		if(argv[i][0] != '-') exit_with_help();
		++i;
		switch(argv[i-1][1])
		{
			case 'a': run_mst_algo = true; break;
			case 'c': run_mst_clust = true; break;
			case 'i': run_mst_inc = true; break;
            case 'm': run_mpi_prim = true; break;
			default:
				std::fprintf(stderr,"unknown option\n");
				exit_with_help();
		}
	}

    /*
     * Tasks 
     */

    // TASKS 1 & 2

    if (run_mst_algo) 
    {
        // Comparing MST algorithms on Erdos-Rényi graphs

        std::vector<int> ER_graph_sizes({4, 8, 100, 250, 500, 1000});

        for (int n : ER_graph_sizes) 
        {
            Graph gER = Graph("data/ERn" + std::to_string(n) + "p10.txt");

            std::cout << "\nComparing MST algorithms with Erdos-Rényi graphs of size " << n << "." << std::endl;
            std::cout << "The graph contains " << gER.get_number_of_edges() << " edges." << std::endl;

            PrimAlgorithm primER = PrimAlgorithm(&gER);
            primER.compute_mst();

            BoruvkaAlgorithm boruvkaER = BoruvkaAlgorithm(&gER);
            boruvkaER.compute_mst();

            KruskalAlgorithm kruskalER = KruskalAlgorithm(&gER);
            kruskalER.compute_mst();
        }

        // Comparing MST algorithms on Barabasi-Albert graphs

        std::vector<int> BA_graph_sizes({100, 250, 500, 1000});

        for (int n : BA_graph_sizes) 
        {
            Graph gBA = Graph("data/BAn" + std::to_string(n) + "mo20m2.txt");

            std::cout << "\nComparing MST algorithms with Barabasi-Albert graphs of size " << n << "." << std::endl;
            std::cout << "The graph contains " << gBA.get_number_of_edges() << " edges." << std::endl;

            PrimAlgorithm primBA = PrimAlgorithm(&gBA);
            primBA.compute_mst();

            BoruvkaAlgorithm boruvkaBA = BoruvkaAlgorithm(&gBA);
            boruvkaBA.compute_mst();

            KruskalAlgorithm kruskalBA = KruskalAlgorithm(&gBA);
            kruskalBA.compute_mst();
        }
    }

    if (run_mpi_prim) 
    {
        // Comparing MST algorithms on Erdos-Rényi graphs

        std::vector<int> ER_graph_sizes({4, 8, 100, 250, 500, 1000});
    
        MPI_Init(NULL, NULL);

        int world_size;
        MPI_Comm_size(MPI_COMM_WORLD, &world_size);

        int world_rank;
        MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);

        
        

        for (int n : ER_graph_sizes) 
        {
            Graph gER = Graph("data/ERn" + std::to_string(n) + "p10.txt");

            std::cout << "\nComparing MST algorithms with Erdos-Rényi graphs of size " << n << "." << std::endl;
            std::cout << "The graph contains " << gER.get_number_of_edges() << " edges." << std::endl;

            PrimKumarAlgorithm primER = PrimKumarAlgorithm(&gER, world_rank, world_size);
            primER.compute_mst();


        }

        // Comparing MST algorithms on Barabasi-Albert graphs

        std::vector<int> BA_graph_sizes({100, 250, 500, 1000});

        for (int n : BA_graph_sizes) 
        {
            Graph gBA = Graph("data/BAn" + std::to_string(n) + "mo20m2.txt");

            std::cout << "\nComparing MST algorithms with Barabasi-Albert graphs of size " << n << "." << std::endl;
            std::cout << "The graph contains " << gBA.get_number_of_edges() << " edges." << std::endl;

            PrimKumarAlgorithm primBA = PrimKumarAlgorithm(&gBA, world_rank, world_size);
            primBA.compute_mst();
        }
        
        MPI_Finalize();
    }

    
    // TASK 5

    if (run_mst_clust) 
    {
        // Comparing MST clustering and k-means on Walmart dataset 

        std::vector<int> walmart_graph_sizes({100, 250, 500, 1000});
        std::vector<int> nb_clusters({3, 4, 5, 6, 7, 8});

        for (int n : walmart_graph_sizes)
        {
            for (int k : nb_clusters)
            {
                std::cout << "\nComparing MST clustering and k-means on graph of size " << n;
                std::cout << " and with " << k << " clusters" << std::endl;

                compare_clustering("data/scaled_n" + std::to_string(n) + "_walmart_features.txt", k);
            }
        }
    }

    // TASK 6 

    if (run_mst_inc)
    {
        // with Erdos-Rényi graphs 

        std::cout << "\nComparing different cutoffs on Erdos-Rényi graphs" << std::endl;
        std::vector<double> ER_cutoffs({1, 5, 10, 50, 100, 500, 1000});

        for (double c : ER_cutoffs) {
            Graph g = Graph("data/ERn1000p10.txt");
            KruskalAlgorithm k = KruskalAlgorithm(&g);

            std::unordered_map<Node*, Node*> clusters = k.compute_clustering(c);

            std::unordered_map<Node*, int> clusters_size;
            for (auto kv : clusters) {
                if(clusters_size.find(kv.second) != clusters_size.end()) {
                    clusters_size.at(kv.second) += 1;
                } else {
                    clusters_size.insert(std::pair<Node*, int>(kv.second, 1));
                }
            }
            std::cout << "In total, there are : " << clusters_size.size() << " clusters when cutoff = " << c << std::endl;

            int big_clusters = 0;
            std::cout << "The cluster sizes above 1 are the following : ";
            for (auto kv : clusters_size) {
                if (kv.second > 1) {
                    std::cout << kv.second << " ";
                    big_clusters += 1;
                }
            }
            std::cout << std::endl;
            std::cout << "There are " << big_clusters << " clusters of size above 1." << std::endl;
        }

        // with Walmart dataset

        std::cout << "\nComparing different cutoffs on Walmart dataset" << std::endl;
        std::vector<double> walmart_cutoffs({1, 5, 10, 50, 100, 500, 1000});

        for (double c : walmart_cutoffs) {
            compare_inconsistency("data/scaled_n1000_walmart_features.txt", c);
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x588, %rsp            # imm = 0x588
cmpl $0x2, %edi
jl 0x89a5
movl $0x1, %eax
xorl %ecx, %ecx
leaq 0xa36d(%rip), %rdx      # 0x111b0
xorl %ebp, %ebp
xorl %ebx, %ebx
movl $0x0, 0x20(%rsp)
movl %eax, %r8d
addq $0x2, %rax
movq -0x10(%rsi,%rax,8), %r9
cmpb $0x2d, (%r9)
jne 0x89a5
movsbl 0x1(%r9), %r9d
addl $-0x61, %r9d
rorl %r9d
cmpl $0x6, %r9d
ja 0x89bb
movslq (%rdx,%r9,4), %r9
addq %rdx, %r9
jmpq *%r9
movb $0x1, %bpl
jmp 0x6e96
movb $0x1, %bl
jmp 0x6e96
movb $0x1, %r9b
movl %r9d, 0x20(%rsp)
addq $0x2, %rax
addl $0x2, %r8d
cmpl %edi, %r8d
jl 0x6e56
jmp 0x6ead
movb $0x1, %cl
cmpl %edi, %eax
jl 0x6e4f
jmp 0x6eb6
testb $0x1, %cl
je 0x783e
movl %ebp, 0x34(%rsp)
movl %ebx, 0x1c(%rsp)
movups 0xa307(%rip), %xmm0     # 0x111cc
leaq 0xc0(%rsp), %r12
movaps %xmm0, (%r12)
movabsq $0x3e8000001f4, %rax    # imm = 0x3E8000001F4
movq %rax, 0x10(%r12)
leaq 0x38(%rsp), %rdi
leaq 0x250(%rsp), %r15
movl $0x6, %edx
movq %r12, %rsi
movq %r15, %rcx
callq 0x8ef2
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x58(%rsp)
cmpq %rcx, %rax
je 0x7367
movl $0xb8, %ecx
leaq 0x398(%rsp), %rdi
leaq (%rdi,%rcx), %rdx
movq %rdx, 0x50(%rsp)
movl $0x80, %edx
leaq (%rdi,%rdx), %rsi
movq %rsi, 0x90(%rsp)
leaq (%r15,%rcx), %rsi
movq %rsi, 0x88(%rsp)
leaq (%r15,%rdx), %rsi
movq %rsi, 0x80(%rsp)
addq %r12, %rcx
movq %rcx, 0x28(%rsp)
addq %r12, %rdx
movq %rdx, 0x98(%rsp)
leaq 0x4a0(%rsp), %rbp
movl $0xd1b71759, %edx       # imm = 0xD1B71759
movq %rax, 0x10(%rsp)
movl (%rax), %esi
movl %esi, %r13d
negl %r13d
cmovsl %esi, %r13d
movl $0x1, %ebx
cmpl $0xa, %r13d
jb 0x6fce
movl $0x4, %ebx
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x6fc7
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x6fcc
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x6fce
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x6f99
addl $-0x3, %ebx
jmp 0x6fce
addl $-0x2, %ebx
jmp 0x6fce
decl %ebx
movq %rbp, %r14
movq %r12, %rbp
movq %rsi, 0x8(%rsp)
movl %esi, %r12d
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq 0x260(%rsp), %rax
movq %rax, 0x250(%rsp)
movq %r15, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x250(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x8fc5
movl $0x8, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xa21e(%rip), %rcx      # 0x11248
callq 0x32c0
leaq 0xd0(%rsp), %rbx
movq %rbx, 0xc0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbp, %r12
leaq 0x240(%rsp), %r13
je 0x706e
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x7074
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
leaq 0xa2fb(%rip), %rsi      # 0x11397
callq 0x34e0
movq 0xff10(%rip), %r14      # 0x16fb8
movq %r13, 0x230(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x70d4
movq %rdx, 0x230(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x240(%rsp)
jmp 0x70dc
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x238(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbp, %rdi
leaq 0x230(%rsp), %rsi
callq 0x4864
movq 0x230(%rsp), %rdi
cmpq %r13, %rdi
je 0x7124
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
leaq 0x398(%rsp), %r13
je 0x7149
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x250(%rsp), %rdi
leaq 0x260(%rsp), %rax
cmpq %rax, %rdi
je 0x716e
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3b, %edx
movq %r14, %rdi
leaq 0xa0d4(%rip), %rsi      # 0x11251
callq 0x32d0
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0xa905(%rip), %rsi      # 0x11aa6
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl $0x13, %edx
movq %r14, %rdi
leaq 0xa0b1(%rip), %rsi      # 0x1128d
callq 0x32d0
movq %rbp, %rdi
callq 0x4dc2
movq %r14, %rdi
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0xa09c(%rip), %rsi      # 0x112a1
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %r12, %rdi
movq %rbp, %rsi
callq 0xb518
movq %r12, %rdi
callq 0xb52e
movq %r15, %rdi
movq %rbp, %rsi
callq 0xc788
movq %r15, %rdi
callq 0xc79e
movq %r13, %rdi
movq %rbp, %rsi
callq 0xce20
movq %r13, %rdi
callq 0xce36
leaq 0xfa17(%rip), %rbx      # 0x16c88
movq %rbx, 0x398(%rsp)
movq 0x50(%rsp), %rdi
callq 0x522c
movq 0x90(%rsp), %rdi
callq 0x51bc
leaq 0x3e0(%rsp), %rdi
callq 0x529c
leaq 0x3a8(%rsp), %rdi
callq 0x530c
movq %rbx, 0x250(%rsp)
movq 0x88(%rsp), %rdi
callq 0x522c
movq 0x80(%rsp), %rdi
callq 0x51bc
leaq 0x298(%rsp), %rdi
callq 0x529c
leaq 0x260(%rsp), %rdi
callq 0x530c
movq %rbx, 0xc0(%rsp)
movq 0x28(%rsp), %rdi
callq 0x522c
movq 0x98(%rsp), %rdi
callq 0x51bc
leaq 0x108(%rsp), %rdi
callq 0x529c
leaq 0xd0(%rsp), %rdi
callq 0x530c
leaq 0x548(%rsp), %rdi
callq 0x522c
leaq 0x510(%rsp), %rdi
callq 0x51bc
leaq 0x4d8(%rsp), %rdi
callq 0x529c
movq %rbp, %rdi
callq 0x530c
movq 0x10(%rsp), %rax
addq $0x4, %rax
cmpq 0x58(%rsp), %rax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
jne 0x6f75
movaps 0x9e32(%rip), %xmm0     # 0x111a0
leaq 0xc0(%rsp), %r12
movaps %xmm0, (%r12)
leaq 0x68(%rsp), %rdi
leaq 0x250(%rsp), %r15
movl $0x4, %edx
movq %r12, %rsi
movq %r15, %rcx
callq 0x8ef2
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq %rax, %rdi
je 0x780d
movl $0xb8, %eax
leaq 0x398(%rsp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, 0x50(%rsp)
movl $0x80, %edx
addq %rdx, %rcx
movq %rcx, 0x90(%rsp)
leaq (%r15,%rax), %rcx
movq %rcx, 0x88(%rsp)
leaq (%r15,%rdx), %rcx
movq %rcx, 0x80(%rsp)
addq %r12, %rax
movq %rax, 0x28(%rsp)
addq %r12, %rdx
movq %rdx, 0x98(%rsp)
leaq 0x4a0(%rsp), %rbp
movl $0xd1b71759, %edx       # imm = 0xD1B71759
movq %r15, %r14
movl (%rdi), %eax
movl %eax, %ebx
negl %ebx
movq %rax, 0x8(%rsp)
cmovsl %eax, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0x746b
movl $0x4, %r15d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x7462
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x7468
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x746b
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x7432
addl $-0x3, %r15d
jmp 0x746b
addl $-0x2, %r15d
jmp 0x746b
decl %r15d
movq %rbp, %r13
movq %rdi, 0x10(%rsp)
movq %r12, %rbp
movq 0x8(%rsp), %r12
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq 0x260(%rsp), %rax
movq %rax, 0x250(%rsp)
movq %r14, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x250(%rsp), %r12
movq %r12, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x8fc5
movl $0x8, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x9de0(%rip), %rcx      # 0x112a9
callq 0x32c0
movq %r14, %r15
leaq 0xd0(%rsp), %rbx
movq %rbx, 0xc0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbp, %r12
leaq 0x220(%rsp), %r14
je 0x7510
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x7516
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r13, %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
leaq 0x9d74(%rip), %rsi      # 0x112b2
callq 0x34e0
movq 0xfa6e(%rip), %r13      # 0x16fb8
movq %r14, 0x210(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7576
movq %rdx, 0x210(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x220(%rsp)
jmp 0x757d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x218(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbp, %rdi
leaq 0x210(%rsp), %rsi
callq 0x4864
movq 0x210(%rsp), %rdi
cmpq %r14, %rdi
je 0x75c5
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
leaq 0x398(%rsp), %r14
je 0x75ea
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x250(%rsp), %rdi
leaq 0x260(%rsp), %rax
cmpq %rax, %rdi
je 0x760f
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3e, %edx
movq %r13, %rdi
leaq 0x9c9f(%rip), %rsi      # 0x112bd
callq 0x32d0
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0xa464(%rip), %rsi      # 0x11aa6
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl $0x13, %edx
movq %r13, %rdi
leaq 0x9c10(%rip), %rsi      # 0x1128d
callq 0x32d0
movq %rbp, %rdi
callq 0x4dc2
movq %r13, %rdi
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x9bfb(%rip), %rsi      # 0x112a1
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %r12, %rdi
movq %rbp, %rsi
callq 0xb518
movq %r12, %rdi
callq 0xb52e
movq %r15, %rdi
movq %rbp, %rsi
callq 0xc788
movq %r15, %rdi
callq 0xc79e
movq %r14, %rdi
movq %rbp, %rsi
callq 0xce20
movq %r14, %rdi
callq 0xce36
leaq 0xf576(%rip), %rbx      # 0x16c88
movq %rbx, 0x398(%rsp)
movq 0x50(%rsp), %rdi
callq 0x522c
movq 0x90(%rsp), %rdi
callq 0x51bc
leaq 0x3e0(%rsp), %rdi
callq 0x529c
leaq 0x3a8(%rsp), %rdi
callq 0x530c
movq %rbx, 0x250(%rsp)
movq 0x88(%rsp), %rdi
callq 0x522c
movq 0x80(%rsp), %rdi
callq 0x51bc
leaq 0x298(%rsp), %rdi
callq 0x529c
leaq 0x260(%rsp), %rdi
callq 0x530c
movq %rbx, 0xc0(%rsp)
movq 0x28(%rsp), %rdi
callq 0x522c
movq 0x98(%rsp), %rdi
callq 0x51bc
leaq 0x108(%rsp), %rdi
callq 0x529c
leaq 0xd0(%rsp), %rdi
callq 0x530c
leaq 0x548(%rsp), %rdi
callq 0x522c
leaq 0x510(%rsp), %rdi
callq 0x51bc
leaq 0x4d8(%rsp), %rdi
callq 0x529c
movq %rbp, %rdi
callq 0x530c
movq 0x10(%rsp), %rdi
addq $0x4, %rdi
cmpq 0x58(%rsp), %rdi
movl $0xd1b71759, %edx       # imm = 0xD1B71759
jne 0x740e
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
movl 0x1c(%rsp), %ebx
movl 0x34(%rsp), %ebp
je 0x7827
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x783e
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
testb $0x1, 0x20(%rsp)
je 0x8052
movups 0x997c(%rip), %xmm0     # 0x111cc
leaq 0xc0(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $0x3e8000001f4, %rax    # imm = 0x3E8000001F4
movq %rax, 0x10(%rsi)
leaq 0x4a0(%rsp), %rdi
leaq 0x250(%rsp), %rcx
movl $0x6, %edx
callq 0x8ef2
xorl %edi, %edi
xorl %esi, %esi
callq 0x33c0
movq 0xf705(%rip), %rdi      # 0x16f98
leaq 0x68(%rsp), %rsi
callq 0x3300
movl %ebp, 0x34(%rsp)
movl %ebx, 0x1c(%rsp)
movq 0xf6ec(%rip), %rdi      # 0x16f98
leaq 0x64(%rsp), %rsi
callq 0x33b0
movq 0x4a0(%rsp), %rdx
movq 0x4a8(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq %rax, %rdx
je 0x7c52
leaq 0x200(%rsp), %r12
leaq 0x398(%rsp), %rbp
leaq 0xc0(%rsp), %r15
movl $0xd1b71759, %esi       # imm = 0xD1B71759
movl (%rdx), %edi
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
movl $0x1, %r14d
cmpl $0xa, %ebx
jb 0x7946
movl $0x4, %r14d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x793d
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x7943
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x7946
movl %eax, %ecx
imulq %rsi, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x790d
addl $-0x3, %r14d
jmp 0x7946
addl $-0x2, %r14d
jmp 0x7946
decl %r14d
movq %r15, %r13
movq %rdx, 0x10(%rsp)
movq %r12, %r15
movq %rdi, 0x8(%rsp)
movl %edi, %r12d
shrl $0x1f, %r12d
leal (%r14,%r12), %esi
leaq 0x3a8(%rsp), %rax
movq %rax, 0x398(%rsp)
movq %rbp, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x398(%rsp), %r12
movq %r12, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x8fc5
movl $0x8, %r8d
movq %rbp, %r14
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x989e(%rip), %rcx      # 0x11248
callq 0x32c0
leaq 0xd0(%rsp), %rbx
movq %rbx, 0xc0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r15, %r12
movq 0xf5e2(%rip), %rbp      # 0x16fb8
je 0x79ed
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x79f3
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r13, %r15
movq 0x8(%rax), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x997c(%rip), %rsi      # 0x11397
callq 0x34e0
leaq 0x250(%rsp), %r13
movq %r12, 0x1f0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7a54
movq %rdx, 0x1f0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x200(%rsp)
jmp 0x7a5c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x1f8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x4864
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x7aa4
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7ac1
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x398(%rsp), %rdi
leaq 0x3a8(%rsp), %rax
cmpq %rax, %rdi
je 0x7ae6
movq 0x3a8(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3b, %edx
movq %rbp, %rdi
leaq 0x975c(%rip), %rsi      # 0x11251
callq 0x32d0
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9f8d(%rip), %rsi      # 0x11aa6
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl $0x13, %edx
movq %rbp, %rdi
leaq 0x9739(%rip), %rsi      # 0x1128d
callq 0x32d0
movq %r13, %rdi
callq 0x4dc2
movq %rbp, %rdi
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x9724(%rip), %rsi      # 0x112a1
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl 0x64(%rsp), %edx
movl 0x68(%rsp), %ecx
movq %r15, %rdi
movq %r13, %rsi
callq 0xd340
movq %r15, %rdi
callq 0xd36e
leaq 0xf0bd(%rip), %rax      # 0x16c88
movq %rax, 0xc0(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x522c
leaq 0x140(%rsp), %rdi
callq 0x51bc
leaq 0x108(%rsp), %rdi
callq 0x529c
leaq 0xd0(%rsp), %rdi
callq 0x530c
leaq 0x2f8(%rsp), %rdi
callq 0x522c
leaq 0x2c0(%rsp), %rdi
callq 0x51bc
leaq 0x288(%rsp), %rdi
callq 0x529c
movq %r13, %rdi
callq 0x530c
movq 0x10(%rsp), %rdx
addq $0x4, %rdx
cmpq 0x20(%rsp), %rdx
movq %r14, %rbp
movl $0xd1b71759, %esi       # imm = 0xD1B71759
jne 0x78f1
movaps 0x9547(%rip), %xmm0     # 0x111a0
leaq 0xc0(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x38(%rsp), %rdi
leaq 0x250(%rsp), %rcx
movl $0x4, %edx
callq 0x8ef2
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq %rax, %rdx
je 0x8011
leaq 0x1e0(%rsp), %r12
leaq 0x398(%rsp), %rbp
leaq 0xc0(%rsp), %r15
movl $0xd1b71759, %esi       # imm = 0xD1B71759
movl (%rdx), %edi
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
movl $0x1, %r14d
cmpl $0xa, %ebx
jb 0x7d05
movl $0x4, %r14d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x7cfc
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x7d02
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x7d05
movl %eax, %ecx
imulq %rsi, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x7ccc
addl $-0x3, %r14d
jmp 0x7d05
addl $-0x2, %r14d
jmp 0x7d05
decl %r14d
movq %r15, %r13
movq %rdx, 0x10(%rsp)
movq %r12, %r15
movq %rdi, 0x8(%rsp)
movl %edi, %r12d
shrl $0x1f, %r12d
leal (%r14,%r12), %esi
leaq 0x3a8(%rsp), %rax
movq %rax, 0x398(%rsp)
movq %rbp, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x398(%rsp), %r12
movq %r12, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x8fc5
movl $0x8, %r8d
movq %rbp, %r14
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x9540(%rip), %rcx      # 0x112a9
callq 0x32c0
leaq 0xd0(%rsp), %rbx
movq %rbx, 0xc0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r15, %r12
movq 0xf223(%rip), %rbp      # 0x16fb8
je 0x7dac
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x7db2
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r13, %r15
movq 0x8(%rax), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x94d8(%rip), %rsi      # 0x112b2
callq 0x34e0
leaq 0x250(%rsp), %r13
movq %r12, 0x1d0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7e13
movq %rdx, 0x1d0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1e0(%rsp)
jmp 0x7e1b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x1d8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x4864
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x7e63
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7e80
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x398(%rsp), %rdi
leaq 0x3a8(%rsp), %rax
cmpq %rax, %rdi
je 0x7ea5
movq 0x3a8(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3e, %edx
movq %rbp, %rdi
leaq 0x9409(%rip), %rsi      # 0x112bd
callq 0x32d0
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9bce(%rip), %rsi      # 0x11aa6
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl $0x13, %edx
movq %rbp, %rdi
leaq 0x937a(%rip), %rsi      # 0x1128d
callq 0x32d0
movq %r13, %rdi
callq 0x4dc2
movq %rbp, %rdi
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x9365(%rip), %rsi      # 0x112a1
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl 0x64(%rsp), %edx
movl 0x68(%rsp), %ecx
movq %r15, %rdi
movq %r13, %rsi
callq 0xd340
movq %r15, %rdi
callq 0xd36e
leaq 0xecfe(%rip), %rax      # 0x16c88
movq %rax, 0xc0(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x522c
leaq 0x140(%rsp), %rdi
callq 0x51bc
leaq 0x108(%rsp), %rdi
callq 0x529c
leaq 0xd0(%rsp), %rdi
callq 0x530c
leaq 0x2f8(%rsp), %rdi
callq 0x522c
leaq 0x2c0(%rsp), %rdi
callq 0x51bc
leaq 0x288(%rsp), %rdi
callq 0x529c
movq %r13, %rdi
callq 0x530c
movq 0x10(%rsp), %rdx
addq $0x4, %rdx
cmpq 0x20(%rsp), %rdx
movq %r14, %rbp
movl $0xd1b71759, %esi       # imm = 0xD1B71759
jne 0x7cb0
callq 0x31f0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
movl 0x1c(%rsp), %ebx
movl 0x34(%rsp), %ebp
je 0x8035
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x4a0(%rsp), %rdi
testq %rdi, %rdi
je 0x8052
movq 0x4b0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
testb $0x1, %bpl
je 0x8406
movaps 0x913d(%rip), %xmm0     # 0x111a0
leaq 0xc0(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x398(%rsp), %rdi
leaq 0x250(%rsp), %rcx
movl $0x4, %edx
callq 0x8ef2
movl %ebx, 0x1c(%rsp)
movups 0x9151(%rip), %xmm0     # 0x111e4
leaq 0xc0(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $0x800000007, %rax      # imm = 0x800000007
movq %rax, 0x10(%rsi)
leaq 0x4a0(%rsp), %rdi
leaq 0x250(%rsp), %rcx
movl $0x6, %edx
callq 0x8ef2
movq 0x398(%rsp), %rax
movq 0x3a0(%rsp), %rcx
movq %rax, 0x28(%rsp)
movq %rcx, 0x50(%rsp)
cmpq %rcx, %rax
je 0x83c8
movq 0xeec8(%rip), %r14      # 0x16fb8
movq 0x4a0(%rsp), %rbp
movq 0x4a8(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %rbp
je 0x83af
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %ecx, 0x8(%rsp)
movq %rax, 0x20(%rsp)
shrl $0x1f, %eax
movq %rax, 0x58(%rsp)
movl (%rbp), %r13d
movl $0x37, %edx
movq %r14, %rdi
leaq 0x91bc(%rip), %rsi      # 0x112fc
callq 0x32d0
movq %r14, %rdi
movq 0x20(%rsp), %rsi
callq 0x3490
movl $0xa, %edx
movq %r14, %rdi
leaq 0x91d3(%rip), %rsi      # 0x11334
callq 0x32d0
movq %r14, %rdi
movl %r13d, %esi
callq 0x3490
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x91bc(%rip), %rsi      # 0x1133f
callq 0x32d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl $0x1, %r12d
cmpl $0xa, 0x8(%rsp)
movq 0x58(%rsp), %r15
jb 0x820a
movl $0x4, %r12d
movl 0x8(%rsp), %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x8201
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x8207
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x820a
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x81d1
addl $-0x3, %r12d
jmp 0x820a
addl $-0x2, %r12d
jmp 0x820a
decl %r12d
leal (%r12,%r15), %esi
leaq 0x260(%rsp), %rax
movq %rax, 0x250(%rsp)
leaq 0x250(%rsp), %rbx
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x32f0
movq 0x250(%rsp), %rdi
addq %r15, %rdi
movl %r12d, %esi
movl 0x8(%rsp), %edx
callq 0x8fc5
movl $0xd, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x90eb(%rip), %rcx      # 0x11349
callq 0x32c0
leaq 0xd0(%rsp), %rsi
movq %rsi, 0xc0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8297
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x829d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc0(%rsp), %rdi
leaq 0x919e(%rip), %rsi      # 0x11465
callq 0x34e0
leaq 0xb0(%rsp), %rsi
movq %rsi, 0xa0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8300
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x8306
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xa8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdi
movl %r13d, %esi
callq 0xf665
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x8356
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x837b
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x250(%rsp), %rdi
leaq 0x260(%rsp), %rax
cmpq %rax, %rdi
je 0x83a0
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x4, %rbp
cmpq 0x10(%rsp), %rbp
jne 0x812d
movq 0x28(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x28(%rsp)
cmpq 0x50(%rsp), %rax
jne 0x80f0
movq 0x4a0(%rsp), %rdi
testq %rdi, %rdi
je 0x83e5
movq 0x4b0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x398(%rsp), %rdi
testq %rdi, %rdi
movl 0x1c(%rsp), %ebx
je 0x8406
movq 0x3a8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
testb $0x1, %bl
je 0x8985
movq 0xeba2(%rip), %rbx      # 0x16fb8
leaq 0x8f3a(%rip), %rsi      # 0x11357
movl $0x33, %edx
movq %rbx, %rdi
callq 0x32d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movups 0x8dc8(%rip), %xmm0     # 0x11220
leaq 0xc0(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movups 0x8da5(%rip), %xmm0     # 0x11210
movaps %xmm0, 0x10(%rsi)
movups 0x8d8a(%rip), %xmm0     # 0x11200
movaps %xmm0, (%rsi)
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, 0x30(%rsi)
leaq 0x38(%rsp), %rdi
leaq 0x250(%rsp), %rcx
movl $0x7, %edx
callq 0x8f80
movq 0x38(%rsp), %r14
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r14
je 0x8831
leaq 0x368(%rsp), %rbp
leaq 0x358(%rsp), %r15
leaq 0x4a0(%rsp), %r13
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, 0x358(%rsp)
movq %r15, %rdi
leaq 0x8ea0(%rip), %rsi      # 0x1138b
leaq 0x8eac(%rip), %rdx      # 0x1139e
callq 0x557a
leaq 0x250(%rsp), %rdi
movq %r15, %rsi
callq 0x4864
movq 0x358(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8524
movq 0x368(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
leaq 0x250(%rsp), %rsi
callq 0xce20
leaq 0x398(%rsp), %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0xacde
leaq 0x4d0(%rsp), %rax
movq %rax, 0x4a0(%rsp)
movq $0x1, 0x4a8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, 0x4c0(%rsp) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq 0x3a8(%rsp), %r12
testq %r12, %r12
je 0x863f
movq 0x10(%r12), %rcx
movq 0x4a0(%rsp), %rdi
movq 0x4a8(%rsp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x861c
movq %rdx, %rsi
movq (%rax), %r9
movq 0x8(%r9), %r10
movq %r9, %r11
cmpq %r10, %rcx
je 0x8616
movq (%r11), %r11
testq %r11, %r11
je 0x861c
movq 0x8(%r11), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
cmpq %rsi, %rdx
jne 0x861c
cmpq %rdi, %rcx
jne 0x85cd
cmpq %r10, %rcx
je 0x8616
movq (%r9), %r9
testq %r9, %r9
je 0x8999
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
cmpq %rsi, %rdx
jne 0x8999
cmpq %rdi, %rcx
jne 0x85f0
incl 0x10(%r9)
jmp 0x8636
movq %rcx, 0x68(%rsp)
movl $0x1, 0x70(%rsp)
movq %r13, %rdi
leaq 0x68(%rsp), %rsi
callq 0x9246
movq (%r12), %r12
jmp 0x858c
movl $0x16, %edx
movq %rbx, %rdi
leaq 0x8d51(%rip), %rsi      # 0x1139f
callq 0x32d0
movq 0x4b8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3190
movq %rax, %r12
movl $0x18, %edx
movq %rax, %rdi
leaq 0x8d41(%rip), %rsi      # 0x113b6
callq 0x32d0
movq %r12, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x3420
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %rbp, %r15
movl $0x2e, %edx
movq %rbx, %rdi
leaq 0x8d0b(%rip), %rsi      # 0x113cf
callq 0x32d0
movq 0x4b0(%rsp), %rbp
xorl %r12d, %r12d
testq %rbp, %rbp
je 0x8706
movl 0x10(%rbp), %esi
cmpl $0x2, %esi
jl 0x8700
movq %rbx, %rdi
callq 0x3490
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8cbc(%rip), %rsi      # 0x113b4
callq 0x32d0
incl %r12d
movq (%rbp), %rbp
jmp 0x86d4
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movl $0xa, %edx
movq %rbx, %rdi
leaq 0x8cc2(%rip), %rsi      # 0x113fe
callq 0x32d0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x3490
movq %rax, %r12
movl $0x1a, %edx
movq %rax, %rdi
leaq 0x8cab(%rip), %rsi      # 0x11409
callq 0x32d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %r13, %rdi
callq 0x9032
leaq 0x398(%rsp), %rdi
callq 0x90a2
leaq 0xe4e1(%rip), %rax      # 0x16c88
movq %rax, 0xc0(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x522c
leaq 0x140(%rsp), %rdi
callq 0x51bc
leaq 0x108(%rsp), %rdi
callq 0x529c
leaq 0xd0(%rsp), %rdi
callq 0x530c
leaq 0x2f8(%rsp), %rdi
callq 0x522c
leaq 0x2c0(%rsp), %rdi
callq 0x51bc
leaq 0x288(%rsp), %rdi
callq 0x529c
leaq 0x250(%rsp), %rdi
callq 0x530c
addq $0x8, %r14
cmpq 0x10(%rsp), %r14
movq %r15, %rbp
leaq 0x358(%rsp), %r15
jne 0x84ce
movq 0xe780(%rip), %rbx      # 0x16fb8
leaq 0x8be5(%rip), %rsi      # 0x11424
movl $0x2f, %edx
movq %rbx, %rdi
callq 0x32d0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq 0xe74e(%rip), %rdi      # 0x16fb8
callq 0x3040
movq %rax, %rdi
callq 0x31a0
leaq 0xc0(%rsp), %rsi
movups 0x899a(%rip), %xmm0     # 0x11220
movaps %xmm0, 0x20(%rsi)
movups 0x897f(%rip), %xmm0     # 0x11210
movaps %xmm0, 0x10(%rsi)
movups 0x8964(%rip), %xmm0     # 0x11200
movaps %xmm0, (%rsi)
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, 0x30(%rsi)
leaq 0x250(%rsp), %rdi
leaq 0x398(%rsp), %rcx
movl $0x7, %edx
callq 0x8f80
movq 0x250(%rsp), %rbx
movq 0x258(%rsp), %rbp
cmpq %rbp, %rbx
je 0x8956
leaq 0x388(%rsp), %r13
leaq 0x8b69(%rip), %r14      # 0x11454
leaq 0x8b88(%rip), %r15      # 0x1147a
leaq 0x378(%rsp), %r12
movsd (%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r13, 0x378(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x557a
movq %r12, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xff69
movq 0x378(%rsp), %rdi
cmpq %r13, %rdi
je 0x8945
movq 0x388(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x8, %rbx
cmpq %rbp, %rbx
jne 0x88fa
movq 0x250(%rsp), %rbx
testq %rbx, %rbx
je 0x896e
movq 0x260(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x3290
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8985
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
xorl %eax, %eax
addq $0x588, %rsp            # imm = 0x588
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x87ea(%rip), %rdi      # 0x1118a
callq 0x33e0
leaq 0x8b00(%rip), %rdi      # 0x114ac
callq 0x3410
movl $0x1, %edi
callq 0x3320
callq 0x3553
jmp 0x8cb9
jmp 0x89f1
jmp 0x8a91
jmp 0x8b30
movq %rax, %rbx
jmp 0x8ecc
jmp 0x89f1
jmp 0x8b30
jmp 0x8b30
jmp 0x8b30
jmp 0x89f1
jmp 0x8cb9
movq %rax, %rbx
jmp 0x8ee9
jmp 0x8cb9
jmp 0x8cb9
movq %rax, %rbx
movq 0x358(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8e9b
movq 0x368(%rsp), %rsi
jmp 0x8d31
movq %rax, %rbx
jmp 0x8e8e
movq %rax, %rbx
jmp 0x8e81
movq %rax, %rbx
jmp 0x8a59
movq %rax, %rbx
movq 0x378(%rsp), %rdi
cmpq %r13, %rdi
je 0x8a59
movq 0x388(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x250(%rsp), %rdi
testq %rdi, %rdi
je 0x8e9b
movq 0x260(%rsp), %rsi
jmp 0x8dc2
jmp 0x8d48
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x8f38
jmp 0x8d4b
movq %rax, %rbx
jmp 0x8d58
movq %rax, %rbx
jmp 0x8ae8
movq %rax, %rbx
jmp 0x8ac3
movq %rax, %rbx
movq 0x1d0(%rsp), %rdi
cmpq %r12, %rdi
je 0x8ac3
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x8ae8
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x398(%rsp), %rdi
leaq 0x3a8(%rsp), %rax
cmpq %rax, %rdi
je 0x8d58
movq 0x3a8(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8d58
jmp 0x8d71
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x8f38
jmp 0x8d74
movq %rax, %rbx
jmp 0x8d81
movq %rax, %rbx
jmp 0x8b87
movq %rax, %rbx
jmp 0x8b62
movq %rax, %rbx
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x8b62
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x8b87
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x398(%rsp), %rdi
leaq 0x3a8(%rsp), %rax
cmpq %rax, %rdi
je 0x8d81
movq 0x3a8(%rsp), %rsi
incq %rsi
jmp 0x8d6a
jmp 0x8d9f
jmp 0x8bb7
movq %rax, %rbx
jmp 0x8be0
jmp 0x8bbe
movq %rax, %rbx
jmp 0x8bd3
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
callq 0x8f38
leaq 0x250(%rsp), %rdi
callq 0x8f38
leaq 0xc0(%rsp), %rdi
callq 0x8f38
jmp 0x8da2
movq %rax, %rbx
jmp 0x8daf
movq %rax, %rbx
jmp 0x8c49
movq %rax, %rbx
jmp 0x8c24
movq %rax, %rbx
movq 0x210(%rsp), %rdi
cmpq %r14, %rdi
je 0x8c24
movq 0x220(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x8c49
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x250(%rsp), %rdi
leaq 0x260(%rsp), %rax
cmpq %rax, %rdi
je 0x8daf
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8daf
jmp 0x8dcf
jmp 0x8c7e
movq %rax, %rbx
jmp 0x8ca7
jmp 0x8c85
movq %rax, %rbx
jmp 0x8c9a
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
callq 0x8f38
leaq 0x250(%rsp), %rdi
callq 0x8f38
leaq 0xc0(%rsp), %rdi
callq 0x8f38
jmp 0x8dd2
movq %rax, %rbx
jmp 0x8e9b
movq %rax, %rbx
jmp 0x8d10
movq %rax, %rbx
jmp 0x8ceb
movq %rax, %rbx
movq 0x230(%rsp), %rdi
cmpq %r13, %rdi
je 0x8ceb
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x8d10
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x250(%rsp), %rdi
leaq 0x260(%rsp), %rax
cmpq %rax, %rdi
je 0x8e9b
movq 0x260(%rsp), %rsi
incq %rsi
jmp 0x8dc5
jmp 0x8e64
jmp 0x8e64
jmp 0x8e64
movq %rax, %rbx
leaq 0x250(%rsp), %rdi
callq 0x4f8a
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8d81
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
jmp 0x8d81
movq %rax, %rbx
leaq 0x250(%rsp), %rdi
callq 0x4f8a
movq 0x4a0(%rsp), %rdi
testq %rdi, %rdi
je 0x8ee9
movq 0x4b0(%rsp), %rsi
jmp 0x8ee1
movq %rax, %rbx
leaq 0x4a0(%rsp), %rdi
callq 0x4f8a
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x8e9b
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
jmp 0x8e9b
movq %rax, %rbx
leaq 0x4a0(%rsp), %rdi
jmp 0x8e96
jmp 0x8eac
movq %rax, %rbx
jmp 0x8e16
movq %rax, %rbx
jmp 0x8e3b
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x8e16
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x8e3b
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x250(%rsp), %rdi
leaq 0x260(%rsp), %rax
cmpq %rax, %rdi
je 0x8eaf
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8eaf
jmp 0x8e64
movq %rax, %rbx
leaq 0x4a0(%rsp), %rdi
callq 0x9032
leaq 0x398(%rsp), %rdi
callq 0x90a2
leaq 0xc0(%rsp), %rdi
callq 0x8f38
leaq 0x250(%rsp), %rdi
callq 0x4f8a
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8ee9
movq 0x48(%rsp), %rsi
jmp 0x8ee1
movq %rax, %rbx
movq 0x4a0(%rsp), %rdi
testq %rdi, %rdi
je 0x8ecc
movq 0x4b0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x398(%rsp), %rdi
testq %rdi, %rdi
je 0x8ee9
movq 0x3a8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x34a0
nop