LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/coduin[P]epiphany-bin-info/epiphany-bin-info.cpp
// Function: demangle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string demangle(const string& name) {
    string ret;
    int status;
    char* realname = 0;

    realname = abi::__cxa_demangle(name.c_str(), 0, 0, &status);

    if (status == 0)
        ret = realname;
    else
        ret = name;

    if (realname)
        free(realname);
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rdi
leaq 0x4(%rsp), %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x2140
movq %rax, %r14
cmpl $0x0, 0x4(%rsp)
je 0x2633
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20e0
jmp 0x2652
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x20c0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x2220
testq %r14, %r14
je 0x265f
movq %r14, %rdi
callq 0x21b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x2685
movq (%r12), %rsi
incq %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/coduin[P]epiphany-bin-info/epiphany-bin-info.cpp
// Function: isEpiphanyElf(Elf32_Ehdr*)
bool isEpiphanyElf(Elf32_Ehdr* ehdr) {
    return ehdr && memcmp(ehdr->e_ident, ELFMAG, SELFMAG) == 0 &&
           ehdr->e_ident[EI_CLASS] == ELFCLASS32 && ehdr->e_type == ET_EXEC &&
           ehdr->e_version == EV_CURRENT &&
           ehdr->e_machine == EM_ADAPTEVA_EPIPHANY;
}

