// File: sebastienmeyer2[P]mst-clustering/src/compare_clustering.cpp
// Function: compare_inconsistency(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double)
void compare_inconsistency(std::string file_to_read, double cutoff)
{
    /*!
     * @brief From a file given as entry and an integer k for the number of 
     * clusters to draw, establishes a comparison between kmeans and MST clustering
     * 
     * @param file_to_read Path to the data
     * @param k Number of clusters to draw
     * 
     */

	// get points from datafile

	std::ifstream is(file_to_read);
	assert(is.is_open());

	std::string header_line;
	std::getline(is, header_line);

	const int d = nb_columns(header_line) - 1;
    Point::d = d;

    std::vector<Point*> points = Point::read_points_from_file(file_to_read, d);
    int n = points.size();

    // run Inconsistency method 

    std::chrono::steady_clock::time_point graph_creation = std::chrono::steady_clock::now();

    std::cout << "\nCreating graph...";
    Graph* g = new Graph(points);
    std::cout << "[OK]" << std::endl;

    std::chrono::steady_clock::time_point kruskal_algo = std::chrono::steady_clock::now();

    KruskalAlgorithm kruskal = KruskalAlgorithm(g);
    kruskal.compute_mst();

    std::chrono::steady_clock::time_point inc_clustering = std::chrono::steady_clock::now();

    std::unordered_map<Node*, Node*> clusters = kruskal.compute_clustering(cutoff);

    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 = " << cutoff << std::endl;

    int big_clusters = 0;
    for (auto kv : clusters_size) {
        if (kv.second > 1) {
            big_clusters += 1;
        }
    }
    std::cout << "There are " << big_clusters << " clusters of size at least 2" << std::endl;

    std::chrono::steady_clock::time_point inc_end = std::chrono::steady_clock::now();

    // run kmeans 

    std::chrono::steady_clock::time_point cloud_creation = std::chrono::steady_clock::now();

    std::cout << "\nCreating cloud...";

    Cloud cloud = Cloud(d, n, clusters.size());

    int label = 0;
    for (int i = 0; i < n; i ++) {
        cloud.add_point(*points[i], label);
        label = (label+1) % clusters.size();
    }

    std::cout << "[OK]" << std::endl;

    std::chrono::steady_clock::time_point kmeans_algo = std::chrono::steady_clock::now();

    cloud.kmeans();

    std::chrono::steady_clock::time_point kmeans_end = std::chrono::steady_clock::now();

    // comparison

    std::cout << "\nTotal time spent by Inconsistency clustering including graph creation: ";
    std::cout << std::chrono::duration_cast<std::chrono::microseconds>(inc_end - graph_creation).count() << " µs" << std::endl;

    std::cout << "Total time spent by Inconsistency clustering: ";
    std::cout << std::chrono::duration_cast<std::chrono::microseconds>(inc_end - kruskal_algo).count() << " µs" << std::endl;

    double inc_variance = intracluster_variance(clusters);
    std::cout << "Intracluster variance with Inconsistency clustering: ";
    std::cout << inc_variance << std::endl;

    std::cout << "\nTotal time spent by kmeans including cloud creation: ";
    std::cout << std::chrono::duration_cast<std::chrono::microseconds>(kmeans_end - cloud_creation).count() << " µs" << std::endl;

    std::cout << "Total time spent by kmeans: ";
    std::cout << std::chrono::duration_cast<std::chrono::microseconds>(kmeans_end - kmeans_algo).count() << " µs" << std::endl;

    double kmeans_variance = cloud.intracluster_variance();
    std::cout << "Intracluster variance in kmeans: ";
    std::cout << kmeans_variance << std::endl;

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x710, %rsp            # imm = 0x710
movq %rdi, %rsi
movq %rsi, -0x5c0(%rbp)
movq %rsi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x5b8(%rbp)
movl $0x8, %edx
callq 0xac80
movq -0x5b8(%rbp), %rdi
callq 0xac60
movb %al, -0x5a9(%rbp)
jmp 0x349aa
movb -0x5a9(%rbp), %al
testb $0x1, %al
jne 0x349b6
jmp 0x349b8
jmp 0x349ee
leaq 0x31b5(%rip), %rdi      # 0x37b74
leaq 0x31bb(%rip), %rsi      # 0x37b81
movl $0x82, %edx
leaq 0x333e(%rip), %rcx      # 0x37d10
callq 0xa4a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x355b7
leaq -0x248(%rbp), %rdi
movq %rdi, -0x5c8(%rbp)
callq 0xaad0
movq -0x5c8(%rbp), %rsi
leaq -0x218(%rbp), %rdi
callq 0xa120
jmp 0x34a16
leaq -0x248(%rbp), %rdi
callq 0x33eb0
movl %eax, -0x5cc(%rbp)
jmp 0x34a2a
movq -0x5c0(%rbp), %rsi
movl -0x5cc(%rbp), %eax
decl %eax
movl %eax, -0x24c(%rbp)
movl -0x24c(%rbp), %ecx
leaq 0x1bdac(%rip), %rax     # 0x507f8
movl %ecx, (%rax)
leaq -0x288(%rbp), %rdi
callq 0xa2a0
jmp 0x34a5c
movl -0x24c(%rbp), %edx
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0xb6f0
jmp 0x34a77
leaq -0x288(%rbp), %rdi
callq 0xa470
leaq -0x268(%rbp), %rdi
callq 0xc120
movl %eax, -0x28c(%rbp)
callq 0xaa70
movq %rax, -0x298(%rbp)
movq 0x1b508(%rip), %rdi     # 0x4ffb0
leaq 0x3117(%rip), %rsi      # 0x37bc6
callq 0xa780
jmp 0x34ab6
movl $0xe8, %edi
callq 0xa790
movq %rax, -0x5d8(%rbp)
jmp 0x34ac9
movb $0x1, -0x2b9(%rbp)
leaq -0x2b8(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x356e0
jmp 0x34ae5
movq -0x5d8(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0xd090
jmp 0x34afa
movb $0x0, -0x2b9(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0xba30
movq -0x5d8(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq 0x1b48e(%rip), %rdi     # 0x4ffb0
leaq 0x2d7f(%rip), %rsi      # 0x378a8
callq 0xa780
movq %rax, -0x5e0(%rbp)
jmp 0x34b37
movq -0x5e0(%rbp), %rdi
movq 0x1b443(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x34b4c
callq 0xaa70
movq %rax, -0x2c8(%rbp)
movq -0x2a0(%rbp), %rsi
leaq -0x3d0(%rbp), %rdi
callq 0x2e540
jmp 0x34b6d
leaq -0x3d0(%rbp), %rdi
callq 0x2e580
jmp 0x34b7b
callq 0xaa70
movq %rax, -0x3d8(%rbp)
movsd -0x10(%rbp), %xmm0
leaq -0x410(%rbp), %rdi
leaq -0x3d0(%rbp), %rsi
callq 0x26bc0
jmp 0x34ba1
leaq -0x448(%rbp), %rdi
callq 0x1bb20
leaq -0x410(%rbp), %rax
movq %rax, -0x450(%rbp)
movq -0x450(%rbp), %rdi
callq 0x1bb40
movq %rax, -0x458(%rbp)
movq -0x450(%rbp), %rdi
callq 0x1bb70
movq %rax, -0x460(%rbp)
leaq -0x458(%rbp), %rdi
leaq -0x460(%rbp), %rsi
callq 0x1bba0
testb $0x1, %al
jne 0x34bfd
jmp 0x34de2
leaq -0x458(%rbp), %rdi
callq 0x1bbd0
movups (%rax), %xmm0
movaps %xmm0, -0x470(%rbp)
leaq -0x468(%rbp), %rsi
leaq -0x448(%rbp), %rdi
callq 0x1bc30
movq %rax, -0x5e8(%rbp)
jmp 0x34c2f
movq -0x5e8(%rbp), %rax
movq %rax, -0x478(%rbp)
leaq -0x448(%rbp), %rdi
callq 0x1bc60
movq %rax, -0x480(%rbp)
leaq -0x478(%rbp), %rdi
leaq -0x480(%rbp), %rsi
callq 0x1bc00
testb $0x1, %al
jne 0x34c6c
jmp 0x34d6d
leaq -0x468(%rbp), %rsi
leaq -0x448(%rbp), %rdi
callq 0x1bc90
movq %rax, -0x5f0(%rbp)
jmp 0x34c88
movq -0x5f0(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x34dcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x355ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x288(%rbp), %rdi
callq 0xa470
jmp 0x355ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3559f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x34d1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0xba30
testb $0x1, -0x2b9(%rbp)
jne 0x34d29
jmp 0x34d3a
movq -0x5d8(%rbp), %rdi
movl $0xe8, %esi
callq 0xa7b0
jmp 0x3559f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x35593
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3557b
leaq -0x468(%rbp), %rsi
movl $0x1, -0x494(%rbp)
leaq -0x490(%rbp), %rdi
leaq -0x494(%rbp), %rdx
callq 0x1bd00
jmp 0x34d93
leaq -0x448(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x1bcc0
movb %dl, -0x5f9(%rbp)
movq %rax, -0x5f8(%rbp)
jmp 0x34db5
movb -0x5f9(%rbp), %al
movq -0x5f8(%rbp), %rcx
movq %rcx, -0x4a8(%rbp)
movb %al, -0x4a0(%rbp)
jmp 0x34dd1
leaq -0x458(%rbp), %rdi
callq 0x1bd30
jmp 0x34be1
movq 0x1b1c7(%rip), %rdi     # 0x4ffb0
leaq 0x2f50(%rip), %rsi      # 0x37d40
callq 0xa780
movq %rax, -0x608(%rbp)
jmp 0x34dfe
leaq -0x448(%rbp), %rdi
callq 0x1bd60
movq -0x608(%rbp), %rdi
movq %rax, %rsi
callq 0xa180
movq %rax, -0x610(%rbp)
jmp 0x34e22
movq -0x610(%rbp), %rdi
leaq 0x26a7(%rip), %rsi      # 0x374d7
callq 0xa780
movq %rax, -0x618(%rbp)
jmp 0x34e3e
movq -0x618(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
callq 0xaee0
movq %rax, -0x620(%rbp)
jmp 0x34e58
movq -0x620(%rbp), %rdi
movq 0x1b122(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x34e6d
movl $0x0, -0x4ac(%rbp)
leaq -0x448(%rbp), %rax
movq %rax, -0x4b8(%rbp)
movq -0x4b8(%rbp), %rdi
callq 0x1bd80
movq %rax, -0x4c0(%rbp)
movq -0x4b8(%rbp), %rdi
callq 0x1bc60
movq %rax, -0x4c8(%rbp)
leaq -0x4c0(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x1bc00
testb $0x1, %al
jne 0x34ec4
jmp 0x34f0d
leaq -0x4c0(%rbp), %rdi
callq 0x1bdb0
movq (%rax), %rcx
movq %rcx, -0x4d8(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x4d0(%rbp)
cmpl $0x1, -0x4d0(%rbp)
jle 0x34efd
movl -0x4ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ac(%rbp)
jmp 0x34eff
leaq -0x4c0(%rbp), %rdi
callq 0x1bde0
jmp 0x34eab
movq 0x1b09c(%rip), %rdi     # 0x4ffb0
leaq 0x2604(%rip), %rsi      # 0x3751f
callq 0xa780
movq %rax, -0x628(%rbp)
jmp 0x34f29
movq -0x628(%rbp), %rdi
movl -0x4ac(%rbp), %esi
callq 0xada0
movq %rax, -0x630(%rbp)
jmp 0x34f44
movq -0x630(%rbp), %rdi
leaq 0x2e03(%rip), %rsi      # 0x37d55
callq 0xa780
movq %rax, -0x638(%rbp)
jmp 0x34f60
movq -0x638(%rbp), %rdi
movq 0x1b01a(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x34f75
callq 0xaa70
movq %rax, -0x4e0(%rbp)
callq 0xaa70
movq %rax, -0x4e8(%rbp)
movq 0x1b01c(%rip), %rdi     # 0x4ffb0
leaq 0x2c3e(%rip), %rsi      # 0x37bd9
callq 0xa780
jmp 0x34fa2
movl -0x24c(%rbp), %eax
movl %eax, -0x640(%rbp)
movl -0x28c(%rbp), %eax
movl %eax, -0x63c(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x24770
movl -0x640(%rbp), %esi
movl -0x63c(%rbp), %edx
movl %eax, %ecx
leaq -0x508(%rbp), %rdi
callq 0x32550
jmp 0x34fe2
movl $0x0, -0x50c(%rbp)
movl $0x0, -0x510(%rbp)
movl -0x510(%rbp), %eax
cmpl -0x28c(%rbp), %eax
jge 0x35092
movslq -0x510(%rbp), %rsi
leaq -0x268(%rbp), %rdi
callq 0xde90
movq (%rax), %rsi
movl -0x50c(%rbp), %edx
leaq -0x508(%rbp), %rdi
callq 0x328b0
jmp 0x35032
movl -0x50c(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x648(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x24770
movq %rax, %rcx
movq -0x648(%rbp), %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x50c(%rbp)
movl -0x510(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x510(%rbp)
jmp 0x34ff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
jmp 0x3556f
movq 0x1af17(%rip), %rdi     # 0x4ffb0
leaq 0x2808(%rip), %rsi      # 0x378a8
callq 0xa780
movq %rax, -0x650(%rbp)
jmp 0x350ae
movq -0x650(%rbp), %rdi
movq 0x1aecc(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x350c3
callq 0xaa70
movq %rax, -0x518(%rbp)
leaq -0x508(%rbp), %rdi
callq 0x33030
jmp 0x350dd
callq 0xaa70
movq %rax, -0x520(%rbp)
movq 0x1aec0(%rip), %rdi     # 0x4ffb0
leaq 0x2c7b(%rip), %rsi      # 0x37d72
callq 0xa780
jmp 0x350fe
leaq -0x4e0(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x2b6a0
movq %rax, -0x658(%rbp)
jmp 0x3511a
movq -0x658(%rbp), %rax
movq %rax, -0x530(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x2b670
movq %rax, -0x660(%rbp)
jmp 0x3513d
movq -0x660(%rbp), %rax
movq %rax, -0x528(%rbp)
leaq -0x528(%rbp), %rdi
callq 0x2b6f0
movq %rax, -0x668(%rbp)
jmp 0x35160
movq -0x668(%rbp), %rsi
movq 0x1ae42(%rip), %rdi     # 0x4ffb0
callq 0xae50
movq %rax, -0x670(%rbp)
jmp 0x3517c
movq -0x670(%rbp), %rdi
leaq 0x275b(%rip), %rsi      # 0x378e5
callq 0xa780
movq %rax, -0x678(%rbp)
jmp 0x35198
movq -0x678(%rbp), %rdi
movq 0x1ade2(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x351ad
movq 0x1adfc(%rip), %rdi     # 0x4ffb0
leaq 0x2c00(%rip), %rsi      # 0x37dbb
callq 0xa780
jmp 0x351c2
leaq -0x4e0(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x2b6a0
movq %rax, -0x680(%rbp)
jmp 0x351de
movq -0x680(%rbp), %rax
movq %rax, -0x540(%rbp)
leaq -0x540(%rbp), %rdi
callq 0x2b670
movq %rax, -0x688(%rbp)
jmp 0x35201
movq -0x688(%rbp), %rax
movq %rax, -0x538(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x2b6f0
movq %rax, -0x690(%rbp)
jmp 0x35224
movq -0x690(%rbp), %rsi
movq 0x1ad7e(%rip), %rdi     # 0x4ffb0
callq 0xae50
movq %rax, -0x698(%rbp)
jmp 0x35240
movq -0x698(%rbp), %rdi
leaq 0x2697(%rip), %rsi      # 0x378e5
callq 0xa780
movq %rax, -0x6a0(%rbp)
jmp 0x3525c
movq -0x6a0(%rbp), %rdi
movq 0x1ad1e(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x35271
leaq -0x580(%rbp), %rdi
leaq -0x410(%rbp), %rsi
callq 0x357d0
jmp 0x35286
leaq -0x580(%rbp), %rdi
callq 0x231d0
movsd %xmm0, -0x6a8(%rbp)
jmp 0x3529c
leaq -0x580(%rbp), %rdi
callq 0x1be30
movsd -0x6a8(%rbp), %xmm0
movsd %xmm0, -0x548(%rbp)
movq 0x1acf1(%rip), %rdi     # 0x4ffb0
leaq 0x2b24(%rip), %rsi      # 0x37dea
callq 0xa780
jmp 0x352cd
movsd -0x548(%rbp), %xmm0
movq 0x1acd4(%rip), %rdi     # 0x4ffb0
callq 0xaee0
movq %rax, -0x6b0(%rbp)
jmp 0x352ea
movq -0x6b0(%rbp), %rdi
movq 0x1ac90(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x352ff
movq 0x1acaa(%rip), %rdi     # 0x4ffb0
leaq 0x2976(%rip), %rsi      # 0x37c83
callq 0xa780
jmp 0x35314
leaq -0x520(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
callq 0x2b6a0
movq %rax, -0x6b8(%rbp)
jmp 0x35330
movq -0x6b8(%rbp), %rax
movq %rax, -0x590(%rbp)
leaq -0x590(%rbp), %rdi
callq 0x2b670
movq %rax, -0x6c0(%rbp)
jmp 0x35353
movq -0x6c0(%rbp), %rax
movq %rax, -0x588(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x2b6f0
movq %rax, -0x6c8(%rbp)
jmp 0x35376
movq -0x6c8(%rbp), %rsi
movq 0x1ac2c(%rip), %rdi     # 0x4ffb0
callq 0xae50
movq %rax, -0x6d0(%rbp)
jmp 0x35392
movq -0x6d0(%rbp), %rdi
leaq 0x2545(%rip), %rsi      # 0x378e5
callq 0xa780
movq %rax, -0x6d8(%rbp)
jmp 0x353ae
movq -0x6d8(%rbp), %rdi
movq 0x1abcc(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x353c3
movq 0x1abe6(%rip), %rdi     # 0x4ffb0
leaq 0x28e9(%rip), %rsi      # 0x37cba
callq 0xa780
jmp 0x353d8
leaq -0x520(%rbp), %rdi
leaq -0x518(%rbp), %rsi
callq 0x2b6a0
movq %rax, -0x6e0(%rbp)
jmp 0x353f4
movq -0x6e0(%rbp), %rax
movq %rax, -0x5a0(%rbp)
leaq -0x5a0(%rbp), %rdi
callq 0x2b670
movq %rax, -0x6e8(%rbp)
jmp 0x35417
movq -0x6e8(%rbp), %rax
movq %rax, -0x598(%rbp)
leaq -0x598(%rbp), %rdi
callq 0x2b6f0
movq %rax, -0x6f0(%rbp)
jmp 0x3543a
movq -0x6f0(%rbp), %rsi
movq 0x1ab68(%rip), %rdi     # 0x4ffb0
callq 0xae50
movq %rax, -0x6f8(%rbp)
jmp 0x35456
movq -0x6f8(%rbp), %rdi
leaq 0x2481(%rip), %rsi      # 0x378e5
callq 0xa780
movq %rax, -0x700(%rbp)
jmp 0x35472
movq -0x700(%rbp), %rdi
movq 0x1ab08(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x35487
leaq -0x508(%rbp), %rdi
callq 0x32aa0
movsd %xmm0, -0x708(%rbp)
jmp 0x3549d
movsd -0x708(%rbp), %xmm0
movsd %xmm0, -0x5a8(%rbp)
movq 0x1aafc(%rip), %rdi     # 0x4ffb0
leaq 0x281c(%rip), %rsi      # 0x37cd7
callq 0xa780
jmp 0x354c2
movsd -0x5a8(%rbp), %xmm0
movq 0x1aadf(%rip), %rdi     # 0x4ffb0
callq 0xaee0
movq %rax, -0x710(%rbp)
jmp 0x354df
movq -0x710(%rbp), %rdi
movq 0x1aa9b(%rip), %rsi     # 0x4ff88
callq 0xa7e0
jmp 0x354f4
leaq -0x508(%rbp), %rdi
callq 0x327b0
leaq -0x448(%rbp), %rdi
callq 0x1be10
leaq -0x410(%rbp), %rdi
callq 0x1be30
leaq -0x3d0(%rbp), %rdi
callq 0x1b8a0
leaq -0x268(%rbp), %rdi
callq 0xba30
leaq -0x248(%rbp), %rdi
callq 0xa470
leaq -0x218(%rbp), %rdi
callq 0xa1b0
addq $0x710, %rsp            # imm = 0x710
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x580(%rbp), %rdi
callq 0x1be30
leaq -0x508(%rbp), %rdi
callq 0x327b0
leaq -0x448(%rbp), %rdi
callq 0x1be10
leaq -0x410(%rbp), %rdi
callq 0x1be30
leaq -0x3d0(%rbp), %rdi
callq 0x1b8a0
leaq -0x268(%rbp), %rdi
callq 0xba30
leaq -0x248(%rbp), %rdi
callq 0xa470
leaq -0x218(%rbp), %rdi
callq 0xa1b0
movq -0x220(%rbp), %rdi
callq 0xade0
nop