LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x1cf65(%rip), %rdi     # 0x4ffb0
leaq 0x4afc(%rip), %rsi      # 0x37b4e
callq 0xa780
movq -0x18(%rbp), %rdi
callq 0x330b0
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rdi
callq 0x32b50
movq -0x18(%rbp), %rdi
movl %eax, -0xc(%rbp)
callq 0x32ca0
cmpl $0x0, -0xc(%rbp)
jg 0x33067
movq 0x1cf27(%rip), %rdi     # 0x4ffb0
leaq 0x4818(%rip), %rsi      # 0x378a8
callq 0xa780
movq %rax, %rdi
movq 0x1cee9(%rip), %rsi     # 0x4ff88
callq 0xa7e0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: sebastienmeyer2[P]mst-clustering/src/kmeans.cpp
// Function: Cloud::init_random_partition()
void Cloud::init_random_partition()
{
    /*!
     * @brief Initializes the centers of this cloud using random partitions,
	 * ie builds centers as the centers of random partitions of the data points
     */

	// random labelization of data points
	int randomCenter = 0;
	for (int i = 0; i < this->n; i ++){
		randomCenter = rand() % this->k;
		points[i].label = randomCenter;
	}

	// centers will be centroids of this partition
	this->set_centroid_centers();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x33a22
callq 0xa1c0
movq -0x18(%rbp), %rcx
cltd
idivl 0x8(%rcx)
movq -0x18(%rbp), %rax
movl %edx, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x339e2
movq -0x18(%rbp), %rdi
callq 0x32ca0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kallaballa[P]PixelStencil/PixelStencil.cpp
// Function: kallaballa::SVGStencil::writePixel(unsigned long, unsigned long)
void SVGStencil::writePixel(size_t x, size_t y) {
	this->ofs << "<rect" << std::endl;
	this->ofs << "width=\"" << pixelWidthPix << "\"" << std::endl;
	this->ofs << "height=\"" << pixelWidthPix << "\"" << std::endl;
	this->ofs << "x=\"" << boardMarginPix + pixelWidthPix * x + pixelMarginPix * x << "\"" << std::endl;
	this->ofs << "y=\"" << boardMarginPix + pixelWidthPix * y + pixelMarginPix * y << "\"" << std::endl;
	this->ofs << "id=\"" << pixelID++ << "\"" << std::endl;
	this->ofs << "style=\"fill:none;stroke:#ff0000;stroke-width:0.09;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none\" />" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x8, %rdi
leaq 0x3d028(%rip), %rsi     # 0x4234f
callq 0x4350
movq %rax, %rdi
movq 0x4ac7a(%rip), %rsi     # 0x4ffb0
callq 0x43b0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3cfd9(%rip), %rsi     # 0x42323
callq 0x4350
movq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x230(%rax), %rsi
callq 0x40b0
movq %rax, %rdi
leaq 0x3eaf1(%rip), %rsi     # 0x43e5d
callq 0x4350
movq %rax, %rdi
movq 0x4ac35(%rip), %rsi     # 0x4ffb0
callq 0x43b0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3cf9c(%rip), %rsi     # 0x4232b
callq 0x4350
movq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x230(%rax), %rsi
callq 0x40b0
movq %rax, %rdi
leaq 0x3eaac(%rip), %rsi     # 0x43e5d
callq 0x4350
movq %rax, %rdi
movq 0x4abf0(%rip), %rsi     # 0x4ffb0
callq 0x43b0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3d036(%rip), %rsi     # 0x4240a
callq 0x4350
movq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x240(%rax), %rsi
movq 0x230(%rax), %rcx
imulq -0x10(%rbp), %rcx
addq %rcx, %rsi
movq 0x238(%rax), %rax
imulq -0x10(%rbp), %rax
addq %rax, %rsi
callq 0x40b0
movq %rax, %rdi
leaq 0x3ea49(%rip), %rsi     # 0x43e5d
callq 0x4350
movq %rax, %rdi
movq 0x4ab8d(%rip), %rsi     # 0x4ffb0
callq 0x43b0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3cfd9(%rip), %rsi     # 0x42410
callq 0x4350
movq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x240(%rax), %rsi
movq 0x230(%rax), %rcx
imulq -0x18(%rbp), %rcx
addq %rcx, %rsi
movq 0x238(%rax), %rax
imulq -0x18(%rbp), %rax
addq %rax, %rsi
callq 0x40b0
movq %rax, %rdi
leaq 0x3e9e6(%rip), %rsi     # 0x43e5d
callq 0x4350
movq %rax, %rdi
movq 0x4ab2a(%rip), %rsi     # 0x4ffb0
callq 0x43b0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3cfbf(%rip), %rsi     # 0x42459
callq 0x4350
movq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x258(%rax), %rsi
movq %rsi, %rcx
addq $0x1, %rcx
movq %rcx, 0x258(%rax)
callq 0x40b0
movq %rax, %rdi
leaq 0x3e993(%rip), %rsi     # 0x43e5d
callq 0x4350
movq %rax, %rdi
movq 0x4aad7(%rip), %rsi     # 0x4ffb0
callq 0x43b0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
leaq 0x3ce7c(%rip), %rsi     # 0x42369
callq 0x4350
movq %rax, %rdi
movq 0x4aab4(%rip), %rsi     # 0x4ffb0
callq 0x43b0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: std::pair<KDTree::_Iterator<kallaballa::NamedColor, kallaballa::NamedColor const&, kallaballa::NamedColor const*>, double> KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::find_nearest<kallaballa::NamedColor>(kallaballa::NamedColor const&) const
std::pair<const_iterator, distance_type>
      find_nearest (SearchVal const& __val) const
      {
	if (_M_get_root())
	  {
	    std::pair<const _Node<_Val>*,
	      std::pair<size_type, typename _Acc::result_type> >
	      best = _S_node_nearest (__K, 0, __val,
				      _M_get_root(), &_M_header, _M_get_root(),
				      std::sqrt(_S_accumulate_node_distance
				      (__K, _M_dist, _M_acc, _M_get_root()->_M_value, __val)),
				      _M_cmp, _M_acc, _M_dist,
				      always_true<value_type>());
	    return std::pair<const_iterator, distance_type>
	      (best.first, best.second.second);
	  }
	  return std::pair<const_iterator, distance_type>(end(), 0);
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xa8, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x3ede0
cmpq $0x0, %rax
je 0x6343
movq -0x58(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
callq 0x3ede0
movq -0x58(%rbp), %rdi
movq %rax, -0x78(%rbp)
movq %rdi, %rax
addq $0x10, %rax
movq %rax, -0x70(%rbp)
callq 0x3ede0
movq -0x58(%rbp), %rdi
movq %rax, %rbx
movq %rdi, %rax
addq $0x39, %rax
movq %rax, -0x90(%rbp)
movq %rdi, %rax
addq $0x30, %rax
movq %rax, -0x88(%rbp)
callq 0x3ede0
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %rax, %rcx
addq $0x18, %rcx
movq -0x20(%rbp), %r8
movl $0x3, %edi
callq 0x3f410
callq 0x42a0
movq -0x58(%rbp), %rax
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %r8
movq -0x70(%rbp), %r9
movq %rax, %r11
addq $0x38, %r11
movq %rax, %r10
addq $0x30, %r10
addq $0x39, %rax
leaq -0x38(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x3ee00
movq -0x68(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x38(%rbp), %rdx
addq $0x8, %rdx
addq $0x8, %rdx
callq 0x3f4c0
jmp 0x6368
movq -0x58(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x3f500
movq -0x68(%rbp), %rdi
movl $0x0, -0x4c(%rbp)
leaq -0x48(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
callq 0x3f530
movq -0x60(%rbp), %rax
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::_M_empty_initialise()
void _M_empty_initialise()
      {
        _M_set_leftmost(&_M_header);
        _M_set_rightmost(&_M_header);
	_M_header._M_parent = NULL;
        _M_set_root(NULL);
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movq %rdi, %rsi
addq $0x10, %rsi
callq 0x7130
movq -0x10(%rbp), %rdi
movq %rdi, %rsi
addq $0x10, %rsi
callq 0x7150
movq -0x10(%rbp), %rdi
movq $0x0, 0x10(%rdi)
xorl %eax, %eax
movl %eax, %esi
callq 0x7170
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::clear()
void
      clear()
      {
        _M_erase_subtree(_M_get_root());
        _M_set_leftmost(&_M_header);
        _M_set_rightmost(&_M_header);
        _M_set_root(NULL);
        _M_count = 0;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x75a0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x7540
movq -0x10(%rbp), %rdi
movq %rdi, %rsi
addq $0x10, %rsi
callq 0x7130
movq -0x10(%rbp), %rdi
movq %rdi, %rsi
addq $0x10, %rsi
callq 0x7150
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x7170
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::_M_erase_subtree(KDTree::_Node<kallaballa::NamedColor>*)
void
      _M_erase_subtree(_Link_type __n)
      {
        while (__n)
          {
            _M_erase_subtree(_S_right(__n));
            _Link_type __t = _S_left(__n);
            _M_delete_node(__n);
            __n = __t;
          }
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7598
movq -0x10(%rbp), %rdi
callq 0x75c0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x7540
movq -0x10(%rbp), %rdi
callq 0x75e0
movq -0x20(%rbp), %rdi
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rsi
callq 0x7600
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x7558
addq $0x20, %rsp
popq %rbp
retq
nop
// File: kallaballa[P]PixelStencil/./CImg.h
// Function: cimg_library::cimg::filenamerand()
inline const char* filenamerand() {
      static char randomid[9] = { 0,0,0,0,0,0,0,0,0 };
      cimg::srand();
      for (unsigned int k = 0; k<8; ++k) {
        const int v = (int)std::rand()%3;
        randomid[k] = (char)(v==0?('0'+(std::rand()%10)):(v==1?('a'+(std::rand()%26)):('A'+(std::rand()%26))));
      }
      return randomid;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xd320
movl $0x0, -0x4(%rbp)
cmpl $0x8, -0x4(%rbp)
jae 0xd305
callq 0x40d0
movl $0x3, %ecx
cltd
idivl %ecx
movl %edx, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0xd2ab
callq 0x40d0
movl $0xa, %ecx
cltd
idivl %ecx
movl %edx, %eax
addl $0x30, %eax
movl %eax, -0xc(%rbp)
jmp 0xd2e3
cmpl $0x1, -0x8(%rbp)
jne 0xd2c8
callq 0x40d0
movl $0x1a, %ecx
cltd
idivl %ecx
movl %edx, %eax
addl $0x61, %eax
movl %eax, -0x10(%rbp)
jmp 0xd2dd
callq 0x40d0
movl $0x1a, %ecx
cltd
idivl %ecx
movl %edx, %eax
addl $0x41, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movb %al, %dl
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x430f4(%rip), %rax     # 0x503e8
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xd274
leaq 0x430dc(%rip), %rax     # 0x503e8
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: kallaballa[P]PixelStencil/./CImg.h
// Function: cimg_library::cimg::srand()
inline void srand() {
      static bool is_first_time = true;
      if (is_first_time) {
        const unsigned int t = (unsigned int)cimg::time();
#if cimg_OS==1
        std::srand(t+(unsigned int)getpid());
#elif cimg_OS==2
        std::srand(t+(unsigned int)_getpid());
#else
        std::srand(t);
#endif
        is_first_time = false;
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testb $0x1, 0x43071(%rip)     # 0x503a0
je 0xd355
callq 0xd360
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
callq 0x4520
movl -0x8(%rbp), %edi
addl %eax, %edi
callq 0x4330
movb $0x0, 0x4304b(%rip)     # 0x503a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: kallaballa[P]PixelStencil/./CImg.h
// Function: cimg_library::cimg::curl_path(char const*, bool)
inline const char *curl_path(const char *const user_path=0, const bool reinit_path=false) {
      static char *st_path = 0;
      if (reinit_path) { delete[] st_path; st_path = 0; }
      if (user_path) {
        if (!st_path) st_path = new char[1024];
        std::memset(st_path,0,1024);
        std::strncpy(st_path,user_path,1023);
      } else if (!st_path) {
        st_path = new char[1024];
        std::memset(st_path,0,1024);
        bool path_found = false;
        std::FILE *file = 0;
#if cimg_OS==2
        if (!path_found) {
          std::strcpy(st_path,".\\curl.exe");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"curl.exe");
#else
        if (!path_found) {
          std::strcpy(st_path,"./curl");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"curl");
#endif
        winformat_string(st_path);
      }
      return st_path;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0xd41f
movq 0x42ff7(%rip), %rax     # 0x503f8
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xd414
movq -0x20(%rbp), %rdi
callq 0x4490
movq $0x0, 0x42fd9(%rip) # 0x503f8
cmpq $0x0, -0x8(%rbp)
je 0xd46e
cmpq $0x0, 0x42fca(%rip)     # 0x503f8
jne 0xd441
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x42fb7(%rip)     # 0x503f8
movq 0x42fb0(%rip), %rdi     # 0x503f8
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movq 0x42f9d(%rip), %rdi     # 0x503f8
movq -0x8(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x41a0
jmp 0xd518
cmpq $0x0, 0x42f82(%rip)     # 0x503f8
jne 0xd516
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x42f6b(%rip)     # 0x503f8
movq 0x42f64(%rip), %rdi     # 0x503f8
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movb $0x0, -0xa(%rbp)
movq $0x0, -0x18(%rbp)
testb $0x1, -0xa(%rbp)
jne 0xd4f1
movq 0x42f3f(%rip), %rdi     # 0x503f8
leaq 0x3597d(%rip), %rsi     # 0x42e3d
callq 0x4320
movq 0x42f2c(%rip), %rdi     # 0x503f8
leaq 0x3520d(%rip), %rsi     # 0x426e0
callq 0x4450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd4ef
movq -0x18(%rbp), %rdi
callq 0xd0a0
movb $0x1, -0xa(%rbp)
jmp 0xd4f1
testb $0x1, -0xa(%rbp)
jne 0xd50a
movq 0x42efa(%rip), %rdi     # 0x503f8
leaq 0x3593a(%rip), %rsi     # 0x42e3f
callq 0x4320
movq 0x42ee7(%rip), %rdi     # 0x503f8
callq 0xd130
jmp 0xd518
movq 0x42ed9(%rip), %rax     # 0x503f8
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: kallaballa[P]PixelStencil/./CImg.h
// Function: cimg_library::cimg::wget_path(char const*, bool)
inline const char *wget_path(const char *const user_path=0, const bool reinit_path=false) {
      static char *st_path = 0;
      if (reinit_path) { delete[] st_path; st_path = 0; }
      if (user_path) {
        if (!st_path) st_path = new char[1024];
        std::memset(st_path,0,1024);
        std::strncpy(st_path,user_path,1023);
      } else if (!st_path) {
        st_path = new char[1024];
        std::memset(st_path,0,1024);
        bool path_found = false;
        std::FILE *file = 0;
#if cimg_OS==2
        if (!path_found) {
          std::strcpy(st_path,".\\wget.exe");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"wget.exe");
#else
        if (!path_found) {
          std::strcpy(st_path,"./wget");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"wget");
#endif
        winformat_string(st_path);
      }
      return st_path;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0xd58f
movq 0x42e8f(%rip), %rax     # 0x50400
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xd584
movq -0x20(%rbp), %rdi
callq 0x4490
movq $0x0, 0x42e71(%rip) # 0x50400
cmpq $0x0, -0x8(%rbp)
je 0xd5de
cmpq $0x0, 0x42e62(%rip)     # 0x50400
jne 0xd5b1
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x42e4f(%rip)     # 0x50400
movq 0x42e48(%rip), %rdi     # 0x50400
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movq 0x42e35(%rip), %rdi     # 0x50400
movq -0x8(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x41a0
jmp 0xd688
cmpq $0x0, 0x42e1a(%rip)     # 0x50400
jne 0xd686
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x42e03(%rip)     # 0x50400
movq 0x42dfc(%rip), %rdi     # 0x50400
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movb $0x0, -0xa(%rbp)
movq $0x0, -0x18(%rbp)
testb $0x1, -0xa(%rbp)
jne 0xd661
movq 0x42dd7(%rip), %rdi     # 0x50400
leaq 0x35814(%rip), %rsi     # 0x42e44
callq 0x4320
movq 0x42dc4(%rip), %rdi     # 0x50400
leaq 0x3509d(%rip), %rsi     # 0x426e0
callq 0x4450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd65f
movq -0x18(%rbp), %rdi
callq 0xd0a0
movb $0x1, -0xa(%rbp)
jmp 0xd661
testb $0x1, -0xa(%rbp)
jne 0xd67a
movq 0x42d92(%rip), %rdi     # 0x50400
leaq 0x357d1(%rip), %rsi     # 0x42e46
callq 0x4320
movq 0x42d7f(%rip), %rdi     # 0x50400
callq 0xd130
jmp 0xd688
movq 0x42d71(%rip), %rax     # 0x50400
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: kallaballa[P]PixelStencil/./CImg.h
// Function: cimg_library::cimg::gunzip_path(char const*, bool)
inline const char *gunzip_path(const char *const user_path=0, const bool reinit_path=false) {
      static char *st_path = 0;
      if (reinit_path) { delete[] st_path; st_path = 0; }
      if (user_path) {
        if (!st_path) st_path = new char[1024];
        std::memset(st_path,0,1024);
        std::strncpy(st_path,user_path,1023);
      } else if (!st_path) {
        st_path = new char[1024];
        std::memset(st_path,0,1024);
        bool path_found = false;
        std::FILE *file = 0;
#if cimg_OS==2
        if (!path_found) {
          std::strcpy(st_path,".\\gunzip.exe");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"gunzip.exe");
#else
        if (!path_found) {
          std::strcpy(st_path,"./gunzip");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"gunzip");
#endif
        winformat_string(st_path);
      }
      return st_path;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0xd6df
movq 0x42d47(%rip), %rax     # 0x50408
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xd6d4
movq -0x20(%rbp), %rdi
callq 0x4490
movq $0x0, 0x42d29(%rip) # 0x50408
cmpq $0x0, -0x8(%rbp)
je 0xd72e
cmpq $0x0, 0x42d1a(%rip)     # 0x50408
jne 0xd701
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x42d07(%rip)     # 0x50408
movq 0x42d00(%rip), %rdi     # 0x50408
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movq 0x42ced(%rip), %rdi     # 0x50408
movq -0x8(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x41a0
jmp 0xd7d8
cmpq $0x0, 0x42cd2(%rip)     # 0x50408
jne 0xd7d6
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x42cbb(%rip)     # 0x50408
movq 0x42cb4(%rip), %rdi     # 0x50408
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movb $0x0, -0xa(%rbp)
movq $0x0, -0x18(%rbp)
testb $0x1, -0xa(%rbp)
jne 0xd7b1
movq 0x42c8f(%rip), %rdi     # 0x50408
leaq 0x356cb(%rip), %rsi     # 0x42e4b
callq 0x4320
movq 0x42c7c(%rip), %rdi     # 0x50408
leaq 0x34f4d(%rip), %rsi     # 0x426e0
callq 0x4450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xd7af
movq -0x18(%rbp), %rdi
callq 0xd0a0
movb $0x1, -0xa(%rbp)
jmp 0xd7b1
testb $0x1, -0xa(%rbp)
jne 0xd7ca
movq 0x42c4a(%rip), %rdi     # 0x50408
leaq 0x35688(%rip), %rsi     # 0x42e4d
callq 0x4320
movq 0x42c37(%rip), %rdi     # 0x50408
callq 0xd130
jmp 0xd7d8
movq 0x42c29(%rip), %rax     # 0x50408
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: kallaballa[P]PixelStencil/./CImg.h
// Function: cimg_library::cimg::dcraw_path(char const*, bool)
inline const char *dcraw_path(const char *const user_path=0, const bool reinit_path=false) {
      static char *st_path = 0;
      if (reinit_path) { delete[] st_path; st_path = 0; }
      if (user_path) {
        if (!st_path) st_path = new char[1024];
        std::memset(st_path,0,1024);
        std::strncpy(st_path,user_path,1023);
      } else if (!st_path) {
        st_path = new char[1024];
        std::memset(st_path,0,1024);
        bool path_found = false;
        std::FILE *file = 0;
#if cimg_OS==2
        if (!path_found) {
          std::strcpy(st_path,".\\dcraw.exe");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"dcraw.exe");
#else
        if (!path_found) {
          std::strcpy(st_path,"./dcraw");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"dcraw");
#endif
        winformat_string(st_path);
      }
      return st_path;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0x232af
movq 0x2d27f(%rip), %rax     # 0x50510
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x232a4
movq -0x20(%rbp), %rdi
callq 0x4490
movq $0x0, 0x2d261(%rip) # 0x50510
cmpq $0x0, -0x8(%rbp)
je 0x232fe
cmpq $0x0, 0x2d252(%rip)     # 0x50510
jne 0x232d1
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x2d23f(%rip)     # 0x50510
movq 0x2d238(%rip), %rdi     # 0x50510
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movq 0x2d225(%rip), %rdi     # 0x50510
movq -0x8(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x41a0
jmp 0x233a8
cmpq $0x0, 0x2d20a(%rip)     # 0x50510
jne 0x233a6
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x2d1f3(%rip)     # 0x50510
movq 0x2d1ec(%rip), %rdi     # 0x50510
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movb $0x0, -0xa(%rbp)
movq $0x0, -0x18(%rbp)
testb $0x1, -0xa(%rbp)
jne 0x23381
movq 0x2d1c7(%rip), %rdi     # 0x50510
leaq 0x20b90(%rip), %rsi     # 0x43ee0
callq 0x4320
movq 0x2d1b4(%rip), %rdi     # 0x50510
leaq 0x1f37d(%rip), %rsi     # 0x426e0
callq 0x4450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x2337f
movq -0x18(%rbp), %rdi
callq 0xd0a0
movb $0x1, -0xa(%rbp)
jmp 0x23381
testb $0x1, -0xa(%rbp)
jne 0x2339a
movq 0x2d182(%rip), %rdi     # 0x50510
leaq 0x20b4d(%rip), %rsi     # 0x43ee2
callq 0x4320
movq 0x2d16f(%rip), %rdi     # 0x50510
callq 0xd130
jmp 0x233a8
movq 0x2d161(%rip), %rax     # 0x50510
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: kallaballa[P]PixelStencil/./CImg.h
// Function: cimg_library::cimg::ffmpeg_path(char const*, bool)
inline const char *ffmpeg_path(const char *const user_path=0, const bool reinit_path=false) {
      static char *st_path = 0;
      if (reinit_path) { delete[] st_path; st_path = 0; }
      if (user_path) {
        if (!st_path) st_path = new char[1024];
        std::memset(st_path,0,1024);
        std::strncpy(st_path,user_path,1023);
      } else if (!st_path) {
        st_path = new char[1024];
        std::memset(st_path,0,1024);
        bool path_found = false;
        std::FILE *file = 0;
#if cimg_OS==2
        if (!path_found) {
          std::strcpy(st_path,".\\ffmpeg.exe");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"ffmpeg.exe");
#else
        if (!path_found) {
          std::strcpy(st_path,"./ffmpeg");
          if ((file=std::fopen(st_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(st_path,"ffmpeg");
#endif
        winformat_string(st_path);
      }
      return st_path;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0x3c00f
movq 0x14577(%rip), %rax     # 0x50568
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3c004
movq -0x20(%rbp), %rdi
callq 0x4490
movq $0x0, 0x14559(%rip) # 0x50568
cmpq $0x0, -0x8(%rbp)
je 0x3c05e
cmpq $0x0, 0x1454a(%rip)     # 0x50568
jne 0x3c031
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x14537(%rip)     # 0x50568
movq 0x14530(%rip), %rdi     # 0x50568
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movq 0x1451d(%rip), %rdi     # 0x50568
movq -0x8(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x41a0
jmp 0x3c108
cmpq $0x0, 0x14502(%rip)     # 0x50568
jne 0x3c106
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x144eb(%rip)     # 0x50568
movq 0x144e4(%rip), %rdi     # 0x50568
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x41c0
movb $0x0, -0xa(%rbp)
movq $0x0, -0x18(%rbp)
testb $0x1, -0xa(%rbp)
jne 0x3c0e1
movq 0x144bf(%rip), %rdi     # 0x50568
leaq 0x8e64(%rip), %rsi      # 0x44f14
callq 0x4320
movq 0x144ac(%rip), %rdi     # 0x50568
leaq 0x661d(%rip), %rsi      # 0x426e0
callq 0x4450
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x3c0df
movq -0x18(%rbp), %rdi
callq 0xd0a0
movb $0x1, -0xa(%rbp)
jmp 0x3c0e1
testb $0x1, -0xa(%rbp)
jne 0x3c0fa
movq 0x1447a(%rip), %rdi     # 0x50568
leaq 0x8e21(%rip), %rsi      # 0x44f16
callq 0x4320
movq 0x14467(%rip), %rdi     # 0x50568
callq 0xd130
jmp 0x3c108
movq 0x14459(%rip), %rax     # 0x50568
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: kallaballa[P]PixelStencil/NamedColorTable.cpp
// Function: kallaballa::colorComponent(kallaballa::NamedColor const&, int const&)
double colorComponent(const NamedColor& color, const int& k) {
  if(k == 0)
    return color.rgb & 0x0000ff;
  else if(k == 1)
    return (color.rgb & 0x00ff00) >> 8;
  else
    return (color.rgb & 0xff0000) >> 16;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3f907
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3f934
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x3f923
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3f934
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopl (%rax,%rax)
// File: kallaballa[P]PixelStencil/NamedColorTable.cpp
// Function: kallaballa::getNextLineAndSplitIntoTokens[abi:cxx11](std::istream&)
std::vector<string> getNextLineAndSplitIntoTokens(std::istream& str) {
  std::vector<string> result;
  string line;
  if(!std::getline(str, line))
    return {};

  std::stringstream lineStream(line);
  string cell;

  while (std::getline(lineStream, cell, ',')) {
    result.push_back(cell);
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x220(%rbp)
movq %rdi, %rax
movq %rax, -0x218(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3fcf0
leaq -0x48(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x44b0
movq -0x210(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x40a0
movq %rax, -0x208(%rbp)
jmp 0x3f996
movq -0x208(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4170
movb %al, -0x221(%rbp)
jmp 0x3f9b4
movb -0x221(%rbp), %al
testb $0x1, %al
jne 0x3f9c0
jmp 0x3f9fc
movq -0x220(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x41c0
movq -0x220(%rbp), %rdi
callq 0x3fcf0
movl $0x1, -0x58(%rbp)
jmp 0x3faeb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3fb0d
movl $0x10, %edi
movl $0x8, %esi
callq 0x3fd10
movl %eax, -0x228(%rbp)
jmp 0x3fa13
movl -0x228(%rbp), %edx
leaq -0x1e0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4590
jmp 0x3fa2b
leaq -0x200(%rbp), %rdi
callq 0x44b0
leaq -0x1e0(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0x2c, %edx
callq 0x4690
movq %rax, -0x230(%rbp)
jmp 0x3fa58
movq -0x230(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4480
movb %al, -0x231(%rbp)
jmp 0x3fa76
movb -0x231(%rbp), %al
testb $0x1, %al
jne 0x3fa82
jmp 0x3fabc
leaq -0x28(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x3fd30
jmp 0x3fa94
jmp 0x3fa37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x41f0
leaq -0x1e0(%rbp), %rdi
callq 0x4280
jmp 0x3fb0d
movq -0x220(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3fda0
movl $0x1, -0x58(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x41f0
leaq -0x1e0(%rbp), %rdi
callq 0x4280
leaq -0x48(%rbp), %rdi
callq 0x41f0
leaq -0x28(%rbp), %rdi
callq 0x3fdd0
movq -0x218(%rbp), %rax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x41f0
leaq -0x28(%rbp), %rdi
callq 0x3fdd0
movq -0x50(%rbp), %rdi
callq 0x4620
nopl (%rax,%rax)
// File: kallaballa[P]PixelStencil/NamedColorTable.cpp
// Function: kallaballa::NamedColorTable::readFromCSV(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void NamedColorTable::readFromCSV(const string& filename) {
  std::ifstream ifs(filename);
  std::vector<string> row;
  NamedColor ralColor;
  while ((row = getNextLineAndSplitIntoTokens(ifs)).size() == 2) {
    ralColor.name = row[0];
    ralColor.rgb = strtol(row[1].substr(1).c_str(), NULL, 16);
    this->insert(ralColor);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movl $0x8, %edx
callq 0x45c0
leaq -0x230(%rbp), %rdi
callq 0x3fcf0
leaq -0x258(%rbp), %rdi
callq 0x6210
leaq -0x270(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x3f940
jmp 0x3fb90
leaq -0x230(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x3fe30
movq %rax, %rdi
callq 0x3fe60
movq %rax, -0x2b8(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x3fdd0
movq -0x2b8(%rbp), %rax
cmpq $0x2, %rax
jne 0x3fcb6
xorl %eax, %eax
movl %eax, %esi
leaq -0x230(%rbp), %rdi
callq 0x3fe80
movq %rax, %rsi
leaq -0x250(%rbp), %rdi
callq 0x4060
jmp 0x3fbf0
leaq -0x230(%rbp), %rdi
movl $0x1, %esi
movq %rsi, -0x2c0(%rbp)
callq 0x3fe80
movq -0x2c0(%rbp), %rdx
movq %rax, %rsi
leaq -0x2a0(%rbp), %rdi
movq $-0x1, %rcx
callq 0x4390
jmp 0x3fc27
leaq -0x2a0(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x4140
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x44d0
movq -0x2c8(%rbp), %rdi
movl %eax, -0x258(%rbp)
callq 0x41f0
movq -0x2b0(%rbp), %rsi
leaq -0x2a8(%rbp), %rdi
leaq -0x258(%rbp), %rdx
callq 0x3fea0
jmp 0x3fc79
jmp 0x3fb7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x278(%rbp)
movl %eax, -0x27c(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x5f60
leaq -0x230(%rbp), %rdi
callq 0x3fdd0
leaq -0x218(%rbp), %rdi
callq 0x40c0
jmp 0x3fce3
leaq -0x258(%rbp), %rdi
callq 0x5f60
leaq -0x230(%rbp), %rdi
callq 0x3fdd0
leaq -0x218(%rbp), %rdi
callq 0x40c0
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
movq -0x278(%rbp), %rdi
callq 0x4620
nop
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::insert(kallaballa::NamedColor const&)
iterator
      insert(const_reference __V)
      {
        if (!_M_get_root())
          {
            _Link_type __n = _M_new_node(__V, &_M_header);
            ++_M_count;
            _M_set_root(__n);
            _M_set_leftmost(__n);
            _M_set_rightmost(__n);
            return iterator(__n);
          }
        return _M_insert(_M_get_root(), __V, 0);
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x75a0
cmpq $0x0, %rax
jne 0x3ff34
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rdi, %rdx
addq $0x10, %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x40d90
movq -0x28(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq 0x28(%rdi), %rax
addq $0x1, %rax
movq %rax, 0x28(%rdi)
movq -0x20(%rbp), %rsi
callq 0x7170
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x7130
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x7150
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3f810
jmp 0x3ff56
movq -0x28(%rbp), %rdi
callq 0x75a0
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x40e90
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::_M_new_node(kallaballa::NamedColor const&, KDTree::_Node_base*, KDTree::_Node_base*, KDTree::_Node_base*)
_Link_type
      _M_new_node(const_reference __V, //  = value_type(),
                  _Base_ptr const __PARENT = NULL,
                  _Base_ptr const __LEFT = NULL,
                  _Base_ptr const __RIGHT = NULL)
      {
         typename _Base::NoLeakAlloc noleak(this);
         _Link_type new_node = noleak.get();
	 _Base::_M_construct_node(new_node, __V, __PARENT, __LEFT, __RIGHT);
         noleak.disconnect();
         return new_node;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x90(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x40fd0
movq -0x88(%rbp), %rdi
callq 0x41010
movq %rax, -0x80(%rbp)
jmp 0x40ddc
movq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x5f20
jmp 0x40dfe
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x78(%rbp), %rdx
callq 0x41030
jmp 0x40e23
leaq -0x78(%rbp), %rdi
callq 0x5f60
leaq -0x38(%rbp), %rdi
callq 0x41080
jmp 0x40e37
movq -0x40(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x410a0
movq -0xa0(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x40e7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5f60
leaq -0x38(%rbp), %rdi
callq 0x410a0
movq -0x48(%rbp), %rdi
callq 0x4620
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::_M_insert(KDTree::_Node<kallaballa::NamedColor>*, kallaballa::NamedColor const&, unsigned long)
iterator
      _M_insert(_Link_type __N, const_reference __V,
             size_type const __L)
      {
        if (_Node_compare_(__L % __K, _M_acc, _M_cmp)(__V, __N->_M_value))
          {
            if (!_S_left(__N))
              return _M_insert_left(__N, __V);
            return _M_insert(_S_left(__N), __V, __L+1);
          }
        else
          {
            if (!_S_right(__N) || __N == _M_get_rightmost())
              return _M_insert_right(__N, __V);
            return _M_insert(_S_right(__N), __V, __L+1);
          }
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq -0x28(%rbp), %rax
movl $0x3, %esi
xorl %edx, %edx
divq %rsi
movq %rdx, %rsi
movq %rcx, %rdx
addq $0x30, %rdx
addq $0x38, %rcx
leaq -0x40(%rbp), %rdi
callq 0x411e0
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x18, %rdx
leaq -0x40(%rbp), %rdi
callq 0x41210
testb $0x1, %al
jne 0x40eff
jmp 0x40f4f
movq -0x18(%rbp), %rdi
callq 0x75e0
cmpq $0x0, %rax
jne 0x40f28
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x412a0
jmp 0x40fb7
movq -0x18(%rbp), %rdi
callq 0x75e0
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
addq $0x1, %r8
callq 0x40e90
jmp 0x40fb7
movq -0x18(%rbp), %rdi
callq 0x75c0
cmpq $0x0, %rax
je 0x40f7b
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
callq 0x41370
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jne 0x40f92
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x41390
jmp 0x40fb7
movq -0x18(%rbp), %rdi
callq 0x75c0
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
addq $0x1, %r8
callq 0x40e90
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::_M_insert_left(KDTree::_Node<kallaballa::NamedColor>*, kallaballa::NamedColor const&)
iterator
      _M_insert_left(_Link_type __N, const_reference __V)
      {
        _S_set_left(__N, _M_new_node(__V)); ++_M_count;
        _S_set_parent( _S_left(__N), __N );
        if (__N == _M_get_leftmost())
           _M_set_leftmost( _S_left(__N) );
        return iterator(_S_left(__N));
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x40d90
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x41460
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rdi
callq 0x75e0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x41480
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x414a0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jne 0x4134a
movq -0x18(%rbp), %rdi
callq 0x75e0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x7130
movq -0x18(%rbp), %rdi
callq 0x75e0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x3f810
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: kallaballa[P]PixelStencil/./kdtree++/kdtree.hpp
// Function: KDTree::KDTree<3ul, kallaballa::NamedColor, std::pointer_to_binary_function<kallaballa::NamedColor const&, int const&, double>, KDTree::squared_difference<double, double>, std::less<double>, std::allocator<KDTree::_Node<kallaballa::NamedColor>>>::_M_insert_right(KDTree::_Node<kallaballa::NamedColor>*, kallaballa::NamedColor const&)
iterator
      _M_insert_right(_Link_type __N, const_reference __V)
      {
        _S_set_right(__N, _M_new_node(__V)); ++_M_count;
        _S_set_parent( _S_right(__N), __N );
        if (__N == _M_get_rightmost())
           _M_set_rightmost( _S_right(__N) );
        return iterator(_S_right(__N));
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x40d90
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x414c0
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rdi
callq 0x75c0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x41480
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x41370
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jne 0x4143a
movq -0x18(%rbp), %rdi
callq 0x75c0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x7150
movq -0x18(%rbp), %rdi
callq 0x75c0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x3f810
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: QFSW[P]MIPS1-Simulator/src/IInstructions.cpp
// Function: Clarkitechture::MIPS::ADDIInstr::execute(Clarkitechture::MIPS::MemoryMap&, Clarkitechture::MIPS::RegisterMap&)
void ADDIInstr::execute(MemoryMap &mem, RegisterMap& reg)
{
    int32_t left = reg.read(rs);
    int32_t right = (int16_t)constant;
    int32_t result = left + right;
    
    bool overflow = sameSign(left, right) && !sameSign(left, result);
    if (overflow) { throw BadArithmeticOperation("ADDI encountered an overflow"); }
    
    reg.write(rt, result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
movzbl 0x8(%rax), %eax
movl %eax, %esi
callq 0x10b60
movl %eax, %ecx
movq -0x68(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movswl 0xa(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
callq 0x8b10
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x5e(%rbp)
jne 0x7f50
jmp 0x7f60
movl -0x1c(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x8b10
xorb $-0x1, %al
movb %al, -0x5e(%rbp)
movb -0x5e(%rbp), %al
andb $0x1, %al
movb %al, -0x25(%rbp)
testb $0x1, -0x25(%rbp)
je 0x8012
movb $0x1, -0x5d(%rbp)
movl $0x48, %edi
callq 0x6140
movq %rax, -0x78(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x64c0
movq -0x70(%rbp), %rdx
leaq 0xc3fd(%rip), %rsi      # 0x14399
leaq -0x48(%rbp), %rdi
callq 0x8b50
jmp 0x7fa7
movq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x6730
jmp 0x7fb6
movq -0x78(%rbp), %rdi
movb $0x0, -0x5d(%rbp)
leaq 0x13ecb(%rip), %rsi     # 0x1be90
leaq -0x8bc(%rip), %rdx      # 0x7710
callq 0x6470
jmp 0x803a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7ff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x6190
leaq -0x49(%rbp), %rdi
callq 0x62e0
testb $0x1, -0x5d(%rbp)
jne 0x8007
jmp 0x8010
movq -0x78(%rbp), %rdi
callq 0x61f0
jmp 0x8031
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rdi
movzbl 0x9(%rax), %eax
movl %eax, %esi
movl -0x24(%rbp), %edx
callq 0x10c00
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x64b0
nopw (%rax,%rax)
// File: QFSW[P]MIPS1-Simulator/src/IInstructions.cpp
// Function: Clarkitechture::MIPS::ADDIUInstr::execute(Clarkitechture::MIPS::MemoryMap&, Clarkitechture::MIPS::RegisterMap&)
void ADDIUInstr::execute(MemoryMap &mem, RegisterMap& reg)
{
    int32_t left = reg.read(rs);
    int32_t right = (int16_t)constant;
    int32_t result = left + right;
    reg.write(rt, result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movzbl 0x8(%rax), %eax
movl %eax, %esi
callq 0x10b60
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movswl 0xa(%rax), %ecx
movl %ecx, -0x20(%rbp)
movl -0x1c(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movzbl 0x9(%rax), %eax
movl %eax, %esi
movl -0x24(%rbp), %edx
callq 0x10c00
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: QFSW[P]MIPS1-Simulator/src/IInstructions.cpp
// Function: Clarkitechture::MIPS::LWLInstr::execute(Clarkitechture::MIPS::MemoryMap&, Clarkitechture::MIPS::RegisterMap&)
void LWLInstr::execute(MemoryMap &mem, RegisterMap& reg)
{
    uint32_t addr = reg.read(rs) + (int16_t)constant;
    uint32_t byteIndex = addr % 4;
    uint32_t wordIndex = addr - byteIndex;
    uint32_t mask = 0xFFFFFFFF;
    
    uint32_t rawWord = mem.read<uint32_t>(wordIndex);
    byte* byteArray = reinterpret_cast<byte*>(&rawWord);
    
    for (int i = byteIndex; i < 4; ++i)
    {
        data <<= 8;
        data |= byteArray[3 - i];
        mask >>= 8;
    }
    data <<= 8 * byteIndex;
    data |= (reg.read(rt) & mask);
    reg.write(rt, data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movzbl 0x8(%rax), %eax
movl %eax, %esi
callq 0x10b60
movq -0x48(%rbp), %rcx
movswl 0xa(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x3, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x8c00
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0x84c0
movq -0x48(%rbp), %rax
movl 0xc(%rax), %ecx
shll $0x8, %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rcx
movl $0x3, %edx
subl -0x3c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x28(%rbp), %eax
shrl $0x8, %eax
movl %eax, -0x28(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8480
movq -0x48(%rbp), %rax
movl -0x20(%rbp), %ecx
shll $0x3, %ecx
movl 0xc(%rax), %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rdi
movzbl 0x9(%rax), %eax
movl %eax, %esi
callq 0x10b60
movl %eax, %ecx
movq -0x48(%rbp), %rax
andl -0x28(%rbp), %ecx
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rdi
movzbl 0x9(%rax), %ecx
movl %ecx, %esi
movl 0xc(%rax), %edx
callq 0x10c00
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)