// Assembly:
testq %rdi, %rdi
je 0x26b7
cmpl $0x464c457f, (%rdi)     # imm = 0x464C457F
jne 0x26b7
cmpb $0x1, 0x4(%rdi)
jne 0x26b7
cmpw $0x2, 0x10(%rdi)
jne 0x26b7
cmpl $0x1, 0x14(%rdi)
jne 0x26b7
cmpw $0x1223, 0x12(%rdi)     # imm = 0x1223
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/coduin[P]epiphany-bin-info/epiphany-bin-info.cpp
// Function: parseSections(Elf32_Shdr*, unsigned long, char const*, unsigned long)
void parseSections(Elf32_Shdr* shdr, size_t count, const char* strtab,
                   size_t strsize) {
    if (showSections) {
        cout << "\nSection table (linker info):\n";
        cout << "ADDR        SIZE        NAME\n";
        for (size_t i = 0; i < count; i++) {
            if (shdr[i].sh_flags & SHF_ALLOC) {
                cout << addr(shdr[i].sh_addr);
            } else {
                cout << "          ";
            }
            cout << "  " << ashex(shdr[i].sh_size);
            if (shdr[i].sh_name != SHN_UNDEF && shdr[i].sh_name < strsize)
                cout << "  " << (&strtab[shdr[i].sh_name]);
            cout << endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
cmpb $0x1, 0x57a7(%rip)      # 0x8183
jne 0x2b35
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x55de(%rip), %r13      # 0x7fd0
leaq 0x26ba(%rip), %rsi      # 0x50b3
movl $0x1e, %edx
movq %r13, %rdi
callq 0x21a0
leaq 0x26c5(%rip), %rsi      # 0x50d2
movl $0x1d, %edx
movq %r13, %rdi
callq 0x21a0
testq %r15, %r15
je 0x2b35
leaq 0x26ce(%rip), %rbp      # 0x50f8
movq %rsp, %r14
movq %rbx, 0x8(%rsp)
testb $0x2, 0x8(%r12)
jne 0x2a50
movl $0xa, %edx
movq %r13, %rdi
leaq 0x26a7(%rip), %rsi      # 0x50f0
callq 0x21a0
jmp 0x2a66
movl 0xc(%r12), %eax
movl %eax, 0x4(%rsp)
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0x2569
movl $0x2, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x21a0
movl 0x14(%r12), %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x24cc
movl (%r12), %eax
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
setae %al
orb %cl, %al
jne 0x2b00
movl $0x2, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x21a0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2ae7
movq %rbp, %rbx
movq %r14, %rbp
movl (%r12), %r14d
addq %rax, %r14
movq %r14, %rdi
callq 0x20c0
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %r14
movq %rbx, %rbp
movq 0x8(%rsp), %rbx
movq %rax, %rdx
callq 0x21a0
jmp 0x2b00
movq (%r13), %rax
movq -0x18(%rax), %rax
leaq (%rax,%r13), %rdi
movl 0x20(%r13,%rax), %esi
orl $0x1, %esi
callq 0x2240
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2100
addq $0x28, %r12
decq %r15
jne 0x2a32
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/coduin[P]epiphany-bin-info/epiphany-bin-info.cpp
// Function: getCmdOption(char**, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
char* getCmdOption(char** begin, char** end, const std::string& option) {
    char** itr = std::find(begin, end, option);
    if (itr != end && ++itr != end) {
        return *itr;
    }
    return 0;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x49e5
cmpq %rbx, %rax
je 0x31e1
addq $0x8, %rax
cmpq %rbx, %rax
je 0x31e1
movq (%rax), %rax
jmp 0x31e3
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/coduin[P]epiphany-bin-info/epiphany-bin-info.cpp
// Function: showHelp(char*)
void showHelp(char* cmd) {
    cout << "Usage: " << cmd
         << " [-h] [-p] [-sec] [-s] [-a] [--nodemangle] file\n";
    cout << "Options:\n";
    cout << "    -h             Show this help.\n";
    cout << "    -p             Show program headers (runtime information).\n";
    cout << "    -sec           Show section headers (linking information).\n";
    cout << "                   Sections stored in external memory are "
            "highlighted.\n";
    cout << "    -s             Show symbols (function names).\n";
    cout << "                   Symbols are sorted by address.\n";
    cout << "    -a             Show all.\n";
    cout << "    --nodemangle   Do not demangle C++ symbol names.\n";
    cout << "  By default, only the total program size in local and external "
            "memory is shown."
         << endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x4dcc(%rip), %rbx      # 0x7fd0
leaq 0x1fea(%rip), %rsi      # 0x51f5
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21a0
testq %r14, %r14
je 0x3239
movq %r14, %rdi
callq 0x20c0
movq 0x4da4(%rip), %rdi      # 0x7fd0
movq %r14, %rsi
movq %rax, %rdx
callq 0x21a0
jmp 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2240
leaq 0x1fa6(%rip), %rsi      # 0x51fd
movl $0x30, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x1fc3(%rip), %rsi      # 0x522e
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x1fb9(%rip), %rsi      # 0x5238
movl $0x23, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x1fc9(%rip), %rsi      # 0x525c
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x1ff5(%rip), %rsi      # 0x529c
movl $0x3f, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x2021(%rip), %rsi      # 0x52dc
movl $0x47, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x2055(%rip), %rsi      # 0x5324
movl $0x32, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x2074(%rip), %rsi      # 0x5357
movl $0x32, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x2093(%rip), %rsi      # 0x538a
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x209d(%rip), %rsi      # 0x53a8
movl $0x35, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x20bf(%rip), %rsi      # 0x53de
movl $0x50, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2100
// File: /workspace/github_cpp_makefile_star2_O1/permui[P]CastleAdventure/src/command.hpp
// Function: std::pair<int, double> GetAin<int>()
std::pair<T, double> GetAin() {
	auto t1 = std::chrono::high_resolution_clock::now();
	T ret = GetA<T>();
	auto t2 = std::chrono::high_resolution_clock::now();
	std::chrono::duration<double> sec = t2 - t1;
	return {ret, sec.count()};
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x2050
movq %rax, %rbx
callq 0x3a9c
movl %eax, %ebp
callq 0x2050
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x67bf(%rip), %xmm0     # 0xa090
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/permui[P]CastleAdventure/src/command.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> GetA<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>()
T GetA() {
	T ret;
	while (true) {
		if (std::cin >> ret) {
			std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
			break;
		}
		std::cout << "invalid input!" << std::endl;
		std::cin.clear();
		std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x4fca(%rip), %r14      # 0xdfe0
movq 0x4fb3(%rip), %r15      # 0xdfd0
leaq 0x1190(%rip), %r12      # 0xa1b4
movabsq $0x7fffffffffffffff, %r13 # imm = 0x7FFFFFFFFFFFFFFF
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x90a1
movl $0xe, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x2270
movq %r14, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x20f0
jmp 0x902e
movq 0x4f38(%rip), %rdi      # 0xdfe0
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movl $0xa, %edx
callq 0x20f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x90d0
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x90e7
movq (%rbp), %rsi
incq %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/permui[P]CastleAdventure/src/base.cpp
// Function: Player::show_state(Grid const&) const
void Player::show_state(const Grid &grid) const {
	std::cout << "You are at (floor " << pos.floor << ", section " << pos.section << ") [" << grid.name << "]" << std::endl;
	std::cout << "shield: " << shield << " | sword: " << sword << " | ";
	std::cout << "BitCoin: " << btc;
	if (with_princess) std::cout << " | with princess";
	std::cout << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq 0xa30f(%rip), %rbx      # 0xdfd0
leaq 0x6518(%rip), %rsi      # 0xa1e0
movl $0x12, %edx
movq %rbx, %rdi
callq 0x21e0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x2280
movq %rax, %r12
leaq 0x6509(%rip), %rsi      # 0xa1f3
movl $0xa, %edx
movq %rax, %rdi
callq 0x21e0
movl 0x4(%r14), %esi
movq %r12, %rdi
callq 0x2280
movq %rax, %r12
leaq 0x64f1(%rip), %rsi      # 0xa1fe
movl $0x3, %edx
movq %rax, %rdi
callq 0x21e0
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
movq %r12, %rdi
callq 0x21e0
movq %rax, %r15
leaq 0x64ce(%rip), %rsi      # 0xa202
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x6495(%rip), %rsi      # 0xa204
movl $0x8, %edx
movq %rbx, %rdi
callq 0x21e0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x2280
movq %rax, %r15
leaq 0x647b(%rip), %rsi      # 0xa20d
movl $0xa, %edx
movq %rax, %rdi
callq 0x21e0
movl 0xc(%r14), %esi
movq %r15, %rdi
callq 0x2280
leaq 0x6466(%rip), %rsi      # 0xa218
movl $0x3, %edx
movq %rax, %rdi
callq 0x21e0
leaq 0x6456(%rip), %rsi      # 0xa21c
movl $0x9, %edx
movq %rbx, %rdi
callq 0x21e0
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x2280
cmpb $0x1, 0x14(%r14)
jne 0x3dfe
movq 0xa1e3(%rip), %rdi      # 0xdfd0
leaq 0x6432(%rip), %rsi      # 0xa226
movl $0x10, %edx
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/permui[P]CastleAdventure/src/genmap.cpp
// Function: GenMap()
map<Position, Grid> GenMap() {
	vector<Grid> vec = GenGrids();
	map<Position, Grid> mp;
	for (const Grid &g: vec) mp.emplace(g.pos, g);
	return mp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x41b0
leaq 0x8(%rbx), %rax
movl $0x0, 0x8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq (%r15), %r14
movq 0x8(%r15), %r15
cmpq %r15, %r14
je 0x7b64
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x8734
subq $-0x80, %r14
jmp 0x7b4b
leaq 0x8(%rsp), %rdi
callq 0x8122
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2a4a
leaq 0x8(%rsp), %rdi
callq 0x8122
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/permui[P]CastleAdventure/src/command.cpp
// Function: EncounterPrincess(Player&, Grid&)
void EncounterPrincess(Player &player, Grid &grid) {
	cout << "Lovely Princess Here!" << endl;
	cout << "Commands: pick_her leave_her_alone" << endl;
	while (true) {
		string com = GetA<string>();
		if (com == "pick_her") {
			grid.info.t = GT::None;
			player.with_princess = true;
			break;
		} else if (com == "leave_her_alone") {
			break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, (%rsp)
movq %rdi, %r14
movq 0x50d5(%rip), %r15      # 0xdfd0
leaq 0x1c65(%rip), %rsi      # 0xab67
movl $0x15, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x1c40(%rip), %rsi      # 0xab7d
movl $0x22, %edx
movq %r15, %rdi
callq 0x21e0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r15
leaq 0x1c1e(%rip), %r12      # 0xaba0
leaq 0x1c07(%rip), %r13      # 0xab90
movq %r15, %rdi
callq 0x8fee
movq %r15, %rdi
movq %r12, %rsi
callq 0x2080
testl %eax, %eax
je 0x8fb2
movq %r15, %rdi
movq %r13, %rsi
callq 0x2080
testl %eax, %eax
setne %bl
jmp 0x8fc4
movq (%rsp), %rax
movl $0x3, 0x8(%rax)
movb $0x1, 0x14(%r14)
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8fdb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
testb %bl, %bl
jne 0x8f89
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/point.cpp
// Function: Point::print()
void Point::print()
{
    /*!
     * @brief Enables to print d-dimensional points on the console
     * 
     */

    for (int i = 0; i < d; i ++) {
        std::cout << coords[i] << std::endl;
    }
    std::cout << "\n" << std::endl;
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x13815(%rip)     # 0x172a8
jle 0x3aec
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0x13516(%rip), %r14     # 0x16fb8
movq (%rbx), %rax
movsd (%rax,%r12,8), %xmm0
movq %r14, %rdi
callq 0x3420
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
incq %r12
movslq 0x137c1(%rip), %rax     # 0x172a8
cmpq %rax, %r12
jl 0x3aa2
movq 0x134c5(%rip), %rbx     # 0x16fb8
leaq 0xd71c(%rip), %rsi      # 0x11216
movl $0x1, %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
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x31a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/point.cpp
// Function: Point::distance(Point*)
double Point::distance(Point* other)
{
    /*!
     * @brief Evaluates the distance between two instances of the class Point
     * 
     * @param other Another Point to evaluate the distance with 
     * 
     * @return The distance between this point and the \p other 
     */

    double dist = 0.0;
    for (int i = 0; i < d; i ++) {
        dist += std::pow(coords[i] - other->coords[i], 2);
    }
    dist = std::sqrt(dist);

    return dist;
}

// Assembly:
movslq 0x13767(%rip), %rax     # 0x172a8
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rax, %rax
jle 0x3b70
movq (%rdi), %rcx
movq (%rsi), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm2
subsd (%rdx,%rsi,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x3b56
ucomisd %xmm1, %xmm0
jb 0x3210
sqrtsd %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/point.cpp
// Function: Point::read_points_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
std::vector<Point*> Point::read_points_from_file(std::string file_path, int d) 
{
    /*!
     * @brief Builds a vector of points from a file where data is correctly
     * formatted (double spaced with " ")
     * 
     * @param file_path the path to the file to get data from
     * @param d the dimension of the points
     * 
     * @return A vector of pointers to the created points
     */

    std::vector<Point*> points;

    std::ifstream is(file_path);
    assert(("No such file", is.is_open()));

    std::string line;

	// while not at the end of the file
	while(is.peek() != EOF)
	{
		// read new points
        Point* p = new Point();

		for(int m = 0; m < d; m++)
		{
			is >> p->coords[m];
		}

        points.push_back(p);

		// new line
		is.get();
	}
    points.pop_back(); // last line makes an empty point otherwise

    return points;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %edx, 0x4(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x30(%rsp), %rdi
movl $0x8, %edx
callq 0x3430
leaq 0xa8(%rsp), %rdi
callq 0x3080
testb %al, %al
je 0x3ce9
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0x4(%rsp), %ebp
shlq $0x3, %rbp
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x30e0
cmpl $-0x1, %eax
je 0x3ca9
movl $0x10, %edi
callq 0x3280
movq %rax, %r12
movslq 0x13698(%rip), %rax     # 0x172a8
leaq (,%rax,8), %r13
testq %rax, %rax
movq $-0x1, %rax
cmovsq %rax, %r13
movq %r13, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x3130
movq %r15, (%r12)
movl $0x0, 0x8(%r12)
movq %r12, 0x8(%rsp)
cmpl $0x0, 0x4(%rsp)
jle 0x3c76
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movq (%rax), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x3180
addq $0x8, %r15
cmpq %r15, %rbp
jne 0x3c5a
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3c8f
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x3c9c
movq %rbx, %rdi
leaq 0x8(%rsp), %rdx
callq 0x3d68
movq %r14, %rdi
callq 0x3310
jmp 0x3beb
addq $-0x8, 0x8(%rbx)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3cca
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x30(%rsp), %rdi
callq 0x3090
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd314(%rip), %rdi      # 0x11004
leaq 0xd32c(%rip), %rsi      # 0x11023
leaq 0xd333(%rip), %rcx      # 0x11031
movl $0x56, %edx
callq 0x3170
movq %rax, %r14
jmp 0x3d4c
movq %rax, %r14
movl $0x10, %esi
movq %r12, %rdi
callq 0x3290
jmp 0x3d26
jmp 0x3d23
jmp 0x3d23
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3d42
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3290
leaq 0x30(%rsp), %rdi
callq 0x3090
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3d60
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3290
movq %r14, %rdi
callq 0x34a0
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/graph.cpp
// Function: Graph::add_edge(Edge*)
void Graph::add_edge(Edge* e){
    /*!
     * @brief Ajoute l'arrête \p e au graphe
     * 
     * @param e L'arrête
     * 
     * @note Il n'est pas nécessaire d'ajouter les points de \p e au graphe; si ces derniers
     * n'est font pas déjà partie, ils seront ajoutés automatiquement.
     * 
     */

    this->add_node(e->p1);
    this->add_node(e->p2);

    std::unordered_set<Edge*>& adj_p1 = this->adjacency_lists.at(e->p1);
    adj_p1.insert(e);

    std::unordered_set<Edge*>& adj_p2 = this->adjacency_lists.at(e->p2);
    adj_p2.insert(e);

    this->all_edges.insert(e);

    e->id = this->edge_counter;
    this->edge_id_mapper.insert(std::pair<edge_id_t, Edge*>(this->edge_counter++, e));

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %rsi, (%r14)
movq (%rsi), %rsi
callq 0x4ba4
movq (%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x4ba4
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x65ea
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x662c
movq (%r14), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x65ea
movq %rax, (%r15)
leaq 0x8(%rsp), %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x662c
leaq 0x38(%rbx), %rdi
movq %rdi, (%r15)
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x662c
movl 0xe4(%rbx), %eax
movq (%r14), %rcx
movl %eax, 0x18(%rcx)
leal 0x1(%rax), %edx
movl %edx, 0xe4(%rbx)
addq $0xa8, %rbx
movl %eax, (%r15)
movq %rcx, 0x8(%r15)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x68f2
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/graph.cpp
// Function: Graph::Graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Graph::Graph(std::string file_path) : Graph()
{
    /*!
     * @brief Builds a graph from scratch, with its nodes and edges contained in a file
     * 
     * @param file_path The path to the file 
     * 
     */
    build_from_ashiip(this, file_path);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movl $0x1, %eax
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, %ecx       # imm = 0x3F800000
movl %ecx, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
leaq 0x68(%rdi), %rdx
movq %rdx, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movups %xmm0, 0x48(%rdi)
movl %ecx, 0x58(%rdi)
movups %xmm0, 0x60(%rdi)
leaq 0xa0(%rdi), %rdx
movq %rdx, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movups %xmm0, 0x80(%rdi)
movl %ecx, 0x90(%rdi)
movups %xmm0, 0x98(%rdi)
leaq 0xd8(%rdi), %rdx
movq %rdx, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
movups %xmm0, 0xb8(%rdi)
movl %ecx, 0xc8(%rdi)
movups %xmm0, 0xd0(%rdi)
movq $0x0, 0xe0(%rdi)
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %rax, %rsi
callq 0x5628
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3f36
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4960
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x4988
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3290
jmp 0x4988
movq %rax, %r14
movq %rbx, %rdi
callq 0x4fa0
movq %r14, %rdi
callq 0x34a0
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/graph.cpp
// Function: Graph::Graph(std::vector<Point*, std::allocator<Point*>>)
Graph::Graph(std::vector<Point*> points)
{
    /*!
     * @brief Builds a graph from scratch, with its nodes being points of a certain dimension
     * 
     * @param points A vector of points in memory 
     * 
     */

    int n = points.size();
    std::vector<Node*> nodes;

    for (int i = 0; i < n; i ++) {
        nodes.push_back(new Node(i, points[i]));
        this->add_node(nodes[i]);
    }

    for (int i = 0; i < n; i ++) {
        for (int j = i+1; j < n; j ++) {
            this->add_edge(new Edge(nodes[i], nodes[j]));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movl $0x1, %eax
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, %ecx       # imm = 0x3F800000
movl %ecx, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
leaq 0x68(%rdi), %rdx
movq %rdx, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movups %xmm0, 0x48(%rdi)
movl %ecx, 0x58(%rdi)
movups %xmm0, 0x60(%rdi)
leaq 0xa0(%rdi), %rdx
movq %rdx, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movups %xmm0, 0x80(%rdi)
movl %ecx, 0x90(%rdi)
movups %xmm0, 0x98(%rdi)
leaq 0xd8(%rdi), %rdx
movq %rdx, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
movups %xmm0, 0xb8(%rdi)
movl %ecx, 0xc8(%rdi)
movups %xmm0, 0xd0(%rdi)
movq 0x8(%rsi), %r12
subq (%rsi), %r12
shrq $0x3, %r12
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testl %r12d, %r12d
jle 0x4aa5
movq %rsi, %r14
movl %r12d, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movl $0x18, %edi
callq 0x3280
movq %rax, %rbp
movq (%r14), %rax
movq (%rax,%r15,8), %rdx
movq %rbp, %rdi
movl %r15d, %esi
callq 0x96c0
movq %rbp, 0x20(%rsp)
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x615a
movq (%rsp), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x4ba4
incq %r15
cmpq %r15, %r13
jne 0x4a5c
testl %r12d, %r12d
jle 0x4b0b
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl $0x1, %r13d
xorl %ebp, %ebp
leaq 0x1(%rbp), %rax
movq %rax, 0x18(%rsp)
cmpq %r12, %rax
jae 0x4afe
movq %r13, %r14
movl $0x20, %edi
callq 0x3280
movq %rax, %r15
movq (%rsp), %rax
movq (%rax,%rbp,8), %rsi
movq (%rax,%r14,8), %rdx
movq %r15, %rdi
callq 0x39cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x47c2
incq %r14
cmpq %r14, %r12
jne 0x4aca
incq %r13
movq 0x18(%rsp), %rbp
cmpq %r12, %rbp
jne 0x4ab9
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4b21
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x18, %esi
movq %rbp, %rdi
jmp 0x4b4c
jmp 0x4b53
jmp 0x4b53
movq %rax, %r14
movl $0x20, %esi
movq %r15, %rdi
callq 0x3290
jmp 0x4b56
movq %rax, %r14
leaq 0x38(%rbx), %r15
leaq 0x70(%rbx), %r12
leaq 0xa8(%rbx), %r13
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4b7b
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq %r13, %rdi
callq 0x5246
movq %r12, %rdi
callq 0x51d6
movq %r15, %rdi
callq 0x52b6
movq %rbx, %rdi
callq 0x5326
movq %r14, %rdi
callq 0x34a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/graph.cpp
// Function: Graph::add_node(Node*)
void Graph::add_node(Node* n){
    /*!
     * @brief Ajoute le noeud \p n au graphe
     * 
     * @param n Le noeud
     * 
     */


    if(this->has_node(n))
        return;

    this->adjacency_lists.insert(
        std::pair<Node*, std::unordered_set<Edge*> >(
                                                        n,
                                                        std::unordered_set<Edge*>()
                                                    )
                                );
    
    n->set_id(this->node_counter);
    this->node_id_mapper.insert(std::pair<node_id_t, Node*>(this->node_counter++, n));

    
    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4c86
testb %al, %al
jne 0x4c5d
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, -0x30(%rax)
movaps %xmm0, -0x10(%rax)
movaps %xmm0, -0x20(%rax)
movq $0x0, (%rax)
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x48(%rsp), %r15
movq %rbx, -0x8(%r15)
movq %rsp, %rdx
movq %r15, %rdi
movq %rdx, %rsi
callq 0x53c0
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x630e
movq %r15, %rdi
callq 0x52b6
movq %rsp, %rdi
callq 0x52b6
movl 0xe0(%r14), %esi
movq %rbx, %rdi
callq 0xa34a
leaq 0x70(%r14), %rdi
movl 0xe0(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xe0(%r14)
leaq 0x40(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, 0x8(%rsi)
callq 0x56fe
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x52b6
movq %rsp, %rdi
callq 0x52b6
movq %rbx, %rdi
callq 0x34a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/graph.cpp
// Function: Graph::get_nodes()
std::vector<Node*> Graph::get_nodes()
{
    /*!
     * @brief Renvoie tous les noeuds du graphe (pointeurs)
     * 
     * @return Un vecteur avec les noeuds du graphe
     * 
     */

    std::vector<Node*> nodes;
    for (auto kv : this->adjacency_lists) {
        nodes.push_back(kv.first);
    }

    return nodes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x10(%rsi), %r13
testq %r13, %r13
je 0x4dbd
leaq 0x10(%rsp), %r14
xorl %ebp, %ebp
movq %rsp, %r15
leaq 0x8(%rsp), %r12
movq 0x8(%r13), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%r13), %rsi
movq %rbp, 0x10(%rsp)
movq 0x18(%r13), %rax
movq %rax, 0x18(%rsp)
movq %rbp, 0x20(%rsp)
movq 0x28(%r13), %rax
movq %rax, 0x28(%rsp)
movups 0x30(%r13), %xmm0
movups %xmm0, 0x20(%r14)
movq %rbp, 0x40(%rsp)
movq %r14, (%rsp)
movq %r14, %rdi
movq %r15, %rdx
callq 0x543a
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4da1
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x4dac
movq %rbx, %rdi
movq %r12, %rdx
callq 0x6bde
movq %r14, %rdi
callq 0x52b6
movq (%r13), %r13
testq %r13, %r13
jne 0x4d41
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x52b6
jmp 0x4ddf
movq %rax, %r15
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4df3
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x3290
movq %r15, %rdi
callq 0x34a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/graph.cpp
// Function: Graph::get_edges()
std::unordered_set<Edge*> Graph::get_edges()
{
    /*!
     * @brief Renvoie toutes les arêtes du graphe (pointeurs)
     * 
     * @return Un set non classé avec toutes les arêtes du graphe
     * 
     */

    return this->all_edges;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x38(%rsi), %rax
xorl %ecx, %ecx
movq %rcx, (%rdi)
movq 0x40(%rsi), %rdx
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq 0x50(%rsi), %rdx
movq %rdx, 0x18(%rdi)
movups 0x58(%rsi), %xmm0
movups %xmm0, 0x20(%rdi)
movq %rcx, 0x30(%rdi)
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
movq %rax, %rsi
callq 0x543a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/graph.cpp
// Function: Graph::get_any_node()
Node* Graph::get_any_node()
{
    /*!
     * @brief Renvoie un sommet au hasard dans les sommets du graphe
     * 
     * @return Un noeud au hasard
     * 
     */

    std::vector<Node*> nodes = this->get_nodes();
    int n = this->get_number_of_nodes();

    std::random_device rd; 
    std::mt19937 gen(rd());
    std::uniform_int_distribution<> distrib(0, n-1);

    int idx = distrib(gen);

    return nodes[idx];
}

// Assembly:
pushq %rbx
subq $0x2730, %rsp           # imm = 0x2730
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x4d06
movl 0x18(%rbx), %ebx
leaq 0x20(%rsp), %rdi
callq 0x4fcc
leaq 0x20(%rsp), %rdi
callq 0x3390
movl %eax, %eax
movq %rax, 0x13a8(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x13a8(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x4e86
leaq 0x13a8(%rsp), %rsi
movq $0x270, 0x1380(%rsi) # imm = 0x270
decl %ebx
leaq 0x18(%rsp), %rdi
movl $0x0, (%rdi)
movl %ebx, 0x4(%rdi)
movq %rdi, %rdx
callq 0x6cba
cltq
movq (%rsp), %rcx
movq (%rcx,%rax,8), %rbx
leaq 0x20(%rsp), %rdi
callq 0x3250
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4f00
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq %rbx, %rax
addq $0x2730, %rsp           # imm = 0x2730
popq %rbx
retq
jmp 0x4f1f
jmp 0x4f10
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3250
jmp 0x4f2a
movq %rax, %rdi
callq 0x5046
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4f40
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x34a0
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/node.cpp
// Function: Node::dist(Node*)
double Node::dist(Node* other)
{    
    /*!
     * @brief Returns the Euclidian distance between two Nodes
     * 
     * @param other The \p other Node to evaluate distance with
     * 
     * @return The Euclidian distance between this Node and the \p other Node
     * 
     */

    Point* p1_p = this->p;
    Point* p2_p = other->get_point();

    if (p1_p != NULL && p2_p != NULL) {
        if (p1_p->get_dim() == p2_p->get_dim()) {
            return p1_p->distance(p2_p);
        }
    }

    return 1; // arbitrary choice
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rbx
movq 0x8(%rsi), %r14
testq %rbx, %rbx
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x9715
movq %rbx, %rdi
callq 0x3a7c
movl %eax, %ebp
movq %r14, %rdi
callq 0x3a7c
cmpl %eax, %ebp
jne 0x9715
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3b3a
movsd 0x797b(%rip), %xmm0     # 0x11098
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/mst_algorithm.cpp
// Function: MSTAlgorithm::MSTAlgorithm(Graph*)
MSTAlgorithm::MSTAlgorithm(Graph* graph)
{
    /*!
     * @brief Constructor of a MST Algorithm
     * 
     * @param graph A pointer towards the graph of which we want to compute the MST
     * 
     */

    this->initial_graph = graph;
    this->mst_weight = 0.0;
    this->treated = false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc4f7(%rip), %rax      # 0x16c88
movq %rax, (%rdi)
addq $0x10, %rdi
callq 0x3ea4
movq %rbx, 0x8(%r14)
movq $0x0, 0xf8(%r14)
movb $0x0, 0x100(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/union_find.cpp
// Function: UnionFind::get_parent(Node*)
Node* UnionFind::get_parent(Node* node) 
{
    /*!
     * @brief Returns the parent of \p node in the data structure, if it exists
     * 
     * @param node Node of which we want the parent
     * 
     * @return NULL if the node is not part of the data structure, otherwise 
     * its parent
     * 
     */

    if(this->parent.find(node) == this->parent.end()) {
        return NULL;
    }
    return this->parent.at(node);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
movq (%rdi), %r8
movq 0x8(%rdi), %r9
xorl %r11d, %r11d
movq %rsi, %rax
xorl %edx, %edx
divq %r9
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0xdce5
movq (%rax), %r10
movq %rax, %r11
cmpq %rsi, 0x8(%r10)
je 0xdce5
movq %rdx, %rcx
movq %r10, %rbx
movq (%r10), %r10
testq %r10, %r10
je 0xdce2
movq 0x8(%r10), %r8
movq %r8, %rax
xorl %edx, %edx
divq %r9
movl $0x0, %r11d
cmpq %rcx, %rdx
jne 0xdce5
movq %rbx, %r11
cmpq %rsi, %r8
jne 0xdcb6
jmp 0xdce5
xorl %r11d, %r11d
testq %r11, %r11
je 0xdcff
cmpq $0x0, (%r11)
je 0xdcff
leaq 0x8(%rsp), %rsi
callq 0xa6b4
movq (%rax), %rax
jmp 0xdd01
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/union_find.cpp
// Function: UnionFind::get_rank(Node*)
int UnionFind::get_rank(Node* node)
{
    /*!
     * @brief Returns the rank of \p node in the data structure, if it exists
     * 
     * @param node Node of which we want the rank
     * 
     * @return 0 if the node is not part of the data structure, otherwise 
     * its rank
     * 
     */

    if(this->rank.find(node) == this->rank.end()) {
        return 0;
    }
    return this->rank.at(node);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
movq 0x38(%rdi), %r9
movq 0x40(%rdi), %r10
xorl %ecx, %ecx
movq %rsi, %rax
xorl %edx, %edx
divq %r10
movq %rdx, %r8
movq (%r9,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0xdd6e
movq (%rdx), %r11
movq %rdx, %rax
cmpq %rsi, 0x8(%r11)
je 0xdd6e
movq %r11, %rbx
movq (%r11), %r11
testq %r11, %r11
je 0xdd6c
movq 0x8(%r11), %r9
movq %r9, %rax
xorl %edx, %edx
divq %r10
movl $0x0, %eax
cmpq %r8, %rdx
jne 0xdd6e
movq %rbx, %rax
cmpq %rsi, %r9
jne 0xdd41
jmp 0xdd6e
xorl %eax, %eax
testq %rax, %rax
je 0xdd89
cmpq $0x0, (%rax)
je 0xdd89
addq $0x38, %rdi
leaq 0x8(%rsp), %rsi
callq 0x93cc
movl (%rax), %ecx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/union_find.cpp
// Function: UnionFind::get_representatives()
std::unordered_set<Node*> UnionFind::get_representatives()
{
    /*!
     * @brief Returns the representatives of components
     * 
     * @return A unordered set containing all the representatives left
     * 
     */

    return this->representatives;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x70(%rsi), %rax
xorl %ecx, %ecx
movq %rcx, (%rdi)
movq 0x78(%rsi), %rdx
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq 0x88(%rsi), %rdx
movq %rdx, 0x18(%rdi)
movups 0x90(%rsi), %xmm0
movups %xmm0, 0x20(%rdi)
movq %rcx, 0x30(%rdi)
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
movq %rax, %rsi
callq 0xdf24
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/union_find.cpp
// Function: UnionFind::Find(Node*)
Node* UnionFind::Find(Node* node)
{
    /*!
     * @brief For a \p node that belongs to the data structure, find its 
     * representative in the data structure using path compression
     * 
     * @param node Node of which we want the reprensentative
     * 
     * @return The representative of the initial node
     * 
     */

    assert(("This node is not part of the data structure", this->get_parent(node) != NULL));

    Node* parent = this->get_parent(node);

    if(node == parent) {
        return parent;
    }

    Node* r = this->Find(parent);
    this->parent[node] = r;
    return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
callq 0xdc82
testq %rax, %rax
je 0xde3b
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0xdc82
movq %rax, %r14
cmpq %rax, (%rsp)
je 0xde30
movq %rbx, %rdi
movq %r14, %rsi
callq 0xddea
movq %rax, %r14
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xe066
movq %r14, (%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3a3c(%rip), %rdi      # 0x1187e
leaq 0x3a85(%rip), %rsi      # 0x118ce
leaq 0x3a91(%rip), %rcx      # 0x118e1
movl $0x65, %edx
callq 0x3170
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/union_find.cpp
// Function: UnionFind::Union(Node*, Node*)
void UnionFind::Union(Node* n1, Node* n2)
{
    /*!
     * @brief For two nodes \p n1 and \p n2 of the data structure, computes 
     * the union of their two classes 
     * 
     * @param n1 First node 
     * @param n2 Second node
     * 
     */

    Node* rep1 = this->Find(n1);
    Node* rep2 = this->Find(n2);

    if(rep1 != rep2) {
        this->num_classes -= 1; // proceeding with Union

        int r1 = this->get_rank(rep1);
        int r2 = this->get_rank(rep2);

        if(r1 > r2) {
            this->parent[rep2] = rep1;
            this->representatives.erase(rep2);
        } else if(r2 > r1) {
            this->parent[rep1] = rep2;
            this->representatives.erase(rep1);
        } else { // arbitrary choice
            this->parent[rep1] = rep2;
            this->representatives.erase(rep1);
            this->rank[rep2] += 1;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
callq 0xddea
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xddea
movq %rax, (%rsp)
movq 0x8(%rsp), %rsi
cmpq %rax, %rsi
je 0xdf16
decl 0xa8(%rbx)
movq %rbx, %rdi
callq 0xdd08
movl %eax, %ebp
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0xdd08
cmpl %eax, %ebp
jle 0xdeda
movq 0x8(%rsp), %r15
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe066
movq %r15, (%rax)
addq $0x70, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe10c
jmp 0xdf16
movl %eax, %r14d
movq (%rsp), %r12
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe066
movq %r12, (%rax)
leaq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0xe10c
cmpl %ebp, %r14d
jg 0xdf16
addq $0x38, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xe1f2
incl (%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/kmeans.cpp
// Function: Cloud::Cloud(int, int, int)
Cloud::Cloud(int _d, int _nmax, int _k)	
{
    /*!
     * @brief Builds an empty cloud
     * 
     * @param _d The dimension of the points
	 * @param _nmax The maximal number of points in this cloud
	 * @param _k The number of clusters to be drawn
     */

	d = _d;
	Point::d = _d;
	n = 0;
	k = _k;

	nmax = _nmax;

	points = new Point[nmax];
	centers = new Point[k];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, (%rdi)
leaq 0x8ff5(%rip), %rax      # 0x172a8
movl %esi, (%rax)
movl $0x0, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movl %edx, 0xc(%rdi)
movslq %edx, %r12
movq %r12, %r13
shlq $0x4, %r13
leaq 0x8(%r13), %r14
testl %r12d, %r12d
movq $-0x1, %rax
cmovsq %rax, %r14
movq %r14, %rdi
callq 0x3030
leaq 0x8(%rax), %r15
movq %rax, (%rsp)
movq %r12, (%rax)
testl %r12d, %r12d
je 0xe313
negq %r13
xorl %ebp, %ebp
movq %r15, %r12
movq %r12, %rdi
callq 0x3a20
addq $-0x10, %rbp
addq $0x10, %r12
cmpq %rbp, %r13
jne 0xe2fe
movq %r15, 0x10(%rbx)
movslq 0x8(%rbx), %r12
movq %r12, %rbp
shlq $0x4, %rbp
leaq 0x8(%rbp), %r14
testq %r12, %r12
movq $-0x1, %rax
cmovsq %rax, %r14
movq %r14, %rdi
callq 0x3030
leaq 0x8(%rax), %r15
movq %rax, (%rsp)
movq %r12, (%rax)
testq %r12, %r12
je 0xe36a
negq %rbp
xorl %r13d, %r13d
movq %r15, %r12
movq %r12, %rdi
callq 0x3a20
addq $-0x10, %r13
addq $0x10, %r12
cmpq %r13, %rbp
jne 0xe355
movq %r15, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
testq %r13, %r13
je 0xe3c3
negq %r13
movq (%rsp), %r15
addq $-0x8, %r15
leaq (%r15,%r13), %rdi
callq 0x3a6e
addq $-0x10, %r13
jne 0xe390
jmp 0xe3c3
movq %rax, %rbx
testq %rbp, %rbp
je 0xe3c3
negq %rbp
movq (%rsp), %r15
addq $-0x8, %r15
leaq (%r15,%rbp), %rdi
callq 0x3a6e
addq $-0x10, %rbp
jne 0xe3b4
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x3500
movq %rbx, %rdi
callq 0x34a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/kmeans.cpp
// Function: Cloud::add_point(Point&, int)
void Cloud::add_point(Point &p, int label)
{
    /*!
     * @brief Adds a point in the cloud by copying its values
     * 
     * @param p The point to be added
	 * @param label A label to give to this point
     */

	assert(("Too much points!", n < nmax));
	assert(("No center to assign to this point!", label<k));

	for(int m = 0; m < d; m++)
	{
		points[n].coords[m] = p.coords[m];
	}

	points[n].label = label;

	n++;
}

// Assembly:
pushq %rax
movslq 0x4(%rdi), %rax
cmpl 0xc(%rdi), %eax
jge 0xe4d6
cmpl %edx, 0x8(%rdi)
jle 0xe4f5
movslq (%rdi), %rcx
testq %rcx, %rcx
jle 0xe4c0
movq (%rsi), %rsi
movq 0x10(%rdi), %r8
movq %rax, %r9
shlq $0x4, %r9
movq (%r8,%r9), %r8
xorl %r9d, %r9d
movsd (%rsi,%r9,8), %xmm0
movsd %xmm0, (%r8,%r9,8)
incq %r9
cmpq %r9, %rcx
jne 0xe4ac
movq 0x10(%rdi), %rcx
movq %rax, %rsi
shlq $0x4, %rsi
movl %edx, 0x8(%rcx,%rsi)
incl %eax
movl %eax, 0x4(%rdi)
popq %rax
retq
leaq 0x342b(%rip), %rdi      # 0x11908
leaq 0x3443(%rip), %rsi      # 0x11927
leaq 0x344b(%rip), %rcx      # 0x11936
movl $0x2b, %edx
callq 0x3170
leaq 0x345e(%rip), %rdi      # 0x1195a
leaq 0x3424(%rip), %rsi      # 0x11927
leaq 0x342c(%rip), %rcx      # 0x11936
movl $0x2c, %edx
callq 0x3170
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/kmeans.cpp
// Function: Cloud::intracluster_variance()
double Cloud::intracluster_variance()
{
    /*!
     * @brief Computes the intracluster variance in this cloud
     * 
     * @return The intracluster variance
     */

	double intraclusterVar = 0.0;
	for(int i = 0; i < this->n; i ++){
		intraclusterVar += points[i].distance(&(centers[points[i].label]));
	}
	if (n > 0) {
		intraclusterVar /= n;
	}

	return intraclusterVar;
}

// Assembly:
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0xe5c9
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm1, %xmm1
xorl %r14d, %r14d
xorl %r15d, %r15d
movsd %xmm1, 0x8(%rsp)
movq 0x10(%rbx), %rdi
movslq 0x8(%rdi,%r14), %rsi
addq %r14, %rdi
shlq $0x4, %rsi
addq 0x18(%rbx), %rsi
callq 0x3b3a
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
incq %r15
movslq 0x4(%rbx), %rax
addq $0x10, %r14
cmpq %rax, %r15
jl 0xe585
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe5cd
xorpd %xmm1, %xmm1
testl %eax, %eax
jle 0xe5dc
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/kmeans.cpp
// Function: Cloud::set_voronoi_labels()
int Cloud::set_voronoi_labels()
{
    /*!
     * @brief E-step in the kmeans algorithm
     */

	int changedLabels = 0;

	for (int i = 0; i < this->n; i ++){
		int pointLabel = points[i].label;
		int newLabel = points[i].label;
		double minDist = points[i].distance(&(centers[pointLabel]));

		for (int j = 0; j < this->k; j ++){
			double dist = points[i].distance(&(centers[j]));
			if (dist < minDist || (dist == minDist && j < newLabel)) {
				minDist = dist;
				newLabel = j;
			}
		}

		if (newLabel != pointLabel){
			points[i].label = newLabel;
			changedLabels += 1;
		}
	}
	
	return changedLabels;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x4(%rdi)
jle 0xe6c7
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x0, 0x4(%rsp)
movq 0x10(%rbx), %rdi
movq %r14, %r15
shlq $0x4, %r15
movslq 0x8(%rdi,%r15), %r12
addq %r15, %rdi
movq %r12, %rsi
shlq $0x4, %rsi
addq 0x18(%rbx), %rsi
callq 0x3b3a
cmpl $0x0, 0x8(%rbx)
movq %r12, 0x8(%rsp)
movl %r12d, %r13d
jle 0xe6a1
movapd %xmm0, %xmm1
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
movl %eax, %r13d
movsd %xmm1, 0x10(%rsp)
movq 0x10(%rbx), %rdi
addq %r15, %rdi
movq 0x18(%rbx), %rsi
addq %rbp, %rsi
callq 0x3b3a
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0xe68a
ucomisd %xmm1, %xmm0
setnp %al
sete %cl
andb %al, %cl
movslq %r13d, %rax
cmpq %rax, %r12
setl %al
andb %cl, %al
cmpb $0x1, %al
jne 0xe691
movl %r12d, %r13d
movapd %xmm0, %xmm1
incq %r12
movslq 0x8(%rbx), %rax
addq $0x10, %rbp
cmpq %rax, %r12
jl 0xe64a
cmpl 0x8(%rsp), %r13d
je 0xe6b5
movq 0x10(%rbx), %rax
movl %r13d, 0x8(%rax,%r15)
incl 0x4(%rsp)
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0xe608
jmp 0xe6cf
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sebastienmeyer2[P]mst-clustering/src/kmeans.cpp
// Function: Cloud::kmeans()
void Cloud::kmeans()
{
	/*!
     * @brief Computes the kmeans algorithm on this cloud. It is possible 
	 * to select different initializations for the centers, within bounding 
	 * box, forgy, plusplus and random partition. 
     */

	std::cout << "\nComputing clustering using kmeans...";

	// init_bounding_box();
	init_forgy(); 
	// init_plusplus(); 
	// init_random_partition();

	// running Lloyd's heuristics
	int changesMade = 0;
	do {
		changesMade = set_voronoi_labels();
		set_centroid_centers();
	} while (changesMade > 0);
	
	std::cout << "[OK]" << std::endl;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x86d8(%rip), %rbx      # 0x16fb8
leaq 0x30a3(%rip), %rsi      # 0x1198a
movl $0x25, %edx
movq %rbx, %rdi
callq 0x32d0
movq %r14, %rdi
callq 0xe952
movq %r14, %rdi
callq 0xe5e2
movl %eax, %ebp
movq %r14, %rdi
callq 0xe6e2
testl %ebp, %ebp
jg 0xe8fc
leaq 0x2e3a(%rip), %rsi      # 0x11753
movl $0x4, %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
popq %rbx
popq %r14
popq %rbp
jmp 0x31a0
nop