// File: /workspace/github_cpp_makefile_star2_O1/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 $0x598, %rsp            # imm = 0x598
cmpl $0x2, %edi
jl 0x8acb
movl $0x1, %eax
xorl %ecx, %ecx
leaq 0xa20d(%rip), %rdx      # 0x11180
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r14d, %r14d
movq (%rsi,%rax,8), %r8
cmpb $0x2d, (%r8)
jne 0x8acb
movsbl 0x1(%r8), %r8d
addl $-0x61, %r8d
rorl %r8d
cmpl $0x6, %r8d
ja 0x8ae1
movslq (%rdx,%r8,4), %r8
addq %rdx, %r8
jmpq *%r8
movb $0x1, %cl
jmp 0x6fb8
movb $0x1, %bl
jmp 0x6fb8
movb $0x1, %r14b
jmp 0x6fb8
movb $0x1, %bpl
addq $0x2, %rax
cmpl %edi, %eax
jl 0x6f7a
testb $0x1, %cl
je 0x795e
movl %r14d, 0x9c(%rsp)
movl %ebp, 0x34(%rsp)
movl %ebx, 0x24(%rsp)
movups 0xa1bc(%rip), %xmm0     # 0x1119c
leaq 0xd0(%rsp), %r12
movaps %xmm0, (%r12)
movabsq $0x3e8000001f4, %rax    # imm = 0x3E8000001F4
movq %rax, 0x10(%r12)
leaq 0x38(%rsp), %rdi
leaq 0x260(%rsp), %r15
movl $0x6, %edx
movq %r12, %rsi
movq %r15, %rcx
callq 0x9018
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x18(%rsp)
cmpq %rcx, %rax
je 0x7484
leaq 0x250(%rsp), %rbp
movl $0xb8, %ecx
leaq 0x3a8(%rsp), %rdi
leaq (%rdi,%rcx), %rdx
movq %rdx, 0x28(%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, 0x58(%rsp)
addq %r12, %rdx
movq %rdx, 0x50(%rsp)
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 0x70e6
movl $0x4, %ebx
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x70df
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x70e4
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x70e6
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x70b1
addl $-0x3, %ebx
jmp 0x70e6
addl $-0x2, %ebx
jmp 0x70e6
decl %ebx
movq %rbp, %r14
movq %r12, %rbp
movq %rsi, 0x8(%rsp)
movl %esi, %r12d
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq 0x270(%rsp), %rax
movq %rax, 0x260(%rsp)
movq %r15, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x260(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x90eb
movl $0x8, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xa0d6(%rip), %rcx      # 0x11218
callq 0x32c0
leaq 0xe0(%rsp), %rbx
movq %rbx, 0xd0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbp, %r12
leaq 0x4b0(%rsp), %r13
je 0x7186
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x718c
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
leaq 0xa1b3(%rip), %rsi      # 0x11367
callq 0x34e0
leaq 0x3a8(%rsp), %r14
movq %rbp, 0x240(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x71ed
movq %rdx, 0x240(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x250(%rsp)
jmp 0x71f4
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x248(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x240(%rsp), %rsi
callq 0x4884
movq 0x240(%rsp), %rdi
cmpq %rbp, %rdi
je 0x723c
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7259
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x727e
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3b, %edx
movq 0xfd2e(%rip), %rdi      # 0x16fb8
leaq 0x9f90(%rip), %rsi      # 0x11221
callq 0x32d0
movq 0xfd1b(%rip), %rdi      # 0x16fb8
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0xa76d(%rip), %rsi      # 0x11a26
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 0xfcc7(%rip), %rdi      # 0x16fb8
leaq 0x9f65(%rip), %rsi      # 0x1125d
callq 0x32d0
movq %r13, %rdi
callq 0x4dfc
movq 0xfcac(%rip), %rdi      # 0x16fb8
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x9f4c(%rip), %rsi      # 0x11271
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 %r13, %rsi
callq 0xb37c
movq %r12, %rdi
callq 0xb392
movq %r15, %rdi
movq %r13, %rsi
callq 0xc60c
movq %r15, %rdi
callq 0xc622
movq %r14, %rdi
movq %r13, %rsi
callq 0xcb58
movq %r14, %rdi
callq 0xcb6e
leaq 0xf8f7(%rip), %rbx      # 0x16c88
movq %rbx, 0x3a8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x5246
movq 0x90(%rsp), %rdi
callq 0x51d6
leaq 0x3f0(%rsp), %rdi
callq 0x52b6
leaq 0x3b8(%rsp), %rdi
callq 0x5326
movq %rbx, 0x260(%rsp)
movq 0x88(%rsp), %rdi
callq 0x5246
movq 0x80(%rsp), %rdi
callq 0x51d6
leaq 0x2a8(%rsp), %rdi
callq 0x52b6
leaq 0x270(%rsp), %rdi
callq 0x5326
movq %rbx, 0xd0(%rsp)
movq 0x58(%rsp), %rdi
callq 0x5246
movq 0x50(%rsp), %rdi
callq 0x51d6
leaq 0x118(%rsp), %rdi
callq 0x52b6
leaq 0xe0(%rsp), %rdi
callq 0x5326
leaq 0x558(%rsp), %rdi
callq 0x5246
leaq 0x520(%rsp), %rdi
callq 0x51d6
leaq 0x4e8(%rsp), %rdi
callq 0x52b6
movq %r13, %rdi
callq 0x5326
movq 0x10(%rsp), %rax
addq $0x4, %rax
cmpq 0x18(%rsp), %rax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
jne 0x708d
movaps 0x9ce5(%rip), %xmm0     # 0x11170
leaq 0xd0(%rsp), %r12
movups %xmm0, (%r12)
leaq 0x60(%rsp), %rdi
leaq 0x260(%rsp), %r15
movl $0x4, %edx
movq %r12, %rsi
movq %r15, %rcx
callq 0x9018
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rcx, 0x18(%rsp)
cmpq %rcx, %rax
je 0x7920
leaq 0x230(%rsp), %rbp
movl $0xb8, %ecx
leaq 0x3a8(%rsp), %rdi
leaq (%rdi,%rcx), %rdx
movq %rdx, 0x28(%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, 0x58(%rsp)
addq %r12, %rdx
movq %rdx, 0x50(%rsp)
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 0x7582
movl $0x4, %ebx
movl %r13d, %eax
cmpl $0x63, %eax
jbe 0x757b
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x7580
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x7582
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x754d
addl $-0x3, %ebx
jmp 0x7582
addl $-0x2, %ebx
jmp 0x7582
decl %ebx
movq %rbp, %r14
movq %r12, %rbp
movq %rsi, 0x8(%rsp)
movl %esi, %r12d
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq 0x270(%rsp), %rax
movq %rax, 0x260(%rsp)
movq %r15, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x260(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x90eb
movl $0x8, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x9c9b(%rip), %rcx      # 0x11279
callq 0x32c0
leaq 0xe0(%rsp), %rbx
movq %rbx, 0xd0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbp, %r12
leaq 0x4b0(%rsp), %r13
je 0x7622
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x7628
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
leaq 0x9c32(%rip), %rsi      # 0x11282
callq 0x34e0
leaq 0x3a8(%rsp), %r14
movq %rbp, 0x220(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7689
movq %rdx, 0x220(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x230(%rsp)
jmp 0x7690
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x228(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x220(%rsp), %rsi
callq 0x4884
movq 0x220(%rsp), %rdi
cmpq %rbp, %rdi
je 0x76d8
movq 0x230(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x76f5
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x771a
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3e, %edx
movq 0xf892(%rip), %rdi      # 0x16fb8
leaq 0x9b60(%rip), %rsi      # 0x1128d
callq 0x32d0
movq 0xf87f(%rip), %rdi      # 0x16fb8
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0xa2d1(%rip), %rsi      # 0x11a26
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 0xf82b(%rip), %rdi      # 0x16fb8
leaq 0x9ac9(%rip), %rsi      # 0x1125d
callq 0x32d0
movq %r13, %rdi
callq 0x4dfc
movq 0xf810(%rip), %rdi      # 0x16fb8
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x9ab0(%rip), %rsi      # 0x11271
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 %r13, %rsi
callq 0xb37c
movq %r12, %rdi
callq 0xb392
movq %r15, %rdi
movq %r13, %rsi
callq 0xc60c
movq %r15, %rdi
callq 0xc622
movq %r14, %rdi
movq %r13, %rsi
callq 0xcb58
movq %r14, %rdi
callq 0xcb6e
leaq 0xf45b(%rip), %rbx      # 0x16c88
movq %rbx, 0x3a8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x5246
movq 0x90(%rsp), %rdi
callq 0x51d6
leaq 0x3f0(%rsp), %rdi
callq 0x52b6
leaq 0x3b8(%rsp), %rdi
callq 0x5326
movq %rbx, 0x260(%rsp)
movq 0x88(%rsp), %rdi
callq 0x5246
movq 0x80(%rsp), %rdi
callq 0x51d6
leaq 0x2a8(%rsp), %rdi
callq 0x52b6
leaq 0x270(%rsp), %rdi
callq 0x5326
movq %rbx, 0xd0(%rsp)
movq 0x58(%rsp), %rdi
callq 0x5246
movq 0x50(%rsp), %rdi
callq 0x51d6
leaq 0x118(%rsp), %rdi
callq 0x52b6
leaq 0xe0(%rsp), %rdi
callq 0x5326
leaq 0x558(%rsp), %rdi
callq 0x5246
leaq 0x520(%rsp), %rdi
callq 0x51d6
leaq 0x4e8(%rsp), %rdi
callq 0x52b6
movq %r13, %rdi
callq 0x5326
movq 0x10(%rsp), %rax
addq $0x4, %rax
cmpq 0x18(%rsp), %rax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
jne 0x7529
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7937
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
movl 0x24(%rsp), %ebx
movl 0x34(%rsp), %ebp
movl 0x9c(%rsp), %r14d
je 0x795e
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
testb $0x1, %r14b
movl %ebx, 0x24(%rsp)
je 0x817a
movups 0x9829(%rip), %xmm0     # 0x1119c
leaq 0xd0(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $0x3e8000001f4, %rax    # imm = 0x3E8000001F4
movq %rax, 0x10(%rsi)
leaq 0x4b0(%rsp), %rdi
leaq 0x260(%rsp), %rcx
movl $0x6, %edx
callq 0x9018
xorl %edi, %edi
xorl %esi, %esi
callq 0x33c0
movq 0xf5e2(%rip), %rdi      # 0x16f98
leaq 0x60(%rsp), %rsi
callq 0x3300
movl %ebp, 0x34(%rsp)
movq 0xf5cd(%rip), %rdi      # 0x16f98
leaq 0xa0(%rsp), %rsi
callq 0x33b0
movq 0x4b0(%rsp), %rdx
movq 0x4b8(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq %rax, %rdx
je 0x7d77
leaq 0x210(%rsp), %r12
leaq 0x3a8(%rsp), %rbp
leaq 0xd0(%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 0x7a68
movl $0x4, %r14d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x7a5f
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x7a65
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x7a68
movl %eax, %ecx
imulq %rsi, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x7a2f
addl $-0x3, %r14d
jmp 0x7a68
addl $-0x2, %r14d
jmp 0x7a68
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 0x3b8(%rsp), %rax
movq %rax, 0x3a8(%rsp)
movq %rbp, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x3a8(%rsp), %r12
movq %r12, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x90eb
movl $0x8, %r8d
movq %rbp, %r14
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x974c(%rip), %rcx      # 0x11218
callq 0x32c0
leaq 0xe0(%rsp), %rbx
movq %rbx, 0xd0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r15, %r12
movq 0xf4c0(%rip), %rbp      # 0x16fb8
je 0x7b0f
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x7b15
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r13, %r15
movq 0x8(%rax), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x982a(%rip), %rsi      # 0x11367
callq 0x34e0
leaq 0x260(%rsp), %r13
movq %r12, 0x200(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7b76
movq %rdx, 0x200(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x210(%rsp)
jmp 0x7b7e
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x208(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x200(%rsp), %rsi
callq 0x4884
movq 0x200(%rsp), %rdi
cmpq %r12, %rdi
je 0x7bc6
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7be3
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x3a8(%rsp), %rdi
leaq 0x3b8(%rsp), %rax
cmpq %rax, %rdi
je 0x7c08
movq 0x3b8(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3b, %edx
movq %rbp, %rdi
leaq 0x960a(%rip), %rsi      # 0x11221
callq 0x32d0
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9deb(%rip), %rsi      # 0x11a26
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 0x95e7(%rip), %rsi      # 0x1125d
callq 0x32d0
movq %r13, %rdi
callq 0x4dfc
movq %rbp, %rdi
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x95d2(%rip), %rsi      # 0x11271
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 0xa0(%rsp), %edx
movl 0x60(%rsp), %ecx
movq %r15, %rdi
movq %r13, %rsi
callq 0xd078
movq %r15, %rdi
callq 0xd0a6
leaq 0xef98(%rip), %rax      # 0x16c88
movq %rax, 0xd0(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x5246
leaq 0x150(%rsp), %rdi
callq 0x51d6
leaq 0x118(%rsp), %rdi
callq 0x52b6
leaq 0xe0(%rsp), %rdi
callq 0x5326
leaq 0x308(%rsp), %rdi
callq 0x5246
leaq 0x2d0(%rsp), %rdi
callq 0x51d6
leaq 0x298(%rsp), %rdi
callq 0x52b6
movq %r13, %rdi
callq 0x5326
movq 0x10(%rsp), %rdx
addq $0x4, %rdx
cmpq 0x18(%rsp), %rdx
movq %r14, %rbp
movl $0xd1b71759, %esi       # imm = 0xD1B71759
jne 0x7a13
movaps 0x93f2(%rip), %xmm0     # 0x11170
leaq 0xd0(%rsp), %rsi
movups %xmm0, (%rsi)
leaq 0x38(%rsp), %rdi
leaq 0x260(%rsp), %rcx
movl $0x4, %edx
callq 0x9018
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq %rax, %rdx
je 0x8139
leaq 0x1f0(%rsp), %r12
leaq 0x3a8(%rsp), %rbp
leaq 0xd0(%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 0x7e2a
movl $0x4, %r14d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x7e21
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x7e27
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x7e2a
movl %eax, %ecx
imulq %rsi, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x7df1
addl $-0x3, %r14d
jmp 0x7e2a
addl $-0x2, %r14d
jmp 0x7e2a
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 0x3b8(%rsp), %rax
movq %rax, 0x3a8(%rsp)
movq %rbp, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x3a8(%rsp), %r12
movq %r12, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x90eb
movl $0x8, %r8d
movq %rbp, %r14
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x93eb(%rip), %rcx      # 0x11279
callq 0x32c0
leaq 0xe0(%rsp), %rbx
movq %rbx, 0xd0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %r15, %r12
movq 0xf0fe(%rip), %rbp      # 0x16fb8
je 0x7ed1
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x7ed7
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %r13, %r15
movq 0x8(%rax), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x9383(%rip), %rsi      # 0x11282
callq 0x34e0
leaq 0x260(%rsp), %r13
movq %r12, 0x1e0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7f38
movq %rdx, 0x1e0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1f0(%rsp)
jmp 0x7f40
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x1e8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x4884
movq 0x1e0(%rsp), %rdi
cmpq %r12, %rdi
je 0x7f88
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x7fa5
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x3a8(%rsp), %rdi
leaq 0x3b8(%rsp), %rax
cmpq %rax, %rdi
je 0x7fca
movq 0x3b8(%rsp), %rsi
incq %rsi
callq 0x3290
movl $0x3e, %edx
movq %rbp, %rdi
leaq 0x92b4(%rip), %rsi      # 0x1128d
callq 0x32d0
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x3490
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x9a29(%rip), %rsi      # 0x11a26
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 0x9225(%rip), %rsi      # 0x1125d
callq 0x32d0
movq %r13, %rdi
callq 0x4dfc
movq %rbp, %rdi
movl %eax, %esi
callq 0x3490
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x9210(%rip), %rsi      # 0x11271
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 0xa0(%rsp), %edx
movl 0x60(%rsp), %ecx
movq %r15, %rdi
movq %r13, %rsi
callq 0xd078
movq %r15, %rdi
callq 0xd0a6
leaq 0xebd6(%rip), %rax      # 0x16c88
movq %rax, 0xd0(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x5246
leaq 0x150(%rsp), %rdi
callq 0x51d6
leaq 0x118(%rsp), %rdi
callq 0x52b6
leaq 0xe0(%rsp), %rdi
callq 0x5326
leaq 0x308(%rsp), %rdi
callq 0x5246
leaq 0x2d0(%rsp), %rdi
callq 0x51d6
leaq 0x298(%rsp), %rdi
callq 0x52b6
movq %r13, %rdi
callq 0x5326
movq 0x10(%rsp), %rdx
addq $0x4, %rdx
cmpq 0x18(%rsp), %rdx
movq %r14, %rbp
movl $0xd1b71759, %esi       # imm = 0xD1B71759
jne 0x7dd5
callq 0x31f0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
movl 0x24(%rsp), %ebx
movl 0x34(%rsp), %ebp
je 0x815d
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x4b0(%rsp), %rdi
testq %rdi, %rdi
je 0x817a
movq 0x4c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
testb $0x1, %bpl
je 0x852a
movaps 0x8fe5(%rip), %xmm0     # 0x11170
leaq 0xd0(%rsp), %rsi
movups %xmm0, (%rsi)
leaq 0x3a8(%rsp), %rdi
leaq 0x260(%rsp), %rcx
movl $0x4, %edx
callq 0x9018
movups 0x8ffd(%rip), %xmm0     # 0x111b4
leaq 0xd0(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $0x800000007, %rax      # imm = 0x800000007
movq %rax, 0x10(%rsi)
leaq 0x4b0(%rsp), %rdi
leaq 0x260(%rsp), %rcx
movl $0x6, %edx
callq 0x9018
movq 0x3a8(%rsp), %rax
movq 0x3b0(%rsp), %rcx
movq %rax, 0x28(%rsp)
movq %rcx, 0x50(%rsp)
cmpq %rcx, %rax
je 0x84ec
movq 0xeda4(%rip), %r14      # 0x16fb8
movq 0x4b0(%rsp), %rbp
movq 0x4b8(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %rbp
je 0x84d3
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %ecx, 0x8(%rsp)
movq %rax, 0x18(%rsp)
shrl $0x1f, %eax
movq %rax, 0x58(%rsp)
movl (%rbp), %r13d
movl $0x37, %edx
movq %r14, %rdi
leaq 0x9068(%rip), %rsi      # 0x112cc
callq 0x32d0
movq %r14, %rdi
movq 0x18(%rsp), %rsi
callq 0x3490
movl $0xa, %edx
movq %r14, %rdi
leaq 0x907f(%rip), %rsi      # 0x11304
callq 0x32d0
movq %r14, %rdi
movl %r13d, %esi
callq 0x3490
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x9068(%rip), %rsi      # 0x1130f
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 0x832e
movl $0x4, %r12d
movl 0x8(%rsp), %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x8325
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x832b
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x832e
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x82f5
addl $-0x3, %r12d
jmp 0x832e
addl $-0x2, %r12d
jmp 0x832e
decl %r12d
leal (%r12,%r15), %esi
leaq 0x270(%rsp), %rax
movq %rax, 0x260(%rsp)
leaq 0x260(%rsp), %rbx
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x32f0
movq 0x260(%rsp), %rdi
addq %r15, %rdi
movl %r12d, %esi
movl 0x8(%rsp), %edx
callq 0x90eb
movl $0xd, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x8f97(%rip), %rcx      # 0x11319
callq 0x32c0
leaq 0xe0(%rsp), %rsi
movq %rsi, 0xd0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x83bb
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x83c1
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd0(%rsp), %rdi
leaq 0x904a(%rip), %rsi      # 0x11435
callq 0x34e0
leaq 0xc0(%rsp), %rsi
movq %rsi, 0xb0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8424
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
jmp 0x842a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xb8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb0(%rsp), %rdi
movl %r13d, %esi
callq 0xf1ee
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x847a
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x849f
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x84c4
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x4, %rbp
cmpq 0x10(%rsp), %rbp
jne 0x8251
movq 0x28(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x28(%rsp)
cmpq 0x50(%rsp), %rax
jne 0x8214
movq 0x4b0(%rsp), %rdi
testq %rdi, %rdi
je 0x8509
movq 0x4c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x3a8(%rsp), %rdi
testq %rdi, %rdi
movl 0x24(%rsp), %ebx
je 0x852a
movq 0x3b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
testb $0x1, %bl
je 0x8ab7
movq 0xea7e(%rip), %rbx      # 0x16fb8
leaq 0x8de6(%rip), %rsi      # 0x11327
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 0x8c74(%rip), %xmm0     # 0x111f0
leaq 0xd0(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movups 0x8c51(%rip), %xmm0     # 0x111e0
movaps %xmm0, 0x10(%rsi)
movups 0x8c36(%rip), %xmm0     # 0x111d0
movaps %xmm0, (%rsi)
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, 0x30(%rsi)
leaq 0x38(%rsp), %rdi
leaq 0x260(%rsp), %rcx
movl $0x7, %edx
callq 0x90a6
movq 0x38(%rsp), %r14
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq %rax, %r14
je 0x8964
leaq 0x378(%rsp), %rbp
leaq 0x368(%rsp), %r15
leaq 0x4b0(%rsp), %r12
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, 0x368(%rsp)
movq %r15, %rdi
leaq 0x8d4c(%rip), %rsi      # 0x1135b
leaq 0x8d58(%rip), %rdx      # 0x1136e
callq 0x5598
leaq 0x260(%rsp), %rdi
movq %r15, %rsi
callq 0x4884
movq 0x368(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8648
movq 0x378(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
leaq 0x260(%rsp), %rsi
callq 0xcb58
leaq 0x3a8(%rsp), %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0xab18
leaq 0x4e0(%rsp), %rax
movq %rax, 0x4b0(%rsp)
movq $0x1, 0x4b8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, 0x4d0(%rsp) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq 0x3b8(%rsp), %r13
testq %r13, %r13
je 0x8772
movups 0x8(%r13), %xmm0
movaps %xmm0, 0x60(%rsp)
movq 0x68(%rsp), %rcx
movq 0x4b0(%rsp), %rdi
movq 0x4b8(%rsp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x872a
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %rcx
je 0x872a
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x8728
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x872a
movq %r10, %rax
cmpq %rdi, %rcx
jne 0x86fd
jmp 0x872a
xorl %eax, %eax
testq %rax, %rax
je 0x8746
cmpq $0x0, (%rax)
je 0x8746
movq %r12, %rdi
leaq 0x68(%rsp), %rsi
callq 0x93cc
incl (%rax)
jmp 0x8769
movq %rcx, 0xa0(%rsp)
movl $0x1, 0xa8(%rsp)
movq %r12, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x940e
movq (%r13), %r13
jmp 0x86b0
movl $0x16, %edx
movq %rbx, %rdi
leaq 0x8bee(%rip), %rsi      # 0x1136f
callq 0x32d0
movq 0x4c8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3190
movq %rax, %r13
movl $0x18, %edx
movq %rax, %rdi
leaq 0x8bde(%rip), %rsi      # 0x11386
callq 0x32d0
movq %r13, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x3420
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %rbp, %r15
movl $0x2e, %edx
movq %rbx, %rdi
leaq 0x8ba8(%rip), %rsi      # 0x1139f
callq 0x32d0
movq 0x4c0(%rsp), %rbp
xorl %r13d, %r13d
testq %rbp, %rbp
je 0x8839
movl 0x10(%rbp), %esi
cmpl $0x2, %esi
jl 0x8833
movq %rbx, %rdi
callq 0x3490
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8b59(%rip), %rsi      # 0x11384
callq 0x32d0
incl %r13d
movq (%rbp), %rbp
jmp 0x8807
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 0x8b5f(%rip), %rsi      # 0x113ce
callq 0x32d0
movq %rbx, %rdi
movl %r13d, %esi
callq 0x3490
movq %rax, %r13
movl $0x1a, %edx
movq %rax, %rdi
leaq 0x8b48(%rip), %rsi      # 0x113d9
callq 0x32d0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %r12, %rdi
callq 0x9158
leaq 0x3a8(%rsp), %rdi
callq 0x91c8
leaq 0xe3ae(%rip), %rax      # 0x16c88
movq %rax, 0xd0(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x5246
leaq 0x150(%rsp), %rdi
callq 0x51d6
leaq 0x118(%rsp), %rdi
callq 0x52b6
leaq 0xe0(%rsp), %rdi
callq 0x5326
leaq 0x308(%rsp), %rdi
callq 0x5246
leaq 0x2d0(%rsp), %rdi
callq 0x51d6
leaq 0x298(%rsp), %rdi
callq 0x52b6
leaq 0x260(%rsp), %rdi
callq 0x5326
addq $0x8, %r14
cmpq 0x10(%rsp), %r14
movq %r15, %rbp
leaq 0x368(%rsp), %r15
jne 0x85f2
movq 0xe64d(%rip), %rbx      # 0x16fb8
leaq 0x8a82(%rip), %rsi      # 0x113f4
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 0xe61b(%rip), %rdi      # 0x16fb8
callq 0x3040
movq %rax, %rdi
callq 0x31a0
leaq 0xd0(%rsp), %rsi
movups 0x8837(%rip), %xmm0     # 0x111f0
movaps %xmm0, 0x20(%rsi)
movups 0x881c(%rip), %xmm0     # 0x111e0
movaps %xmm0, 0x10(%rsi)
movups 0x8801(%rip), %xmm0     # 0x111d0
movaps %xmm0, (%rsi)
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, 0x30(%rsi)
leaq 0x260(%rsp), %rdi
leaq 0x3a8(%rsp), %rcx
movl $0x7, %edx
callq 0x90a6
movq 0x260(%rsp), %r12
movq 0x268(%rsp), %rbp
cmpq %rbp, %r12
je 0x8a83
leaq 0x398(%rsp), %r13
leaq 0x8a06(%rip), %rbx      # 0x11424
leaq 0x8a25(%rip), %r14      # 0x1144a
leaq 0x388(%rsp), %r15
movsd (%r12), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r13, 0x388(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5598
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xfaf2
movq 0x388(%rsp), %rdi
cmpq %r13, %rdi
je 0x8a7a
movq 0x398(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x8, %r12
cmpq %rbp, %r12
jne 0x8a2d
movq 0x260(%rsp), %rdi
testq %rdi, %rdi
je 0x8aa0
movq 0x270(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8ab7
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
xorl %eax, %eax
addq $0x598, %rsp            # imm = 0x598
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x89aa(%rip), %rdi      # 0x1147c
callq 0x3410
movl $0x1, %edi
callq 0x3320
callq 0x3553
jmp 0x8ddf
jmp 0x8b17
jmp 0x8bb7
jmp 0x8d1d
movq %rax, %rbx
jmp 0x8ff2
jmp 0x8b17
jmp 0x8d1d
jmp 0x8d1d
jmp 0x8d1d
jmp 0x8ddf
jmp 0x8b17
movq %rax, %rbx
jmp 0x900f
jmp 0x8ddf
jmp 0x8ddf
movq %rax, %rbx
movq 0x368(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8fc1
movq 0x378(%rsp), %rsi
jmp 0x8e57
movq %rax, %rbx
jmp 0x8fb4
movq %rax, %rbx
jmp 0x8fa7
movq %rax, %rbx
movq 0x388(%rsp), %rdi
cmpq %r13, %rdi
je 0x8b7f
movq 0x398(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8b7f
movq %rax, %rbx
movq 0x260(%rsp), %rdi
testq %rdi, %rdi
je 0x8fc1
movq 0x270(%rsp), %rsi
jmp 0x8ebc
jmp 0x8e70
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x905e
jmp 0x8e73
movq %rax, %rbx
jmp 0x8e80
movq %rax, %rbx
jmp 0x8c0e
movq %rax, %rbx
jmp 0x8be9
movq %rax, %rbx
movq 0x1e0(%rsp), %rdi
cmpq %r12, %rdi
je 0x8be9
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x8c0e
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x3a8(%rsp), %rdi
leaq 0x3b8(%rsp), %rax
cmpq %rax, %rdi
je 0x8e80
movq 0x3b8(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8e80
jmp 0x8e99
jmp 0x8c43
movq %rax, %rbx
jmp 0x8c6c
jmp 0x8c4a
movq %rax, %rbx
jmp 0x8c5f
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x905e
leaq 0x260(%rsp), %rdi
callq 0x905e
leaq 0xd0(%rsp), %rdi
callq 0x905e
jmp 0x8e9c
movq %rax, %rbx
jmp 0x8ea9
movq %rax, %rbx
jmp 0x8cd5
movq %rax, %rbx
jmp 0x8cb0
movq %rax, %rbx
movq 0x220(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8cb0
movq 0x230(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x8cd5
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x8ea9
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8ea9
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x905e
jmp 0x8ecc
jmp 0x8ec9
movq %rax, %rbx
jmp 0x8ed9
movq %rax, %rbx
jmp 0x8d74
movq %rax, %rbx
jmp 0x8d4f
movq %rax, %rbx
movq 0x200(%rsp), %rdi
cmpq %r12, %rdi
je 0x8d4f
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x8d74
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x3a8(%rsp), %rdi
leaq 0x3b8(%rsp), %rax
cmpq %rax, %rdi
je 0x8ed9
movq 0x3b8(%rsp), %rsi
incq %rsi
jmp 0x8e92
jmp 0x8ef7
jmp 0x8da4
movq %rax, %rbx
jmp 0x8dcd
jmp 0x8dbd
movq %rax, %rbx
leaq 0x3a8(%rsp), %rdi
callq 0x905e
jmp 0x8dc0
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x905e
leaq 0xd0(%rsp), %rdi
callq 0x905e
jmp 0x8efa
movq %rax, %rbx
jmp 0x8fc1
movq %rax, %rbx
jmp 0x8e36
movq %rax, %rbx
jmp 0x8e11
movq %rax, %rbx
movq 0x240(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8e11
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x8e36
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x8fc1
movq 0x270(%rsp), %rsi
incq %rsi
jmp 0x8ebf
jmp 0x8f8a
jmp 0x8f8a
jmp 0x8f8a
jmp 0x8f8a
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x4fa0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x8ed9
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
jmp 0x8ed9
movq %rax, %rbx
leaq 0x4b0(%rsp), %rdi
callq 0x4fa0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x8fc1
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
jmp 0x8fc1
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x4fa0
movq 0x4b0(%rsp), %rdi
testq %rdi, %rdi
je 0x900f
movq 0x4c0(%rsp), %rsi
jmp 0x9007
movq %rax, %rbx
leaq 0x4b0(%rsp), %rdi
jmp 0x8fbc
jmp 0x8fd2
movq %rax, %rbx
jmp 0x8f3e
movq %rax, %rbx
jmp 0x8f63
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x8f3e
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x8f63
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3290
movq 0x260(%rsp), %rdi
leaq 0x270(%rsp), %rax
cmpq %rax, %rdi
je 0x8fd5
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x8fd5
movq %rax, %rbx
leaq 0x4b0(%rsp), %rdi
callq 0x9158
leaq 0x3a8(%rsp), %rdi
callq 0x91c8
leaq 0xd0(%rsp), %rdi
callq 0x905e
leaq 0x260(%rsp), %rdi
callq 0x4fa0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x900f
movq 0x48(%rsp), %rsi
jmp 0x9007
movq %rax, %rbx
movq 0x4b0(%rsp), %rdi
testq %rdi, %rdi
je 0x8ff2
movq 0x4c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq 0x3a8(%rsp), %rdi
testq %rdi, %rdi
je 0x900f
movq 0x3b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x34a0
nop