LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/ruankotovich[P]TextCorrection-Trie/src/trie.hpp
// Function: trie::Trie_t::putIndividualWord(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void putIndividualWord(std::string& str, const std::string& content)
    {
      TrieNode_t*currentRoot, *lastRoot;
      currentRoot = this->m_lambdaNode.get();

      wchar_t chart[str.size()];
      push_string_to_wchar(chart, str);

      for (unsigned int i = 0; i < wcslen(chart); i++) {

        unsigned int code = this->m_characterMap[chart[i]];

        lastRoot = currentRoot;
        currentRoot = currentRoot->getChild(code);
        if (!currentRoot) {
          currentRoot = lastRoot->insertNReturnChild(code);
        }
      }

      if (currentRoot != this->m_lambdaNode.get()) {

        if (!currentRoot->isEndOfWord()) {
          currentRoot->buildContent();
          currentRoot->setEndOfWord(true);
        }

        currentRoot->addValue(content);
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, %rdx
movq %rdi, %r13
movq (%rdi), %r12
movq 0x8(%rsi), %rax
movq %rsp, %rbx
leaq 0xf(,%rax,4), %r14
andq $-0x10, %r14
movq %rbx, %r15
subq %r14, %r15
movq %r15, %rsp
negq %r14
movq %r15, %rsi
callq 0x4060
cmpl $0x0, (%rbx,%r14)
movq %r13, -0x40(%rbp)
je 0x3166
addq $0x8, %r13
xorl %ebx, %ebx
movl (%r15,%rbx,4), %eax
movl %eax, -0x2c(%rbp)
movq %r13, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x4976
movl (%rax), %esi
movq 0x10(%r12), %rcx
testq %rcx, %rcx
je 0x3147
leaq 0x8(%r12), %rdx
movq %rdx, %rax
xorl %edi, %edi
cmpl %esi, 0x20(%rcx)
setb %dil
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0x311d
cmpq %rdx, %rax
je 0x3147
cmpl %esi, 0x20(%rax)
ja 0x3147
movq 0x28(%rax), %r14
testq %r14, %r14
jne 0x3152
movq %r12, %rdi
callq 0x4896
movq %rax, %r14
incl %ebx
movq %r15, %rdi
callq 0x2120
movq %r14, %r12
cmpq %rbx, %rax
ja 0x30f6
jmp 0x3169
movq %r12, %r14
movq -0x40(%rbp), %rax
cmpq (%rax), %r14
je 0x31e8
cmpb $0x0, 0x34(%r14)
jne 0x31a5
leaq 0x38(%r14), %rbx
movl $0x18, %edi
callq 0x2160
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4b9c
movb $0x1, 0x34(%r14)
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
callq 0x6d08
movq 0x38(%r14), %rdi
movq %rbx, %rsi
callq 0x4bc0
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x31e8
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2180
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x320f
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O3/ruankotovich[P]TextCorrection-Trie/src/trie.hpp
// Function: trie::Trie_t::searchKeyword(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
std::pair<bool, std::vector<std::string>> searchKeyword(std::string& keyword)
    {
      std::transform(keyword.begin(), keyword.end(), keyword.begin(), ::tolower);
      wchar_t chart[keyword.size()];
      push_string_to_wchar(chart, keyword);

      TrieNode_t* currentNode = this->m_lambdaNode.get();

      for (unsigned int i = 0; i < wcslen(chart); i++) {
        currentNode = currentNode->getChild(m_characterMap[chart[i]]);

        if (currentNode == nullptr) {
          break;
        }
      }

      if (currentNode != nullptr) {
        if (currentNode->isEndOfWord()) {
          return { true, *currentNode->getValues() };
        }
      }

      return { false, this->m_emptyResponse };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, -0x40(%rbp)
movq 0x8(%rdx), %rbx
testq %rbx, %rbx
movq %rdi, -0x38(%rbp)
je 0x3639
movq (%r12), %r15
xorl %r13d, %r13d
movsbl (%r15,%r13), %edi
callq 0x21e0
movb %al, (%r15,%r13)
incq %r13
cmpq %r13, %rbx
jne 0x361c
movq 0x8(%r12), %rax
jmp 0x363b
xorl %eax, %eax
movq %rsp, %r13
leaq 0xf(,%rax,4), %r14
andq $-0x10, %r14
movq %r13, %r15
subq %r14, %r15
movq %r15, %rsp
negq %r14
movq -0x40(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rdi, %r12
callq 0x4060
movq (%r12), %rbx
cmpl $0x0, (%r13,%r14)
je 0x36e0
addq $0x8, %r12
xorl %r13d, %r13d
movq -0x38(%rbp), %r14
movl (%r15,%r13,4), %eax
movl %eax, -0x2c(%rbp)
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x4976
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x36f7
movl (%rax), %eax
addq $0x8, %rbx
movq %rbx, %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x36a4
cmpq %rbx, %rcx
je 0x36f7
cmpl %eax, 0x20(%rcx)
ja 0x36f7
movq 0x28(%rcx), %rbx
testq %rbx, %rbx
je 0x36f7
incl %r13d
movq %r15, %rdi
callq 0x2120
cmpq %r13, %rax
ja 0x367f
jmp 0x36e9
testq %rbx, %rbx
movq -0x38(%rbp), %r14
je 0x36f7
cmpb $0x1, 0x34(%rbx)
jne 0x36f7
movq 0x38(%rbx), %rsi
movb $0x1, %al
jmp 0x3704
movq -0x40(%rbp), %rsi
addq $0xe0, %rsi
xorl %eax, %eax
movb %al, (%r14)
movq %r14, %rdi
addq $0x8, %rdi
callq 0x5c58
movq %r14, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ruankotovich[P]TextCorrection-Trie/src/trie.hpp
// Function: trie::Trie_t::addStopWords(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void addStopWords(const std::string& filename)
    {
      std::string currentLine;
      std::ifstream fileInputStream(filename);

      while (std::getline(fileInputStream, currentLine)) {
        std::transform(currentLine.begin(), currentLine.end(), currentLine.begin(), ::tolower);
        m_stopWords.insert(currentLine);
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x2240
addq $0xa8, %rbx
movq %rsp, %r15
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3aac
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x3a9f
movq (%rsp), %rbp
xorl %r12d, %r12d
movsbl (%rbp,%r12), %edi
callq 0x21e0
movb %al, (%rbp,%r12)
incq %r12
cmpq %r12, %r13
jne 0x3a87
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3eb8
jmp 0x3a44
leaq 0x20(%rsp), %rdi
callq 0x2060
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3ad1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3af5
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2060
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b10
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/ruankotovich[P]TextCorrection-Trie/src/trie.hpp
// Function: trie::TrieNode_t::insertNReturnChild(unsigned int)
TrieNode_t* insertNReturnChild(unsigned int value)
    {
      auto finder = this->m_childrenMap.find(value);

      if(finder != this->m_childrenMap.end()){
        return finder->second.get();
      }else{
        return this->m_childrenMap.emplace(value, std::unique_ptr<TrieNode_t>(new TrieNode_t(value))).first->second.get();
      }

    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x48d8
leaq 0x8(%rbx), %rdx
movq %rdx, %rax
xorl %esi, %esi
cmpl %ebp, 0x20(%rcx)
setb %sil
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x48b7
cmpq %rdx, %rax
je 0x48d8
cmpl %ebp, 0x20(%rax)
jbe 0x494a
movl $0x40, %edi
callq 0x2160
leaq 0x8(%rax), %rcx
movl $0x0, 0x8(%rax)
xorl %edx, %edx
movq %rdx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rdx, 0x28(%rax)
movl %ebp, 0x30(%rax)
movb $0x0, 0x34(%rax)
movq %rdx, 0x38(%rax)
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x4a2e
movq 0x28(%rax), %rbx
movq (%rsp), %r14
testq %r14, %r14
je 0x494e
leaq 0x38(%r14), %rdi
callq 0x3dbe
movq %r14, %rdi
callq 0x3df2
movl $0x40, %esi
movq %r14, %rdi
callq 0x2180
jmp 0x494e
movq 0x28(%rax), %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x496e
movq %rsp, %rdi
callq 0x3d96
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/ruankotovich[P]TextCorrection-Trie/src/trie.hpp
// Function: trie::TrieNode_t::getChildren()
std::vector<TrieNode_t*> getChildren()
    {
      std::vector<TrieNode_t*> nodes;
      for (auto &cur : this->m_childrenMap) {
        nodes.push_back(cur.second.get());
      }
      return nodes;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x18(%rsi), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x4e6d
movq %rsp, %r12
movq 0x28(%r15), %rax
movq %rax, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4e52
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x4e5d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x561e
movq %r15, %rdi
callq 0x20e0
movq %rax, %r15
cmpq %r14, %rax
jne 0x4e36
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4e93
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/RNG.cpp
// Function: RNG::getInt32()
unsigned long RNG::getInt32()
{
    unsigned long y;
    static unsigned long mag01[2]={0x0UL, MATRIX_A};
    /* mag01[x] = x * MATRIX_A  for x=0,1 */

    if (mti >= N) { /* generate N words at one time */
        int kk;

        for (kk=0;kk<N-M;kk++) {
            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
            mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL];
        }
        for (;kk<N-1;kk++) {
            y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
            mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
        }
        y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
        mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL];

        mti = 0;
    }
  
    y = mt[mti++];

    /* Tempering */
    y ^= (y >> 11);
    y ^= (y << 7) & 0x9d2c5680UL;
    y ^= (y << 15) & 0xefc60000UL;
    y ^= (y >> 18);

    return y;
}

// Assembly:
movslq 0x1380(%rdi), %rax
cmpq $0x26f, %rax            # imm = 0x26F
jle 0x271e
movq (%rdi), %rdx
xorl %ecx, %ecx
leaq 0x79dd(%rip), %rax      # 0xa030
andl $0x80000000, %edx       # imm = 0x80000000
movq 0x8(%rdi,%rcx,8), %rsi
movl %esi, %r8d
andl $0x7ffffffe, %r8d       # imm = 0x7FFFFFFE
orl %edx, %r8d
shrl %r8d
movq %rsi, %rdx
andl $0x1, %esi
movq (%rax,%rsi,8), %rsi
xorq 0xc68(%rdi,%rcx,8), %rsi
xorq %r8, %rsi
movq %rsi, (%rdi,%rcx,8)
leaq 0x1(%rcx), %rsi
movq %rsi, %rcx
cmpq $0xe3, %rsi
jne 0x2653
movq 0x718(%rdi), %rdx
movl $0xe4, %ecx
andl $0x80000000, %edx       # imm = 0x80000000
movq (%rdi,%rcx,8), %rsi
movl %esi, %r8d
andl $0x7ffffffe, %r8d       # imm = 0x7FFFFFFE
orl %edx, %r8d
shrl %r8d
movq %rsi, %rdx
andl $0x1, %esi
movq (%rax,%rsi,8), %rsi
xorq -0x720(%rdi,%rcx,8), %rsi
xorq %r8, %rsi
movq %rsi, -0x8(%rdi,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x26a3
movl $0x80000000, %edx       # imm = 0x80000000
andl 0x1378(%rdi), %edx
movq (%rdi), %rcx
movl %ecx, %esi
andl $0x7ffffffe, %esi       # imm = 0x7FFFFFFE
orl %edx, %esi
movl %ecx, %edx
andl $0x1, %edx
movq (%rax,%rdx,8), %rax
xorq 0xc60(%rdi), %rax
shrl %esi
xorq %rsi, %rax
movq %rax, 0x1378(%rdi)
movl $0x1, %eax
jmp 0x2724
movq (%rdi,%rax,8), %rcx
incl %eax
movl %eax, 0x1380(%rdi)
movq %rcx, %rax
shrq $0xb, %rax
xorq %rcx, %rax
movl %eax, %ecx
shll $0x7, %ecx
andl $0x9d2c5680, %ecx       # imm = 0x9D2C5680
xorq %rax, %rcx
movl %ecx, %edx
shll $0xf, %edx
andl $0xefc60000, %edx       # imm = 0xEFC60000
xorq %rcx, %rdx
movq %rdx, %rax
shrq $0x12, %rax
xorq %rdx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSample.cpp
// Function: usage(char*)
void usage(char *app)
{
	printf(	"Usage: %s [-m] [-t] [-r <relax count=0>] [-M <multiplier=10>] [-N <minMaxThrows=1000>] <method> <radius> <output>\n", app);
	printf(	"	-m		maximize point set after sampling\n");
	printf(	"	-t		use tiled domain\n");
	printf(	"	-r		apply the specified number of relaxations after sampling (requires qvoronoi)\n");
	printf(	"	-M		set multiplier for DartThrowing and BestCandidate samplers\n");
	printf(	"	-N		set minimum number of maximum throws for DartThrowing sampler\n");
	printf(	"	available methods = {\n"
			"		DartThrowing, (uses multiplier and minMaxThrows)\n"
			"		BestCandidate, (uses multiplier)\n"
			"		Boundary, \n"
			"		Pure, \n"
			"		LinearPure, \n"
			"		Penrose, \n"
			"		Uniform" "}\n");

	exit(1);
}

// Assembly:
pushq %rax
movq %rdi, %rsi
leaq 0x7795(%rip), %rdi      # 0xa078
xorl %eax, %eax
callq 0x2040
leaq 0x78d4(%rip), %rdi      # 0xa1c5
callq 0x2290
leaq 0x78ef(%rip), %rdi      # 0xa1ec
callq 0x2290
leaq 0x78f9(%rip), %rdi      # 0xa202
callq 0x2290
leaq 0x793f(%rip), %rdi      # 0xa254
callq 0x2290
leaq 0x7973(%rip), %rdi      # 0xa294
callq 0x2290
leaq 0x79aa(%rip), %rdi      # 0xa2d7
callq 0x2290
movl $0x1, %edi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PDSampler::PDSampler(float, bool, bool)
PDSampler::PDSampler(float _radius, bool _isTiled, bool usesGrid) :
	m_rng((unsigned long) (timeInSeconds()*1000)),
	radius(_radius),
	isTiled(_isTiled)
{
	if (usesGrid) {
			// grid size is chosen so that 4*radius search only 
			// requires searching adjacent cells, this also
			// determines max points per cell
		m_gridSize = (int) ceil(2./(4.*_radius));
		if (m_gridSize<2) m_gridSize = 2;

		m_gridCellSize = 2.0f/m_gridSize;
		m_grid = new int[m_gridSize*m_gridSize][kMaxPointsPerCell];

		for (int y=0; y<m_gridSize; y++) {
			for (int x=0; x<m_gridSize; x++) {
				for (int k=0; k<kMaxPointsPerCell; k++) {
					m_grid[y*m_gridSize + x][k] = -1;
				}
			}
		}
	} else {
		m_gridSize = 0;
		m_gridCellSize = 0;
		m_grid = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movss %xmm0, 0x4(%rsp)
movq %rdi, %rbx
leaq 0xcc14(%rip), %rax      # 0xfb48
movq %rax, (%rdi)
leaq 0x8(%rdi), %r15
callq 0x28a4
mulsd 0x74a0(%rip), %xmm0     # 0xa3e8
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x7494(%rip), %xmm0     # 0xa3f0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %r15, %rdi
callq 0x24cc
movss 0x4(%rsp), %xmm1
xorl %r15d, %r15d
movq %r15, 0x13a0(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x1390(%rbx)
movupd %xmm0, 0x13b8(%rbx)
movq %r15, 0x13c8(%rbx)
movss %xmm1, 0x13d0(%rbx)
movb %r14b, 0x13d4(%rbx)
testl %ebp, %ebp
je 0x3050
cvtss2sd %xmm1, %xmm1
mulsd 0x743b(%rip), %xmm1     # 0xa3f8
movsd 0x743b(%rip), %xmm0     # 0xa400
divsd %xmm1, %xmm0
callq 0x2060
cvttsd2si %xmm0, %eax
cmpl $0x3, %eax
movl $0x2, %r12d
cmovgel %eax, %r12d
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
movl %r12d, 0x13b0(%rbx)
movss 0x7472(%rip), %xmm1     # 0xa468
divss %xmm0, %xmm1
movss %xmm1, 0x13b4(%rbx)
movl %r12d, %eax
imull %eax, %eax
shlq $0x2, %rax
leaq (%rax,%rax,8), %rdi
callq 0x2030
movq %rax, %r14
movq %rax, 0x13a8(%rbx)
leaq (,%r12,4), %rax
leaq (%rax,%rax,8), %rbx
movq %r12, %r13
movl %r15d, %eax
leaq (%rax,%rax,8), %rax
leaq (%r14,%rax,4), %rdi
movl $0xff, %esi
movq %rbx, %rdx
callq 0x20c0
addl %r12d, %r15d
decq %r13
jne 0x302e
jmp 0x3058
movupd %xmm0, 0x13a8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PDSampler::getTiled(Vec2)
Vec2 PDSampler::getTiled(Vec2 v)
{
	float x = v.x, y = v.y;

	if (isTiled) {
		if (x<-1) x += 2;
		else if (x>1) x -= 2;

		if (y<-1) y += 2;
		else if (y>1) y -= 2;
	}

	return Vec2(x,y);
}

// Assembly:
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
cmpb $0x1, 0x13d4(%rdi)
jne 0x3138
movss 0x7378(%rip), %xmm2     # 0xa46c
ucomiss %xmm0, %xmm2
jbe 0x3103
movss 0x7367(%rip), %xmm3     # 0xa468
jmp 0x3114
ucomiss 0x7366(%rip), %xmm0     # 0xa470
jbe 0x3118
movss 0x7360(%rip), %xmm3     # 0xa474
addss %xmm3, %xmm0
ucomiss %xmm1, %xmm2
jbe 0x3127
addss 0x7343(%rip), %xmm1     # 0xa468
jmp 0x3138
ucomiss 0x7342(%rip), %xmm1     # 0xa470
jbe 0x3138
addss 0x733c(%rip), %xmm1     # 0xa474
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
retq
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PDSampler::getGridXY(Vec2&, int*, int*)
void PDSampler::getGridXY(Vec2 &v, int *gx_out, int *gy_out)
{
	int gx = *gx_out = (int) floor(.5*(v.x + 1)*m_gridSize);
	int gy = *gy_out = (int) floor(.5*(v.y + 1)*m_gridSize);
	if (gx<0 || gx>=m_gridSize || gy<0 || gy>=m_gridSize) {
		printf("Internal error, point outside grid was generated, ignoring.\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movss (%rsi), %xmm0
addss 0x7314(%rip), %xmm0     # 0xa470
cvtss2sd %xmm0, %xmm1
mulsd 0x6ee8(%rip), %xmm1     # 0xa050
xorps %xmm0, %xmm0
cvtsi2sdl 0x13b0(%rdi), %xmm0
mulsd %xmm1, %xmm0
callq 0x22f0
cvttsd2si %xmm0, %ebp
movl %ebp, (%r15)
movss 0x72e5(%rip), %xmm0     # 0xa470
addss 0x4(%r12), %xmm0
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
mulsd 0x6eaf(%rip), %xmm1     # 0xa050
xorps %xmm0, %xmm0
cvtsi2sdl 0x13b0(%rbx), %xmm0
mulsd %xmm1, %xmm0
callq 0x22f0
cvttsd2si %xmm0, %eax
movl %eax, (%r14)
testl %ebp, %ebp
js 0x31db
movl 0x13b0(%rbx), %ecx
cmpl %ebp, %ecx
jle 0x31db
testl %eax, %eax
js 0x31db
cmpl %eax, %ecx
jle 0x31db
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9262(%rip), %rdi      # 0xc444
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PDSampler::addPoint(Vec2)
void PDSampler::addPoint(Vec2 pt)
{
	int i, gx, gy, *cell;

	points.push_back(pt);

	if (m_grid) {
		getGridXY(pt, &gx, &gy);
		cell = m_grid[gy*m_gridSize + gx];
		for (i=0; i<kMaxPointsPerCell; i++) {
			if (cell[i]==-1) {
				cell[i] = (int) points.size()-1;
				break;
			}
		}
		if (i==kMaxPointsPerCell) {
			printf("Internal error, overflowed max points per grid cell. Exiting.\n");
			exit(1);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movlps %xmm0, (%rsp)
movq 0x13c0(%rdi), %rsi
cmpq 0x13c8(%rdi), %rsi
je 0x321d
movlps %xmm0, (%rsi)
addq $0x8, 0x13c0(%rbx)
jmp 0x322c
leaq 0x13b8(%rbx), %rdi
movq %rsp, %rdx
callq 0x68f4
cmpq $0x0, 0x13a8(%rbx)
je 0x32b2
movq %rsp, %rsi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0x313c
movslq (%r15), %rax
movslq 0x13b0(%rbx), %rcx
imulq %rax, %rcx
movslq (%r14), %rax
addq %rcx, %rax
leaq (%rax,%rax,8), %rax
shlq $0x2, %rax
addq 0x13a8(%rbx), %rax
xorl %ecx, %ecx
cmpl $-0x1, (%rax,%rcx,4)
je 0x329b
incq %rcx
cmpq $0x9, %rcx
jne 0x3276
leaq 0x91f4(%rip), %rdi      # 0xc480
callq 0x2290
movl $0x1, %edi
callq 0x2200
movq 0x13c0(%rbx), %rdx
subq 0x13b8(%rbx), %rdx
shrq $0x3, %rdx
decl %edx
movl %edx, (%rax,%rcx,4)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PDSampler::findNeighbors(Vec2&, float)
int PDSampler::findNeighbors(Vec2 &pt, float distance)
{
	if (!m_grid) {
		printf("Internal error, sampler cannot search without grid.\n");
		exit(1);
	}

	float distanceSqrd = distance*distance;
	int i, j, k, gx, gy, N = (int) ceil(distance/m_gridCellSize);
	if (N>(m_gridSize>>1)) N = m_gridSize>>1;
	
	m_neighbors.clear();
	getGridXY(pt, &gx, &gy);
	for (j=-N; j<=N; j++) {
		for (i=-N; i<=N; i++) {
			int cx = (gx+i+m_gridSize)%m_gridSize;
			int cy = (gy+j+m_gridSize)%m_gridSize;
			int *cell = m_grid[cy*m_gridSize + cx];

			for (k=0; k<kMaxPointsPerCell; k++) {
				if (cell[k]==-1) {
					break;
				} else {
					if (getDistanceSquared(pt, points[cell[k]])<distanceSqrd)
						m_neighbors.push_back(cell[k]);
				}
			}
		}
	}

	return (int) m_neighbors.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, 0x13a8(%rdi)
je 0x345e
movq %rsi, %r14
movq %rdi, %rbx
movss %xmm0, 0x4(%rsp)
divss 0x13b4(%rdi), %xmm0
callq 0x20d0
cvttss2si %xmm0, %eax
movl 0x13b0(%rbx), %ecx
sarl %ecx
cmpl %eax, %ecx
cmovgel %eax, %ecx
movl %ecx, (%rsp)
movq 0x1390(%rbx), %rax
cmpq %rax, 0x1398(%rbx)
je 0x331c
movq %rax, 0x1398(%rbx)
leaq 0x1c(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x313c
cmpl $0x0, (%rsp)
movss 0x4(%rsp), %xmm0
js 0x343d
mulss %xmm0, %xmm0
leaq 0x1390(%rbx), %r15
movl (%rsp), %eax
negl %eax
movl 0x1c(%rsp), %ecx
movq %rcx, 0x20(%rsp)
movl 0x18(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movl %eax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movss %xmm0, 0x4(%rsp)
movl 0x10(%rsp), %eax
movl %eax, %r13d
movq 0x20(%rsp), %rax
addl %r13d, %eax
movl 0x13b0(%rbx), %esi
addl %esi, %eax
cltd
idivl %esi
movl %edx, %ecx
movq 0x8(%rsp), %rax
addl %esi, %eax
addl 0x14(%rsp), %eax
cltd
idivl %esi
imull %esi, %edx
addl %ecx, %edx
movslq %edx, %rax
leaq (%rax,%rax,8), %r12
shlq $0x2, %r12
addq 0x13a8(%rbx), %r12
xorl %ebp, %ebp
movslq (%r12,%rbp), %rdx
cmpq $-0x1, %rdx
je 0x3416
shlq $0x3, %rdx
addq 0x13b8(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4fe4
movss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x340c
leaq (%r12,%rbp), %rdx
movq 0x1398(%rbx), %rsi
cmpq 0x13a0(%rbx), %rsi
je 0x3404
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x1398(%rbx)
jmp 0x340c
movq %r15, %rdi
callq 0x6a3a
addq $0x4, %rbp
cmpq $0x24, %rbp
jne 0x33b4
leal 0x1(%r13), %eax
cmpl (%rsp), %r13d
movl %eax, %r13d
jne 0x3378
movq 0x8(%rsp), %rcx
leal 0x1(%rcx), %eax
cmpl (%rsp), %ecx
movq %rax, 0x8(%rsp)
jne 0x3371
movq 0x1398(%rbx), %rax
subq 0x1390(%rbx), %rax
shrq $0x2, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9059(%rip), %rdi      # 0xc4be
callq 0x2290
movl $0x1, %edi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PDSampler::findClosestNeighbor(Vec2&, float)
float PDSampler::findClosestNeighbor(Vec2 &pt, float distance)
{
	if (!m_grid) {
		printf("Internal error, sampler cannot search without grid.\n");
		exit(1);
	}

	float closestSqrd = distance*distance;
	int i, j, k, gx, gy, N = (int) ceil(distance/m_gridCellSize);
	if (N>(m_gridSize>>1)) N = m_gridSize>>1;
	
	getGridXY(pt, &gx, &gy);
	for (j=-N; j<=N; j++) {
		for (i=-N; i<=N; i++) {
			int cx = (gx+i+m_gridSize)%m_gridSize;
			int cy = (gy+j+m_gridSize)%m_gridSize;
			int *cell = m_grid[cy*m_gridSize + cx];

			for (k=0; k<kMaxPointsPerCell; k++) {
				if (cell[k]==-1) {
					break;
				} else {
					float d = getDistanceSquared(pt, points[cell[k]]);

					if (d<closestSqrd)
						closestSqrd = d;
				}
			}
		}
	}

	return sqrt(closestSqrd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, 0x13a8(%rdi)
je 0x35e5
movq %rsi, %rbx
movq %rdi, %r14
movaps %xmm0, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x4(%rsp)
divss 0x13b4(%rdi), %xmm0
callq 0x20d0
cvttss2si %xmm0, %eax
movl 0x13b0(%r14), %r15d
sarl %r15d
cmpl %eax, %r15d
cmovgel %eax, %r15d
leaq 0x1c(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x313c
testl %r15d, %r15d
js 0x35b1
movl %r15d, %eax
negl %eax
movl 0x1c(%rsp), %ecx
movq %rcx, 0x20(%rsp)
movl 0x18(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movl %eax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movss 0x4(%rsp), %xmm0
movl 0x10(%rsp), %eax
movl %eax, %ebp
movq 0x20(%rsp), %rax
addl %ebp, %eax
movl 0x13b0(%r14), %esi
addl %esi, %eax
cltd
idivl %esi
movl %edx, %ecx
movq 0x8(%rsp), %rax
addl %esi, %eax
addl 0x14(%rsp), %eax
cltd
idivl %esi
imull %esi, %edx
addl %ecx, %edx
movslq %edx, %rax
leaq (%rax,%rax,8), %r12
shlq $0x2, %r12
addq 0x13a8(%r14), %r12
xorl %r13d, %r13d
movaps %xmm0, %xmm1
movslq (%r12,%r13,4), %rdx
cmpq $-0x1, %rdx
je 0x3588
shlq $0x3, %rdx
addq 0x13b8(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movss %xmm1, 0x4(%rsp)
callq 0x4fe4
minss 0x4(%rsp), %xmm0
incq %r13
movaps %xmm0, %xmm1
cmpq $0x9, %r13
jne 0x354e
jmp 0x358b
movaps %xmm1, %xmm0
leal 0x1(%rbp), %eax
cmpl %r15d, %ebp
movl %eax, %ebp
jne 0x350e
movq 0x8(%rsp), %rcx
leal 0x1(%rcx), %eax
cmpl %r15d, %ecx
movq %rax, 0x8(%rsp)
jne 0x3508
jmp 0x35b7
movss 0x4(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x35d2
sqrtss %xmm0, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2320
leaq 0x8ed2(%rip), %rdi      # 0xc4be
callq 0x2290
movl $0x1, %edi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PDSampler::maximize()
void PDSampler::maximize()
{
	RangeList rl(0,0);
	int i, N = (int) points.size();

	for (i=0; i<N; i++) {
		Vec2 &candidate = points[i];

		rl.reset(0, (float) M_PI*2);
		findNeighborRanges(i, rl);
		while (rl.numRanges) {
			RangeEntry &re = rl.ranges[m_rng.getInt31()%rl.numRanges];
			float angle = re.min + (re.max-re.min)*m_rng.getFloatL();
			Vec2 pt = getTiled(Vec2(candidate.x + cos(angle)*2*radius,
									candidate.y + sin(angle)*2*radius));

			addPoint(pt);
			rl.subtract(angle - (float) M_PI/3, angle + (float) M_PI/3);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %rdi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x711c
movq 0x13c0(%rbx), %rax
subq 0x13b8(%rbx), %rax
shrq $0x3, %rax
movq %rax, 0x10(%rsp)
testl %eax, %eax
jle 0x3b5c
leaq 0x8(%rbx), %r14
movq 0x10(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
leaq 0x38(%rsp), %r12
movq 0x13b8(%rbx), %rbp
xorps %xmm0, %xmm0
movq %r12, %rdi
movss 0x6a9a(%rip), %xmm1     # 0xa484
callq 0x716e
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x35fc
cmpl $0x0, 0x40(%rsp)
je 0x3b4e
movq 0x38(%rsp), %r13
movq %r14, %rdi
callq 0x275c
movslq 0x40(%rsp), %rcx
cqto
idivq %rcx
movss (%r13,%rdx,8), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0x4(%r13,%rdx,8), %xmm0
movss %xmm0, 0xc(%rsp)
movq %r14, %rdi
callq 0x2838
movss 0xc(%rsp), %xmm1
movss 0x20(%rsp), %xmm2
subss %xmm2, %xmm1
mulss %xmm0, %xmm1
addss %xmm2, %xmm1
movss %xmm1, 0xc(%rsp)
movss (%rbp,%r15,8), %xmm0
movss %xmm0, 0x20(%rsp)
movaps %xmm1, %xmm0
callq 0x2120
addss %xmm0, %xmm0
mulss 0x13d0(%rbx), %xmm0
addss 0x20(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movss 0x4(%rbp,%r15,8), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x2170
addss %xmm0, %xmm0
mulss 0x13d0(%rbx), %xmm0
addss 0x1c(%rsp), %xmm0
cmpb $0x1, 0x13d4(%rbx)
jne 0x3ada
movss 0x69a6(%rip), %xmm1     # 0xa46c
movaps 0x20(%rsp), %xmm2
ucomiss %xmm2, %xmm1
jbe 0x3ae1
addss 0x6990(%rip), %xmm2     # 0xa468
jmp 0x3af2
movaps 0x20(%rsp), %xmm2
jmp 0x3b1a
ucomiss 0x6988(%rip), %xmm2     # 0xa470
jbe 0x3af2
addss 0x6982(%rip), %xmm2     # 0xa474
movss 0x6972(%rip), %xmm1     # 0xa46c
ucomiss %xmm0, %xmm1
jbe 0x3b09
addss 0x6961(%rip), %xmm0     # 0xa468
jmp 0x3b1a
ucomiss 0x6960(%rip), %xmm0     # 0xa470
jbe 0x3b1a
addss 0x695a(%rip), %xmm0     # 0xa474
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movq %rbx, %rdi
movaps %xmm2, %xmm0
callq 0x31f0
movss 0xc(%rsp), %xmm1
movaps %xmm1, %xmm0
addss 0x694f(%rip), %xmm0     # 0xa488
addss 0x694b(%rip), %xmm1     # 0xa48c
movq %r12, %rdi
callq 0x7292
jmp 0x39fd
incq %r15
cmpq 0x10(%rsp), %r15
jne 0x39d5
leaq 0x38(%rsp), %rdi
callq 0x7182
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b7b
jmp 0x3b7b
jmp 0x3b7b
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x7182
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: DartThrowing::complete()
void DartThrowing::complete()
{
	while (1) {
		int i, N = (int) points.size()*m_maxThrowsMult;
		if (N<m_minMaxThrows) N = m_minMaxThrows;

		for (i=0; i<N; i++) {
			Vec2 pt = randomPoint();

			findNeighbors(pt, 2*radius);

			if (!m_neighbors.size()) {
				addPoint(pt);
				break;
			}
		}

		if (i==N)
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x8(%rsp), %r15
movq 0x13c0(%rbx), %r12
subq 0x13b8(%rbx), %r12
shrq $0x3, %r12
imull 0x13dc(%rbx), %r12d
movl 0x13d8(%rbx), %eax
cmpl %eax, %r12d
cmovlel %eax, %r12d
xorl %ebp, %ebp
testl %r12d, %r12d
jle 0x40ce
movq %r14, %rdi
callq 0x2838
movaps %xmm0, 0x10(%rsp)
movq %r14, %rdi
callq 0x2838
movaps 0x10(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
addps %xmm1, %xmm1
addps 0x6415(%rip), %xmm1     # 0xa4a0
movlps %xmm1, 0x8(%rsp)
movss 0x13d0(%rbx), %xmm0
addss %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32bc
movq 0x1398(%rbx), %rax
cmpq 0x1390(%rbx), %rax
je 0x40c0
incl %ebp
cmpl %ebp, %r12d
jne 0x4064
jmp 0x40d7
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x31f0
cmpl %r12d, %ebp
jne 0x4036
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: BestCandidate::complete()
void BestCandidate::complete()
{
	for (int i=0; i<m_N; i++) {
		Vec2 best(0,0);
		float bestDistance = 0;
		int count = 1 + (int) points.size()*m_multiplier;

		for (int j=0; j<count; j++) {
			Vec2 pt = randomPoint();
			float closest = 2;

			closest = findClosestNeighbor(pt, 4*radius);
			if (j==0 || closest>bestDistance) {
				bestDistance = closest;
				best = pt;
			}
		}

		addPoint(best);
	}
}

// Assembly:
cmpl $0x0, 0x13dc(%rdi)
jle 0x4244
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq 0x13c0(%rbx), %r12
subq 0x13b8(%rbx), %r12
shrq $0x3, %r12
imull 0x13d8(%rbx), %r12d
testl %r12d, %r12d
js 0x4213
incl %r12d
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x2838
movaps %xmm0, 0x20(%rsp)
movq %r14, %rdi
callq 0x2838
movaps 0x20(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
addps %xmm1, %xmm1
addps 0x62da(%rip), %xmm1     # 0xa4a0
movlps %xmm1, 0x8(%rsp)
movss 0x13d0(%rbx), %xmm0
mulss 0x62a1(%rip), %xmm0     # 0xa47c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3474
testl %r13d, %r13d
sete %al
ucomiss 0x4(%rsp), %xmm0
seta %cl
orb %al, %cl
je 0x4209
movsd 0x8(%rsp), %xmm1
movaps %xmm1, 0x10(%rsp)
movss %xmm0, 0x4(%rsp)
incl %r13d
cmpl %r13d, %r12d
jne 0x419f
jmp 0x421b
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movaps 0x10(%rsp), %xmm0
callq 0x31f0
incl %ebp
cmpl 0x13dc(%rbx), %ebp
jl 0x4165
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/PDSampling.cpp
// Function: PenroseSampler::complete()
void PenroseSampler::complete()
{
	PenroseQuasisampler s((unsigned int) (9.1/(radius*radius)));
	std::vector<Point2D> pts = s.getSamplingPoints();

	for (std::vector<Point2D>::iterator it=pts.begin(); it!=pts.end(); it++ ) {
		Vec2 pt((float) it->x/50.f - 1.0f, (float) it->y/50.f - 1.0f);

		if (pointInDomain(pt)) {
			addPoint(pt);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movss 0x13d0(%rdi), %xmm0
mulss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x55aa(%rip), %xmm1     # 0xa418
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movaps 0x5642(%rip), %xmm0     # 0xa4c0
leaq 0x20(%rsp), %rsi
movups %xmm0, 0x10(%rsi)
movq $0x0, 0x8(%rsi)
leaq 0xaeaa(%rip), %rcx      # 0xfd40
movq %rcx, (%rsi)
movl %eax, 0x20(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x54de
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %rax
cmpq %rax, %r14
je 0x4f1c
movupd (%r14), %xmm0
cvtpd2ps %xmm0, %xmm0
divps 0x560b(%rip), %xmm0     # 0xa4d0
addps 0x55d4(%rip), %xmm0     # 0xa4a0
ucomiss 0x5599(%rip), %xmm0     # 0xa46c
jb 0x4f0e
movaps %xmm0, %xmm1
cmpleps 0x5600(%rip), %xmm1     # 0xa4e0
unpcklps %xmm1, %xmm1            # xmm1 = xmm1[0,0,1,1]
movmskpd %xmm1, %ecx
testb $0x2, %cl
je 0x4f0e
testb $0x1, %cl
je 0x4f0e
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
ucomiss 0x556d(%rip), %xmm1     # 0xa46c
jb 0x4f0e
movq %rbx, %rdi
callq 0x31f0
movq 0x10(%rsp), %rax
addq $0x10, %r14
cmpq %rax, %r14
jne 0x4eb5
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x4f31
movq 0x18(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x21b0
leaq 0x20(%rsp), %rdi
callq 0x555a
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x4f62
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4f62
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x20(%rsp), %rdi
callq 0x555a
movq %rbx, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./WeightedDiscretePDF.cpp
// Function: WeightedDiscretePDF<int>::insert(int, float)
void WeightedDiscretePDF<T>::insert(T item, float weight)
{
	WDPDF_Node<T> *p=0, *n=m_root;

	while (n) {
		if (n->leftIsRed() && n->rightIsRed())
			split(n);

		p = n;
		if (n->key==item) {
			throw std::domain_error("insert: argument(item) already in tree");
		} else {
			n = (item<n->key)?n->left:n->right;
		}
	}

	n = new WDPDF_Node<T>(item, weight, p);

	if (!p) {
		m_root = n;
	} else {
		if (item<p->key) {
			p->left = n;
		} else {
			p->right = n;
		}

		split(n);
	}

	propogateSumsUp(n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
movss %xmm0, 0x4(%rsp)
je 0x5122
movq %rax, %r14
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x5106
cmpb $0x1, (%rax)
jne 0x5106
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x5106
cmpb $0x1, (%rax)
jne 0x5106
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6ea8
cmpl %ebp, 0x20(%r14)
je 0x51be
setle %al
movzbl %al, %eax
movq 0x10(%r14,%rax,8), %rax
testq %rax, %rax
jne 0x50dc
jmp 0x5125
xorl %r14d, %r14d
movl $0x30, %edi
callq 0x21a0
movq %rax, %r15
movb $0x0, (%rax)
movl %ebp, 0x20(%rax)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x24(%rax)
movl $0x0, 0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %r14, 0x8(%rax)
testq %r14, %r14
je 0x5175
xorl %eax, %eax
cmpl %ebp, 0x20(%r14)
setle %al
movq %r15, 0x10(%r14,%rax,8)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6ea8
jmp 0x5178
movq %r15, (%rbx)
movq 0x10(%r15), %rax
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
testq %rax, %rax
je 0x518c
movss 0x28(%rax), %xmm1
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x519a
movss 0x28(%rax), %xmm0
addss 0x24(%r15), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x28(%r15)
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x5178
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20a0
movq %rax, %rbx
leaq 0x71b7(%rip), %rsi      # 0xc389
movq %rax, %rdi
callq 0x20f0
movq 0xaddf(%rip), %rsi      # 0xffc0
movq 0xade8(%rip), %rdx      # 0xffd0
movq %rbx, %rdi
callq 0x2300
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./WeightedDiscretePDF.cpp
// Function: WeightedDiscretePDF<int>::choose(float)
T WeightedDiscretePDF<T>::choose(float p)
{
	if (p<0.0 || p>=1.0) {
		throw std::domain_error("choose: argument(p) outside valid range");
	} else if (!m_root) {
		throw std::logic_error("choose: choose() called on empty tree");
	} else {
		float w = m_root->sumWeights * p;
		WDPDF_Node<T> *n = m_root;

		while (1) {
			if (n->left) {
				if (w<n->left->sumWeights) {
					n = n->left;
					continue;
				} else {
					w -= n->left->sumWeights;
				}
			}
			if (w<n->weight || !n->right) {
				break; // !n->right condition shouldn't be necessary, just sanity check
			}
			w -= n->weight;
			n = n->right;
		}

		return n->key;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x5264
ucomiss 0x5259(%rip), %xmm0     # 0xa470
jae 0x5264
movq (%rdi), %rax
testq %rax, %rax
je 0x5290
mulss 0x28(%rax), %xmm0
movq %rax, %rcx
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x5240
movss 0x28(%rax), %xmm1
ucomiss %xmm0, %xmm1
ja 0x5226
subss %xmm1, %xmm0
movss 0x24(%rcx), %xmm1
ucomiss %xmm0, %xmm1
ja 0x5259
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0x5259
subss %xmm1, %xmm0
jmp 0x5226
movl 0x20(%rcx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x20a0
movq %rax, %rbx
leaq 0x7138(%rip), %rsi      # 0xc3b0
movq %rax, %rdi
callq 0x20f0
movq 0xad39(%rip), %rsi      # 0xffc0
movq 0xad42(%rip), %rdx      # 0xffd0
jmp 0x52ba
movl $0x10, %edi
callq 0x20a0
movq %rax, %rbx
leaq 0x7134(%rip), %rsi      # 0xc3d8
movq %rax, %rdi
callq 0x2270
movq 0xad35(%rip), %rsi      # 0xffe8
movq 0xad1e(%rip), %rdx      # 0xffd8
movq %rbx, %rdi
callq 0x2300
jmp 0x52c4
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./WeightedDiscretePDF.cpp
// Function: WeightedDiscretePDF<int>::remove(int)
WDPDF_Node<T> **WeightedDiscretePDF<T>::lookup(T item, WDPDF_Node<T> **parent_out)
{
	WDPDF_Node<T> *n, *p=0, **np=&m_root;

	while ((n = *np)) {
		if (n->key==item) {
			break;
		} else {
			p = n;
			if (item<n->key) {
				np = &n->left;
			} else {
				np = &n->right;
			}
		}
	}

	if (parent_out)
		*parent_out = p;
	return np;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x53e4
movl 0x20(%rcx), %r8d
cmpl %esi, %r8d
jne 0x52f6
movq %rdi, %rax
jmp 0x5323
movq %rcx, %rax
xorl %edx, %edx
cmpl %esi, %r8d
setle %dl
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x53e4
movl 0x20(%rcx), %r8d
cmpl %esi, %r8d
jne 0x52f6
leaq 0x10(,%rdx,8), %rdx
addq %rdx, %rax
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0x5361
leaq 0x10(%rcx), %rsi
movq %rsi, %rax
movq %rdx, %rbx
leaq 0x18(%rdx), %rsi
movq 0x18(%rdx), %rdx
testq %rdx, %rdx
jne 0x5330
movl 0x20(%rbx), %edx
movl %edx, 0x20(%rcx)
movss 0x24(%rbx), %xmm0
movss %xmm0, 0x24(%rcx)
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x5364
movq %rsi, (%rax)
jmp 0x5370
movq %rcx, %rbx
movq 0x18(%rbx), %rsi
movq %rsi, (%rax)
testq %rsi, %rsi
je 0x5382
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsi)
cmpb $0x0, (%rbx)
jne 0x5382
callq 0x7016
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x53c1
movq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
testq %rcx, %rcx
je 0x539f
movss 0x28(%rcx), %xmm1
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x53ad
movss 0x28(%rcx), %xmm0
addss 0x24(%rax), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x28(%rax)
movq 0x8(%rax), %rax
jmp 0x5386
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %rbx, %rdi
callq 0x6c52
movl $0x30, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21b0
movl $0x10, %edi
callq 0x20a0
movq %rax, %rbx
leaq 0x7006(%rip), %rsi      # 0xc3fe
movq %rax, %rdi
callq 0x20f0
movq 0xabb9(%rip), %rsi      # 0xffc0
movq 0xabc2(%rip), %rdx      # 0xffd0
movq %rbx, %rdi
callq 0x2300
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./quasisampler_prototype.h
// Function: Quasisampler::getSamplingPoints()
std::vector<Point2D> getSamplingPoints()
  {
    if (root) delete root;
    std::vector<Point2D> pointlist;
    
    buildAdaptiveSubdivision(); 
    collectPoints(pointlist);
    return pointlist;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x5507
movq %r15, %rdi
callq 0x56ec
movl $0x78, %esi
movq %r15, %rdi
callq 0x21b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
movl $0x6, %esi
callq 0x5774
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x5994
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5552
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x2310
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./quasisampler_prototype.h
// Function: Quasisampler::TileNode::collapse()
void collapse()
    {
      // Recursively prune the tree.
      for (unsigned i=0; i<children.size(); i++) delete children[i];
      terminal = true;
      children.clear();
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rdx
cmpq %rax, %rdx
je 0x5762
movl $0x1, %ebp
xorl %ecx, %ecx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x573a
movq %r14, %rdi
callq 0x56ec
movl $0x78, %esi
movq %r14, %rdi
callq 0x21b0
movl %ebp, %ecx
movq 0x60(%rbx), %rax
movq 0x68(%rbx), %rdx
movq %rdx, %rsi
subq %rax, %rsi
sarq $0x3, %rsi
incl %ebp
cmpq %rcx, %rsi
ja 0x5729
movb $0x1, 0x5c(%rbx)
cmpq %rax, %rdx
je 0x576f
movq %rax, 0x68(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./quasisampler_prototype.h
// Function: Quasisampler::collectPoints(std::vector<Point2D, std::allocator<Point2D>>&, bool)
void collectPoints( 
    std::vector<Point2D> &pointlist,
    bool filterBounds = true )
  {
    pointlist.clear();

    Point2D pt, pt_displaced;
    unsigned importance;
    TileLeafIterator it(root);
    do {
      pt = it->getP1();  
      if ( it->isSamplingType() ) // Only "pentagonal" tiles generate sampling points.
      {   
        importance = getImportanceAt_bounded( pt );

        // Threshold the function against the F-Code value.           
        if ( importance >= calcFCodeValue( it->getFCode() , 2*it->getLevel() ) )
        {
          // Get the displaced point using the lookup table.
          pt_displaced = it->getDisplacedSamplingPoint(importance);

          if ( !filterBounds ||
            (pt_displaced.x>=0 && pt_displaced.x<width && 
            pt_displaced.y>=0 && pt_displaced.y<height) )
          {
            pointlist.push_back(pt_displaced); // collect point.
          }
        }
      }

    } while ( it.next() );

  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x59b7
movq %rax, 0x8(%r14)
movq 0x8(%r15), %r12
cmpb $0x0, 0x5c(%r12)
jne 0x59d3
movq 0x60(%r12), %rax
movq (%rax), %r12
cmpb $0x1, 0x5c(%r12)
jne 0x59c3
movq %rsp, %r13
cmpl $0x1, 0x4(%r12)
ja 0x5ad4
movsd 0x18(%r12), %xmm0
xorl %ebp, %ebp
ucomisd 0x4a35(%rip), %xmm0     # 0xa428
jb 0x5a29
movsd 0x10(%r15), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5a29
movsd 0x20(%r12), %xmm1
ucomisd 0x4a18(%rip), %xmm1     # 0xa428
jb 0x5a29
movsd 0x18(%r15), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x5a29
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movl %eax, %ebp
movl (%r12), %esi
movl 0x48(%r12), %edi
addl %esi, %esi
callq 0x6638
cmpl %eax, %ebp
jb 0x5ad4
movl 0x8(%r12), %edx
movl 0x48(%r12), %esi
movl %ebp, %edi
callq 0x66c6
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movsd 0x10(%r12), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
movupd 0x18(%r12), %xmm0
addpd %xmm1, %xmm0
movapd %xmm0, (%rsp)
testb %bl, %bl
je 0x5aaf
ucomisd 0x49a7(%rip), %xmm0     # 0xa428
jb 0x5ad4
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
ucomisd 0x4995(%rip), %xmm1     # 0xa428
setae %al
movupd 0x10(%r15), %xmm1
cmpltpd %xmm1, %xmm0
movmskpd %xmm0, %ecx
andb %cl, %al
shrb %cl
andb %cl, %al
cmpb $0x1, %al
jne 0x5ad4
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x5ac9
movapd (%rsp), %xmm0
movupd %xmm0, (%rsi)
addq $0x10, 0x8(%r14)
jmp 0x5ad4
movq %r14, %rdi
movq %r13, %rdx
callq 0x67b4
movq %r12, %rdi
callq 0x65ce
testq %rax, %rax
je 0x5aef
movq %rax, %r12
cmpb $0x0, 0x5c(%rax)
je 0x5ad4
jmp 0x59d6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./quasisampler_prototype.h
// Function: Quasisampler::TileNode::TileNode(double, double)
TileNode( double roi_width,  double roi_height)
    {
      double side = MAX(roi_width,roi_height);
      double scale = 2.0 * side;
      Point2D offset(PHI*PHI/2.0-0.25,0.125);
      *this = TileNode(NULL, TileTypeF,offset*-scale,15,0,0,scale);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
xorps %xmm2, %xmm2
movups %xmm2, 0x60(%rdi)
xorl %edx, %edx
movq %rdx, 0x70(%rdi)
maxsd %xmm1, %xmm0
addsd %xmm0, %xmm0
leaq 0x68(%rsp), %rax
movq %rdx, 0x10(%rax)
movups %xmm2, (%rax)
movq %rdx, -0x10(%rax)
movapd %xmm0, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
mulpd 0x49ba(%rip), %xmm1     # 0xa500
movupd %xmm1, -0x48(%rax)
movl $0xf, -0x58(%rax)
movl %edx, -0x8(%rax)
movsd %xmm0, -0x50(%rax)
movabsq $0x500000000, %rcx      # imm = 0x500000000
movq %rcx, -0x60(%rax)
movsd 0x48c0(%rip), %xmm2     # 0xa430
mulsd %xmm0, %xmm2
xorpd %xmm3, %xmm3
mulsd %xmm2, %xmm3
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
addpd %xmm1, %xmm2
mulsd 0x48ac(%rip), %xmm0     # 0xa438
movupd %xmm2, -0x38(%rax)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd 0x4973(%rip), %xmm0     # 0xa510
addpd %xmm1, %xmm0
movupd %xmm0, -0x28(%rax)
movl %edx, -0x18(%rax)
movb $0x1, %r8b
movb %r8b, -0x4(%rax)
leaq 0x8(%rsp), %rsi
movl $0xb, %ecx
rep  movsq (%rsi), %es:(%rdi)
movb %r8b, 0x5c(%rbx)
movl %edx, 0x58(%rbx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x6376
leaq 0x8(%rsp), %rdi
callq 0x56ec
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x56ec
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5c07
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r15, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./quasisampler_prototype.h
// Function: Quasisampler::subdivideAll(int)
void subdivideAll(int times=1)
  {
    if (!root) return;
    TileNode *tmp;
    for (int i=0;i<times;i++)  
    {
      TileLeafIterator it(root);
      do { 
        tmp = *it;
        it.next();
        tmp->refine();
      }
      while (*it);
    }
  }

// Assembly:
cmpq $0x0, 0x8(%rdi)
sete %al
testl %esi, %esi
setle %cl
orb %al, %cl
jne 0x5c85
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %ebp, %ebp
movq 0x8(%r14), %r15
cmpb $0x0, 0x5c(%r15)
jne 0x5c49
movq 0x60(%r15), %rax
movq (%rax), %r15
cmpb $0x1, 0x5c(%r15)
jne 0x5c3b
movq %r15, %r12
movq %r12, %rdi
callq 0x65ce
testq %rax, %rax
je 0x5c6f
movq %rax, %r12
cmpb $0x1, 0x5c(%rax)
jne 0x5c4c
movq %r15, %rdi
callq 0x5ce0
movq %r12, %r15
jmp 0x5c4c
movq %r15, %rdi
callq 0x5ce0
incl %ebp
cmpl %ebx, %ebp
jne 0x5c30
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ddunbar[P]PDSample/./quasisampler_prototype.h
// Function: Quasisampler::getReqSubdivisionLevel(unsigned int)
static unsigned getReqSubdivisionLevel( unsigned importance )
  {
    if (importance==0) return 0;
    unsigned nbits = (unsigned)(log( (double)importance*SQRT5 + 1.0 ) / LOG_PHI) - 1;
    if (nbits<1) nbits = 1;
    return (unsigned)ceil(0.5*nbits);
  }

// Assembly:
testl %edi, %edi
je 0x5cdc
pushq %rax
movl %edi, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x47a6(%rip), %xmm0     # 0xa440
addsd 0x47a6(%rip), %xmm0     # 0xa448
callq 0x2150
divsd 0x47a1(%rip), %xmm0     # 0xa450
cvttsd2si %xmm0, %rax
leal -0x1(%rax), %ecx
cmpl $0x1, %ecx
adcl $-0x1, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x4383(%rip), %xmm0     # 0xa050
callq 0x2060
cvttsd2si %xmm0, %rax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
nop