LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/all-maximal-sets-lexicographic.cc
// Function: google_extremal_sets::AllMaximalSetsLexicographic::GetNewEndRangeIt(__gnu_cxx::__normal_iterator<google_extremal_sets::SetProperties**, std::vector<google_extremal_sets::SetProperties*, std::allocator<google_extremal_sets::SetProperties*>>>, __gnu_cxx::__normal_iterator<google_extremal_sets::SetProperties**, std::vector<google_extremal_sets::SetProperties*, std::allocator<google_extremal_sets::SetProperties*>>>, unsigned int, unsigned int)
inline
AllMaximalSetsLexicographic::CandidateList::iterator AllMaximalSetsLexicographic::GetNewEndRangeIt(
    CandidateList::iterator begin_range_it,
    CandidateList::iterator end_range_it,
    uint32_t current_item,
    unsigned int depth) {
  ++canidate_seek_count_;
  CandidateList::iterator new_end_range_it;
  if (depth == 0) {
    // At depth 0 we can use the index rather than binary search.
    if (current_item + 1 < index_.size()) {
      new_end_range_it = candidates_.begin() + index_[current_item + 1];
      assert(new_end_range_it <= end_range_it);
    } else {
      new_end_range_it = end_range_it;
    }
  } else {
    new_end_range_it = find_new_it(
        begin_range_it,
        end_range_it,
        current_item,
        depth,
        std::equal_to<uint32_t>());
  }
  return new_end_range_it;
}

// Assembly:
pushq %rax
incq 0x10(%rdi)
testl %r8d, %r8d
je 0x2e43
movq %rdx, %rax
subq %rsi, %rax
cmpq %rdx, %rsi
je 0x2dbf
cmpq $0x0, (%rsi)
jne 0x2dbf
addq $0x8, %rsi
addq $-0x8, %rax
jmp 0x2daa
shrq $0x3, %rax
movl %r8d, %edi
testl %eax, %eax
jle 0x2e20
movl %eax, %r8d
shrl %eax
leaq (%rsi,%rax,8), %r9
cmpq %rdx, %r9
jae 0x2de4
cmpq $0x0, (%r9)
jne 0x2de4
addq $0x8, %r9
jmp 0x2dd3
cmpq %rdx, %r9
je 0x2dc6
movq (%r9), %r9
cmpl %ecx, 0x8(%r9,%rdi,4)
jne 0x2dc6
movl %eax, %r9d
leaq (%rsi,%r9,8), %rsi
addq $0x8, %rsi
notl %eax
addl %eax, %r8d
movl %r8d, %eax
cmpq %rdx, %rsi
jae 0x2e19
cmpq $0x0, (%rsi)
jne 0x2e19
addq $0x8, %rsi
decl %eax
jmp 0x2e06
cmpq %rdx, %rsi
jne 0x2dc6
jmp 0x2e89
cmpq $0x0, (%rsi)
jne 0x2e8c
leaq 0x2685(%rip), %rdi      # 0x54b2
leaq 0x2309(%rip), %rsi      # 0x513d
leaq 0x267e(%rip), %rcx      # 0x54b9
pushq $0x46
popq %rdx
callq 0x2100
incl %ecx
movq 0x30(%rdi), %rax
movq 0x38(%rdi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rcx, %rsi
jbe 0x2e89
movq (%rax,%rcx,8), %rsi
shlq $0x3, %rsi
addq 0x18(%rdi), %rsi
cmpq %rdx, %rsi
jbe 0x2e8c
leaq 0x255d(%rip), %rdi      # 0x53ce
leaq 0x22c5(%rip), %rsi      # 0x513d
leaq 0x2570(%rip), %rcx      # 0x53ef
movl $0x13f, %edx            # imm = 0x13F
callq 0x2100
movq %rdx, %rsi
movq %rsi, %rax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/all-maximal-sets-lexicographic.cc
// Function: google_extremal_sets::AllMaximalSetsLexicographic::GetNewBeginRangeIt(__gnu_cxx::__normal_iterator<google_extremal_sets::SetProperties**, std::vector<google_extremal_sets::SetProperties*, std::allocator<google_extremal_sets::SetProperties*>>>, __gnu_cxx::__normal_iterator<google_extremal_sets::SetProperties**, std::vector<google_extremal_sets::SetProperties*, std::allocator<google_extremal_sets::SetProperties*>>>, unsigned int, unsigned int)
inline
AllMaximalSetsLexicographic::CandidateList::iterator AllMaximalSetsLexicographic::GetNewBeginRangeIt(
    CandidateList::iterator begin_range_it,
    CandidateList::iterator end_range_it,
    uint32_t current_item,
    unsigned int depth) {
  ++canidate_seek_count_;
  if (depth == 0) {
    // At depth 0 we can use the index rather than binary search.
    if (current_item >= index_.size())
      return end_range_it;
    if (candidates_.begin() + index_[current_item] > begin_range_it) {
      begin_range_it = candidates_.begin() + index_[current_item];
    }
    while (begin_range_it != end_range_it && !*begin_range_it)
      ++begin_range_it;
  } else {
    begin_range_it = find_new_it(
        begin_range_it,
        end_range_it,
        current_item,
        depth,
        std::greater<uint32_t>());
  }
  return begin_range_it;
}

// Assembly:
pushq %rax
incq 0x10(%rdi)
testl %r8d, %r8d
je 0x2f3f
movq %rdx, %rax
subq %rsi, %rax
cmpq %rdx, %rsi
je 0x2ebb
cmpq $0x0, (%rsi)
jne 0x2ebb
addq $0x8, %rsi
addq $-0x8, %rax
jmp 0x2ea6
shrq $0x3, %rax
movl %r8d, %edi
testl %eax, %eax
jle 0x2f1c
movl %eax, %r8d
shrl %eax
leaq (%rsi,%rax,8), %r9
cmpq %rdx, %r9
jae 0x2ee0
cmpq $0x0, (%r9)
jne 0x2ee0
addq $0x8, %r9
jmp 0x2ecf
cmpq %rdx, %r9
je 0x2ec2
movq (%r9), %r9
cmpl %ecx, 0x8(%r9,%rdi,4)
jae 0x2ec2
movl %eax, %r9d
leaq (%rsi,%r9,8), %rsi
addq $0x8, %rsi
notl %eax
addl %eax, %r8d
movl %r8d, %eax
cmpq %rdx, %rsi
jae 0x2f15
cmpq $0x0, (%rsi)
jne 0x2f15
addq $0x8, %rsi
decl %eax
jmp 0x2f02
cmpq %rdx, %rsi
jne 0x2ec2
jmp 0x2f79
cmpq $0x0, (%rsi)
jne 0x2f7c
leaq 0x2589(%rip), %rdi      # 0x54b2
leaq 0x220d(%rip), %rsi      # 0x513d
leaq 0x26a5(%rip), %rcx      # 0x55dc
pushq $0x46
popq %rdx
callq 0x2100
movl %ecx, %eax
movq 0x30(%rdi), %rcx
movq 0x38(%rdi), %r8
subq %rcx, %r8
sarq $0x3, %r8
cmpq %rax, %r8
jbe 0x2f79
movq (%rcx,%rax,8), %rax
shlq $0x3, %rax
addq 0x18(%rdi), %rax
cmpq %rsi, %rax
cmovaq %rax, %rsi
cmpq %rdx, %rsi
je 0x2f7c
cmpq $0x0, (%rsi)
jne 0x2f7c
addq $0x8, %rsi
jmp 0x2f68
movq %rdx, %rsi
movq %rsi, %rax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/data-source-iterator.cc
// Function: google_extremal_sets::DataSourceIterator::Get(char const*)
DataSourceIterator* DataSourceIterator::Get(const char* filename) {
  FILE* data = fopen(filename, "rb");
  if (!data) {
    std::cerr << "ERROR: Failed to open input file ("
              << filename << "): " << strerror(errno) << "\n";
    return 0;
  }
  return new DataSourceIterator(data);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x20c9(%rip), %rsi      # 0x57e7
callq 0x2200
testq %rax, %rax
je 0x374d
movq %rax, %r14
pushq $0x30
popq %rdi
callq 0x21d0
movq %r14, (%rax)
andl $0x0, 0x8(%rax)
leaq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
andq $0x0, 0x18(%rax)
movb $0x0, 0x20(%rax)
jmp 0x37a5
movq 0x489c(%rip), %rdi      # 0x7ff0
leaq 0x208f(%rip), %rsi      # 0x57ea
callq 0x21b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21b0
leaq 0x209b(%rip), %rsi      # 0x580d
movq %rax, %rdi
callq 0x21b0
movq %rax, %rbx
callq 0x2030
movl (%rax), %edi
callq 0x2070
movq %rbx, %rdi
movq %rax, %rsi
callq 0x21b0
leaq 0x18e2(%rip), %rsi      # 0x507d
movq %rax, %rdi
callq 0x21b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/data-source-iterator.cc
// Function: google_extremal_sets::DataSourceIterator::Seek(long)
bool DataSourceIterator::Seek(off_t resume_offset) {
  if (fseeko(data_, resume_offset, 0)) {
    error_ = "fseek failed: " +  std::string(strerror(errno));
    return false;
  }
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq (%rdi), %rdi
xorl %edx, %edx
callq 0x20f0
movl %eax, %ebx
testl %eax, %eax
je 0x385d
callq 0x2030
movl (%rax), %edi
callq 0x2070
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x3cd6
leaq 0x1fe7(%rip), %rsi      # 0x5811
leaq 0x30(%rsp), %rdi
movq %r15, %rdx
callq 0x3cb1
addq $0x10, %r14
leaq 0x30(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2210
movq %r15, %rdi
callq 0x20c0
leaq 0x10(%rsp), %rdi
callq 0x20c0
testl %ebx, %ebx
sete %al
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/data-source-iterator.cc
// Function: google_extremal_sets::DataSourceIterator::NextText(unsigned int*, std::vector<unsigned int, std::allocator<unsigned int>>*)
int DataSourceIterator::NextText(uint32_t* vector_id, std::vector<uint32_t>* vec) {
  vec->clear();
  // First read the vector ID
  int scan_result = fscanf(data_, "%u", vector_id);
  if (!scan_result) {
    if (ferror(data_)) {
      error_ = "Dataset read error, ferror code=" + ToString(ferror(data_));
      return -1;
    }
    // Otherwise we're eof()
    return 0;
  }
  if (scan_result == EOF)
    return 0;

  // Now read the item ids, until we reach the "0" terminator.
  uint32_t item_id;
  while ((scan_result = fscanf(data_, "%u", &item_id)) != EOF && scan_result != 0) {
    if (item_id)
      vec->push_back(item_id);
    else {
      lines_processed_++;
      return 1;
    }
  }
  if (ferror(data_)) {
    error_ = "Dataset read error, ferror code=" + ToString(ferror(data_));
    return -1;
  }
  error_ = "Dataset format error: Final vector not properly terminated.";
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %rbx
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x3b80
movq %rax, 0x8(%r14)
movq (%rbx), %rdi
leaq 0x1dbe(%rip), %rsi      # 0x5948
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x22d0
cmpl $-0x1, %eax
je 0x3c76
testl %eax, %eax
jne 0x3bd5
movq (%rbx), %rdi
callq 0x22e0
testl %eax, %eax
je 0x3c76
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x3b20
leaq 0x1d2c(%rip), %rsi      # 0x58f2
leaq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0x3cb1
jmp 0x3c46
leaq 0x1d6c(%rip), %r15      # 0x5948
leaq 0xc(%rsp), %r12
movq (%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x22d0
decl %eax
cmpl $-0x3, %eax
ja 0x3c0c
cmpl $0x0, 0xc(%rsp)
je 0x3c70
movq %r14, %rdi
movq %r12, %rsi
callq 0x3dca
jmp 0x3be1
movq (%rbx), %r14
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
je 0x3c85
movq %r14, %rdi
callq 0x22e0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x3b20
leaq 0x1cb9(%rip), %rsi      # 0x58f2
leaq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0x3cb1
addq $0x10, %rbx
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2210
movq %r14, %rdi
callq 0x20c0
leaq 0x10(%rsp), %rdi
callq 0x20c0
pushq $-0x1
jmp 0x3c75
incl 0x8(%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0x10, %rbx
leaq 0x1cbb(%rip), %rsi      # 0x594b
movq %rbx, %rdi
callq 0x2300
jmp 0x3c6c
jmp 0x3c9c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/set-properties.cc
// Function: google_extremal_sets::operator<<(std::ostream&, google_extremal_sets::SetProperties const&)
std::ostream& operator<<(std::ostream& os, const SetProperties& output_me) {
  os << output_me.set_id << ": ";
  for (uint32_t i = 0; i < output_me.size; ++i) {
    if (i != 0)
      os << ' ';
    os << output_me.item[i];
  }
  return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
callq 0x2110
leaq 0x1692(%rip), %rsi      # 0x580e
movq %rax, %rdi
callq 0x21b0
xorl %r15d, %r15d
pushq $0x20
popq %rbp
movl 0x4(%r14), %eax
cmpq %rax, %r15
jae 0x41b4
testq %r15, %r15
je 0x41a2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x21f0
movl 0x8(%r14,%r15,4), %esi
movq %rbx, %rdi
callq 0x2110
incq %r15
jmp 0x418a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/akojo[P]quickfind/qfind.cpp
// Function: usage()
void usage(void)
{
    cerr << "Quickfind version 1.0" << endl;
    cerr << "Usage: qfind [-adf] <pattern> [path...]" << endl;
    cerr << "       qfind -h" << endl;
    cerr << "Where options are:" << endl;
    cerr << "  -a  Show also hidden files and directories" << endl;
    cerr << "  -d  Print matching directories" << endl;
    cerr << "  -f  Print matching files" << endl;
    cerr << "  -h  Print this info and exit" << endl;
    cerr << "Omitting both 'd' and 'f' flags is the same as specifying -df" << endl;
    exit(1);
}

// Assembly:
pushq %rbx
movq 0x4c6c(%rip), %rbx      # 0x6ff0
leaq 0x1c79(%rip), %rsi      # 0x4004
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1c78(%rip), %rsi      # 0x401a
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1c89(%rip), %rsi      # 0x4042
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1c82(%rip), %rsi      # 0x4052
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1c7e(%rip), %rsi      # 0x4065
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1c94(%rip), %rsi      # 0x4092
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1c9e(%rip), %rsi      # 0x40b3
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1ca2(%rip), %rsi      # 0x40ce
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
leaq 0x1caa(%rip), %rsi      # 0x40ed
movq %rbx, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
pushq $0x1
popq %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O2/akojo[P]quickfind/dir.cpp
// Function: walk(char*, int, std::function<void (char const*)>)
static void walk(char *name, int opts, function<void(const char*)> func) noexcept
{
    auto dir = opendir(name);
    auto namelen = strlen(name);
    auto endp = name + namelen;
    struct dirent *d;

    if (!dir) return;

    *endp++ = '/';

    while ((d = readdir(dir)) != NULL) {
        if (skip(d->d_name, opts)) continue;
        if (strlen(d->d_name) + namelen >= FILENAME_MAX) continue;

        strcpy(endp, d->d_name);

        if (is_dir(d, name)) {
           if (opts & DW_DIRECTORIES) func(name);
           walk(name, opts, func);
        }
        else if (opts & DW_FILES) {
            func(name);
        }
    }
    closedir(dir);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, 0x8(%rsp)
movl %esi, %ebp
movq %rdi, %r14
callq 0x21d0
movq %rax, %r15
movq %r14, %rdi
callq 0x2080
testq %r15, %r15
je 0x308d
movq %rax, %r12
addq %r14, %rax
incq %rax
movq %rax, 0x10(%rsp)
movb $0x2f, (%r14,%r12)
movq %r15, %rdi
callq 0x21e0
movq %rax, %rbx
testq %rax, %rax
je 0x3085
movq %rbx, %r13
cmpb $0x2e, 0x13(%rbx)
jne 0x2fd3
testb $0x1, %bpl
je 0x2f9b
movzbl 0x14(%r13), %eax
testl %eax, %eax
je 0x2f9b
cmpl $0x2e, %eax
jne 0x2fd3
cmpb $0x0, 0x15(%r13)
je 0x2f9b
addq $0x13, %rbx
movq %rbx, %rdi
callq 0x2080
addq %r12, %rax
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x2f9b
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x2120
movzbl 0x12(%r13), %eax
testl %eax, %eax
je 0x3046
cmpl $0x4, %eax
jne 0x3069
testb $0x2, %bpl
je 0x3018
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x30ee
leaq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x30a8
movq %r14, %rdi
movl %ebp, %esi
leaq 0x18(%rsp), %rbx
movq %rbx, %rdx
callq 0x2f54
movq %rbx, %rdi
callq 0x27d2
jmp 0x2f9b
movq %r14, %rdi
leaq 0x38(%rsp), %rsi
callq 0x2110
testl %eax, %eax
jne 0x3069
movl 0x50(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax           # imm = 0x4000
je 0x3005
testb $0x4, %bpl
je 0x2f9b
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x30ee
jmp 0x2f9b
movq %r15, %rdi
callq 0x2210
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x2831
nop
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/sphere.cpp
// Function: Sphere::Sphere()
Sphere::Sphere() {
    center = Vector3(0, 0, 0);
    radius = 0;

    PhongMaterial m = PhongMaterial(0, 0, 0, 0, Color(0, 0, 0), Color(0, 0, 0), Color(0, 0, 0));
    set_material(&m);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x6064(%rip), %rax      # 0x8ca0
movq %rax, (%rdi)
addq $0x10, %rdi
callq 0x2850
leaq -0xa8(%rbp), %r14
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r14, %rdi
callq 0x283c
movq 0x10(%r14), %rax
movq %rax, 0x20(%rbx)
movups (%r14), %xmm0
movups %xmm0, 0x10(%rbx)
andq $0x0, 0x28(%rbx)
leaq -0x58(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x35d8
leaq -0x48(%rbp), %r12
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x35d8
leaq -0x38(%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x35d8
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq (%r12), %rcx
movl 0x8(%r12), %r8d
movl 0x8(%r13), %eax
movq (%r13), %r9
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movq %r14, %rdi
pushq %rax
pushq %r9
callq 0x37f4
addq $0x10, %rsp
movq %r14, 0x8(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/perspective_camera.cpp
// Function: PerspectiveCamera::PerspectiveCamera(double, Vector3, Vector3, Vector3, Vector3)
PerspectiveCamera::PerspectiveCamera(double d, Vector3 lb, Vector3 h, Vector3 v, Vector3 p) {
    distance = d;
    left_bottom_pos = lb;
    horizontal = h;
    vertical = v;
    camera_pos = p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movsd %xmm0, -0x10(%rbp)
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x2850
leaq 0x20(%rbx), %rdi
callq 0x2850
leaq 0x38(%rbx), %rdi
callq 0x2850
leaq 0x50(%rbx), %rdi
callq 0x2850
movsd -0x10(%rbp), %xmm0
movsd %xmm0, (%rbx)
movq 0x20(%rbp), %rax
movq %rax, 0x18(%rbx)
movaps 0x10(%rbp), %xmm0
movups %xmm0, 0x8(%rbx)
movq 0x38(%rbp), %rax
movq %rax, 0x30(%rbx)
movups 0x28(%rbp), %xmm0
movups %xmm0, 0x20(%rbx)
movaps 0x40(%rbp), %xmm0
movups %xmm0, 0x38(%rbx)
movq 0x50(%rbp), %rax
movq %rax, 0x48(%rbx)
movups 0x58(%rbp), %xmm0
movups %xmm0, 0x50(%rbx)
movq 0x68(%rbp), %rax
movq %rax, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/perspective_camera.cpp
// Function: PerspectiveCamera::generate_ray(double, double)
Ray3 PerspectiveCamera::generate_ray(double u, double v) {
    return Ray3(
        camera_pos,
        left_bottom_pos.add(horizontal.scale(u))
                       .add(vertical.scale(v))
                       .subtract(camera_pos)
                       .normalize()
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movsd %xmm1, -0x28(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rsi), %rax
movq %rax, -0x30(%rbp)
movups 0x50(%rsi), %xmm1
movaps %xmm1, -0x40(%rbp)
leaq 0x8(%rsi), %r15
addq $0x20, %rsi
leaq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0x29d6
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
leaq -0x88(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x294c
leaq 0x38(%r14), %rsi
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movsd -0x28(%rbp), %xmm0
callq 0x29d6
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x294c
movq 0x60(%r14), %rax
movq %rax, 0x10(%rsp)
movups 0x50(%r14), %xmm0
movups %xmm0, (%rsp)
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x29a2
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x28d0
movq 0x10(%r15), %rax
movq %rax, 0x28(%rsp)
movups (%r15), %xmm0
movups %xmm0, 0x18(%rsp)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsp)
movaps -0x40(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x2ae4
movq %rbx, %rax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/geometry_union.cpp
// Function: GeometryUnion::intersect(Ray3)
IntersectResult GeometryUnion::intersect(Ray3 ray) {
    int size = geometries.size();
    double min_dis = MAX_DISTANCE;
    IntersectResult res(0, 0, Vector3(0, 0, 0), Vector3(0, 0, 0));
    for(int i = 0; i < size; i++) {
        IntersectResult tmp = geometries[i] -> intersect(ray);
        if(tmp.geometry && tmp.distance < min_dis) {
            min_dis = tmp.distance;
            res = tmp;
        }
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rbp), %r12
movq 0x8(%rsi), %r13
subq (%rsi), %r13
shrq $0x3, %r13
leaq -0xa8(%rbp), %rdi
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x283c
leaq -0xc0(%rbp), %r15
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r15, %rdi
callq 0x283c
movq 0x10(%r15), %rax
movq %r15, %rcx
leaq -0x90(%rbp), %r15
movq %rax, 0x10(%r15)
movups (%rcx), %xmm0
movaps %xmm0, (%r15)
leaq -0xa8(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x50(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
leaq 0x10(%rbx), %rdi
callq 0x2850
leaq 0x28(%rbx), %rdi
callq 0x2850
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movaps -0x50(%rbp), %xmm0
movups %xmm0, 0x10(%rbx)
movq -0x40(%rbp), %rax
movq %rax, 0x20(%rbx)
movaps (%r15), %xmm0
movups %xmm0, 0x28(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x38(%rbx)
xorl %r15d, %r15d
testl %r13d, %r13d
cmovlel %r15d, %r13d
movsd 0x2d5f(%rip), %xmm0     # 0x6110
movsd %xmm0, -0x30(%rbp)
cmpq %r15, %r13
je 0x3443
movq (%r14), %rax
movq (%rax,%r15,8), %rsi
movq (%rsi), %rax
movupd (%r12), %xmm0
movupd 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq -0x90(%rbp), %rdi
callq *(%rax)
cmpq $0x0, -0x90(%rbp)
je 0x343b
movsd -0x88(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x343b
movupd -0x90(%rbp), %xmm1
movups -0x80(%rbp), %xmm2
movups -0x70(%rbp), %xmm3
movups -0x60(%rbp), %xmm4
movups %xmm4, 0x30(%rbx)
movups %xmm3, 0x20(%rbx)
movups %xmm2, 0x10(%rbx)
movupd %xmm1, (%rbx)
movsd %xmm0, -0x30(%rbp)
incq %r15
jmp 0x33b6
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/phong_material.cpp
// Function: PhongMaterial::PhongMaterial(double, double, double, double, Color, Color, Color)
PhongMaterial::PhongMaterial(double a, double d, double s, double h, Color a_c, Color d_c, Color s_c) {
    envir_factor = a;
    diffuse_factor = d;
    specular_factor = s;
    highlight_factor = h;

    envir_color = a_c;
    diffuse_color = d_c;
    specular_color = s_c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movsd %xmm3, -0x48(%rbp)
movsd %xmm2, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq %rdi, %r13
callq 0x3ad6
leaq 0x54d4(%rip), %rax      # 0x8d08
movq %rax, (%r13)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x8(%r13)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x10(%r13)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x18(%r13)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x48(%r13)
movq %r12, 0x20(%r13)
movl %r15d, 0x28(%r13)
movq %r14, 0x2c(%r13)
movl %ebx, 0x34(%r13)
movq 0x10(%rbp), %rax
movq %rax, 0x38(%r13)
movl 0x18(%rbp), %eax
movl %eax, 0x40(%r13)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/phong_material.cpp
// Function: PhongMaterial::PhongMaterial()
PhongMaterial::PhongMaterial() {
    envir_factor = 0;
    diffuse_factor = specular_factor = 0.5;
    highlight_factor = 5;

    envir_color = Color(0, 0, 0);
    diffuse_color = specular_color = Color(255, 255, 255);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3ad6
leaq 0x545c(%rip), %rax      # 0x8d08
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
movabsq $0x4014000000000000, %rax # imm = 0x4014000000000000
movq %rax, 0x48(%rbx)
leaq -0x1c(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x35d8
movl 0x8(%r14), %eax
movl %eax, 0x28(%rbx)
movq (%r14), %rax
movq %rax, 0x20(%rbx)
movq %r14, %rdi
movl $0xff, %esi
movl $0xff, %edx
movl $0xff, %ecx
callq 0x35d8
movl 0x8(%r14), %eax
movl %eax, 0x40(%rbx)
movq (%r14), %rax
movq %rax, 0x38(%rbx)
movq (%r14), %rax
movq %rax, 0x2c(%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x34(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/phong_material.cpp
// Function: PhongMaterial::sample(Ray3, Vector3, Vector3)
Color PhongMaterial::sample(Ray3 ray, Vector3 position, Vector3 normal) {
    Vector3 light(1, 1, 1);
    double ed = normal.dot(light.normalize());
    Vector3 h = light.normalize().subtract(ray.get_dir()).normalize();
    double es = normal.dot(h);

    ed = (ed >= 0.0) ? ed : 0;
    es = (es >= 0.0) ? es : 0;
    
    Color diffuse = diffuse_color.multiply(diffuse_factor * ed);
    Color specular = specular_color.multiply(specular_factor * pow(es, highlight_factor));
    Color envir = envir_color.multiply(envir_factor);

    Color res = envir.add(specular.add(diffuse));

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xd8(%rbp), %r15
movsd 0x2742(%rip), %xmm0     # 0x6098
movq %r15, %rdi
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
callq 0x283c
leaq -0xc0(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x28d0
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
leaq 0x58(%rbp), %r12
movq %r12, %rdi
callq 0x2a36
movaps %xmm0, -0x40(%rbp)
leaq -0x60(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x28d0
leaq -0x90(%rbp), %r15
leaq 0x10(%rbp), %rsi
movq %r15, %rdi
callq 0x2b88
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
leaq -0x78(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x29a2
leaq -0xa8(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x28d0
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movupd (%r13), %xmm0
movupd %xmm0, (%rsp)
movq %r12, %rdi
callq 0x2a36
movapd %xmm0, %xmm3
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
movapd -0x40(%rbp), %xmm2
cmplesd %xmm2, %xmm0
andpd %xmm2, %xmm0
cmplesd %xmm3, %xmm1
andpd %xmm1, %xmm3
movapd %xmm3, -0x40(%rbp)
leaq 0x2c(%rbx), %rdi
mulsd 0x10(%rbx), %xmm0
callq 0x361c
movq %rax, %r12
movl %edx, %r13d
leaq 0x38(%rbx), %r14
movsd 0x18(%rbx), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd 0x48(%rbx), %xmm1
movapd -0x40(%rbp), %xmm0
callq 0x2190
mulsd -0x48(%rbp), %xmm0
movq %r14, %rdi
callq 0x361c
movq %rax, (%r15)
movl %edx, 0x8(%r15)
movsd 0x8(%rbx), %xmm0
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x361c
leaq -0x60(%rbp), %rcx
movq %rax, (%rcx)
movl %edx, 0x8(%rcx)
leaq -0x78(%rbp), %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x3600
leaq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x3600
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/cook_torrance_material.cpp
// Function: CookTorranceMaterial::CookTorranceMaterial(double, double, double, double, double, Color, Color, Color)
CookTorranceMaterial::CookTorranceMaterial(
    double envir_factor,
    double diffuse_factor,
    double specular_factor,
    double fresnel_factor,
    double roughness,
    Color envir_color,
    Color diffuse_color,
    Color specular_color
) {
    this -> envir_factor = envir_factor;
    this -> diffuse_factor = diffuse_factor;
    this -> specular_factor = specular_factor;
    this -> fresnel_factor = fresnel_factor;
    this -> roughness = roughness;
    this -> envir_color = envir_color;
    this -> diffuse_color = diffuse_color;
    this -> specular_color = specular_color;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movsd %xmm4, -0x50(%rbp)
movsd %xmm3, -0x48(%rbp)
movsd %xmm2, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq %rdi, %r13
callq 0x3ad6
leaq 0x51df(%rip), %rax      # 0x8d38
movq %rax, (%r13)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x8(%r13)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x10(%r13)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x18(%r13)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x48(%r13)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x50(%r13)
movq %r12, 0x20(%r13)
movl %r15d, 0x28(%r13)
movq %r14, 0x2c(%r13)
movl %ebx, 0x34(%r13)
movq 0x10(%rbp), %rax
movq %rax, 0x38(%r13)
movl 0x18(%rbp), %eax
movl %eax, 0x40(%r13)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/cook_torrance_material.cpp
// Function: CookTorranceMaterial::sample(Ray3, Vector3, Vector3)
Color CookTorranceMaterial::sample(Ray3 ray, Vector3 position, Vector3 normal) {
    Vector3 light(1, 1, 1);
    double ed = normal.dot(light.normalize());
    Vector3 h = light.normalize().subtract(ray.get_dir()).normalize();

    ed = (ed >= 0.0) ? ed : 0;
    
    Color diffuse = diffuse_color.multiply(diffuse_factor * ed);
    Color specular = specular_color.multiply(specular_factor * BRDF(ray, normal));
    Color envir = envir_color.multiply(envir_factor);

    Color res = envir.add(specular.add(diffuse));

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
leaq -0xd8(%rbp), %r14
movsd 0x24b0(%rip), %xmm0     # 0x6098
movq %r14, %rdi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x283c
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x28d0
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x58(%rbp), %rdi
callq 0x2a36
movaps %xmm0, -0x40(%rbp)
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x28d0
leaq -0x90(%rbp), %r14
leaq 0x10(%rbp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x2b88
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movupd (%r14), %xmm0
movupd %xmm0, (%rsp)
leaq -0x78(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x29a2
leaq -0xa8(%rbp), %rdi
movq %r12, %rsi
callq 0x28d0
xorpd %xmm0, %xmm0
movapd -0x40(%rbp), %xmm1
cmplesd %xmm1, %xmm0
andpd %xmm1, %xmm0
leaq 0x2c(%rbx), %rdi
mulsd 0x10(%rbx), %xmm0
callq 0x361c
movq %rax, -0x40(%rbp)
movl %edx, %r15d
leaq 0x38(%rbx), %r14
movsd 0x18(%rbx), %xmm0
movsd %xmm0, -0x48(%rbp)
leaq 0x58(%rbp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x40(%rsp)
movups (%rcx), %xmm0
movups %xmm0, 0x30(%rsp)
movapd (%r13), %xmm0
movaps 0x10(%r13), %xmm1
movaps 0x20(%r13), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x3d4c
mulsd -0x48(%rbp), %xmm0
movq %r14, %rdi
callq 0x361c
movq %rax, (%r12)
movl %edx, 0x8(%r12)
movsd 0x8(%rbx), %xmm0
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x361c
leaq -0x60(%rbp), %rcx
movq %rax, (%rcx)
movl %edx, 0x8(%rcx)
leaq -0x78(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %r15d, %edx
callq 0x3600
leaq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x3600
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/cook_torrance_material.cpp
// Function: CookTorranceMaterial::BRDF(Ray3, Vector3)
double CookTorranceMaterial::BRDF(Ray3 ray, Vector3 normal) {
    Vector3 light(1, 1, 1);
    double F = fresnel_reflect(ray);
    double D = shadow_mask(ray, normal);
    double G = normal_distribution(ray, normal);

    double n_dot_v = normal.dot(ray.get_dir().negate());
    double n_dot_l = normal.dot(light.normalize());

    return (F * D * G) / (n_dot_v * n_dot_l * 4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r12
leaq -0xa0(%rbp), %rbx
movsd 0x2328(%rip), %xmm0     # 0x6098
movq %rbx, %rdi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x283c
leaq 0x10(%rbp), %r15
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r12, %rdi
callq 0x3ec0
movsd %xmm0, -0x40(%rbp)
leaq 0x40(%rbp), %r14
movq 0x10(%r14), %rax
movq %rax, 0x40(%rsp)
movaps (%r14), %xmm0
movups %xmm0, 0x30(%rsp)
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r12, %rdi
callq 0x3fd4
movsd %xmm0, -0x38(%rbp)
movq 0x10(%r14), %rax
movq %rax, 0x40(%rsp)
movaps (%r14), %xmm0
movups %xmm0, 0x30(%rsp)
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x40f4
movsd %xmm0, -0x30(%rbp)
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2b88
leaq -0x88(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x2926
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movups (%r15), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2a36
movsd %xmm0, -0x28(%rbp)
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28d0
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movupd (%r15), %xmm0
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2a36
movsd -0x38(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
mulsd -0x30(%rbp), %xmm1
mulsd -0x28(%rbp), %xmm0
mulsd 0x22b9(%rip), %xmm0     # 0x6160
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/cook_torrance_material.cpp
// Function: CookTorranceMaterial::shadow_mask(Ray3, Vector3)
double CookTorranceMaterial::shadow_mask(Ray3 ray, Vector3 normal) {
    Vector3 light(1, 1, 1);
    Vector3 h = light.normalize().subtract(ray.get_dir()).normalize();
    double n_dot_h = normal.dot(h);
    double a = 1.0 / (roughness * roughness * pow(n_dot_h, 4) * 4);
    double b = (n_dot_h * n_dot_h - 1) / (roughness * roughness * n_dot_h * n_dot_h);
    return a * exp(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq -0xa8(%rbp), %r14
movsd 0x20a2(%rip), %xmm0     # 0x6098
movsd %xmm0, -0x20(%rbp)
movq %r14, %rdi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x283c
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x28d0
leaq -0x48(%rbp), %r14
leaq 0x10(%rbp), %rsi
movq %r14, %rdi
callq 0x2b88
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
leaq -0x78(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x29a2
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x28d0
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movupd (%r15), %xmm0
movupd %xmm0, (%rsp)
leaq 0x40(%rbp), %rdi
callq 0x2a36
movsd %xmm0, -0x30(%rbp)
movsd 0x50(%rbx), %xmm1
mulsd %xmm1, %xmm1
movsd %xmm1, -0x28(%rbp)
movsd 0x20cf(%rip), %xmm1     # 0x6160
callq 0x2190
mulsd -0x28(%rbp), %xmm0
mulsd 0x20bd(%rip), %xmm0     # 0x6160
movsd -0x20(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x20(%rbp)
movsd -0x30(%rbp), %xmm2
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd 0x20aa(%rip), %xmm0     # 0x6170
movsd 0x50(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x21b0
mulsd -0x20(%rbp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/cook_torrance_material.cpp
// Function: CookTorranceMaterial::normal_distribution(Ray3, Vector3)
double CookTorranceMaterial::normal_distribution(Ray3 ray, Vector3 normal) {
    Vector3 light(1, 1, 1);
    Vector3 h = light.normalize().subtract(ray.get_dir()).normalize();

    double n_dot_h = normal.dot(h);
    double v_dot_h = ray.get_dir().negate().dot(h);

    double g1 = 2 * n_dot_h * normal.dot(light.normalize()) / v_dot_h;
    double g2 = 2 * n_dot_h * normal.dot(ray.get_dir().negate()) / v_dot_h;

    return std::min(std::min(1.0, g1), g2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
leaq -0xe8(%rbp), %r14
movsd 0x1f81(%rip), %xmm0     # 0x6098
movq %r14, %rdi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
callq 0x283c
leaq -0x70(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x28d0
leaq -0xb8(%rbp), %r12
leaq 0x10(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2b88
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
leaq -0x58(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x29a2
leaq -0xd0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x28d0
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rbp), %r15
movq %r15, %rdi
callq 0x2a36
movsd %xmm0, -0x30(%rbp)
leaq -0x70(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2b88
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2926
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x2a36
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28d0
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movupd (%rbx), %xmm0
movupd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x2a36
mulsd -0x30(%rbp), %xmm0
divsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
leaq 0x10(%rbp), %rsi
callq 0x2b88
leaq -0x88(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2926
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movupd (%r14), %xmm0
movupd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x2a36
mulsd -0x30(%rbp), %xmm0
divsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
minsd 0x1e1b(%rip), %xmm1     # 0x6098
minsd %xmm1, %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/checker_material.cpp
// Function: CheckMaterial::CheckMaterial(double, double, double, double, double, Color, Color)
CheckMaterial::CheckMaterial(double sc, double a, double d, double s, double h, Color a_c, Color s_c) {
    scale = sc;
    envir_factor = a;
    diffuse_factor = d;
    specular_factor = s;
    highlight_factor = h;
    envir_color = a_c;
    specular_color = s_c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movsd %xmm4, -0x50(%rbp)
movsd %xmm3, -0x48(%rbp)
movsd %xmm2, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq %rdi, %r13
callq 0x3ad6
leaq 0x4a8f(%rip), %rax      # 0x8d68
movq %rax, (%r13)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x48(%r13)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x8(%r13)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x10(%r13)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x18(%r13)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x50(%r13)
movq %r12, 0x20(%r13)
movl %r15d, 0x28(%r13)
movq %r14, 0x38(%r13)
movl %ebx, 0x40(%r13)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Crawler995[P]Cpp-Ray-Tracing/libs/plane.cpp
// Function: Plane::intersect(Ray3)
IntersectResult Plane::intersect(Ray3 ray) {
    IntersectResult res(0, 0, Vector3(0, 0, 0), Vector3(0, 0, 0));
    double a = ray.get_dir().dot(normal);

    if(a >= 0) {
        return res;
    }

    double b = normal.dot(ray.get_origin().add(normal.scale(distance)));
    double dis = -b / a;

    res.geometry = this;
    res.distance = dis;
    res.position = ray.get_point(res.distance);
    res.normal = normal;

    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq -0xd0(%rbp), %r12
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r12, %rdi
callq 0x283c
leaq -0xb8(%rbp), %r13
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r13, %rdi
callq 0x283c
movq 0x10(%r13), %rax
leaq -0x70(%rbp), %r14
movq %rax, 0x10(%r14)
movups (%r13), %xmm0
movaps %xmm0, (%r14)
movups (%r12), %xmm0
movaps %xmm0, -0x50(%rbp)
movq 0x10(%r12), %rax
movq %rax, -0x40(%rbp)
leaq 0x10(%rbx), %rdi
movq %rdi, -0x38(%rbp)
callq 0x2850
leaq 0x28(%rbx), %r13
movq %r13, %rdi
callq 0x2850
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movaps -0x50(%rbp), %xmm0
movups %xmm0, 0x10(%rbx)
movq -0x40(%rbp), %rax
movq %rax, 0x20(%rbx)
movaps (%r14), %xmm0
movups %xmm0, 0x28(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x38(%rbx)
movq %r14, %rdi
leaq 0x10(%rbp), %rsi
movq %rsi, %r12
callq 0x2b88
movq 0x20(%r15), %rax
movq %rax, 0x10(%rsp)
movupd 0x10(%r15), %xmm0
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2a36
ucomisd 0x1a8d(%rip), %xmm0     # 0x61a0
jae 0x47d4
leaq 0x10(%r15), %r14
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
movsd %xmm0, -0x30(%rbp)
callq 0x2b70
movsd 0x28(%r15), %xmm0
leaq -0x88(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x29d6
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movups (%r12), %xmm0
movups %xmm0, (%rsp)
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
leaq -0x70(%rbp), %rsi
callq 0x294c
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsp)
movupd (%r12), %xmm0
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2a36
xorpd 0x194f(%rip), %xmm0     # 0x60e0
divsd -0x30(%rbp), %xmm0
movq %r15, (%rbx)
movsd %xmm0, 0x8(%rbx)
leaq -0x70(%rbp), %r15
movq %r15, %rdi
leaq 0x10(%rbp), %rsi
callq 0x2b22
movq 0x10(%r15), %rax
movq -0x38(%rbp), %rcx
movq %rax, 0x10(%rcx)
movups (%r15), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%r13)
movupd (%r14), %xmm0
movupd %xmm0, (%r13)
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/fastahack/Fasta.cpp
// Function: FastaReference::getSequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string FastaReference::getSequence(string seqname) {
    FastaIndexEntry entry = index->entry(seqname);
    int newlines_in_sequence = entry.length / entry.line_blen;
    int seqlen = newlines_in_sequence  + entry.length;
    char* seq = (char*) calloc (seqlen + 1, sizeof(char));
    fseek64(file, entry.offset, SEEK_SET);
    string s;
    if (fread(seq, sizeof(char), seqlen, file)) {
        seq[seqlen] = '\0';
        char* pbegin = seq;
        char* pend = seq + (seqlen/sizeof(char));
        pend = remove(pbegin, pend, '\n');
        pend = remove(pbegin, pend, '\0');
        s = seq;
        free(seq);
        s.resize((pend - pbegin)/sizeof(char));
    }
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq 0x40(%rsi), %r15
leaq 0x48(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x3310
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x413e
leaq 0x48(%rsp), %rdi
callq 0x3120
movl 0x30(%rsp), %ecx
movl %ecx, %eax
cltd
idivl 0x40(%rsp)
leal (%rax,%rcx), %r13d
addl %ecx, %eax
incl %eax
movslq %eax, %rdi
pushq $0x1
popq %rbp
movq %rbp, %rsi
callq 0x3190
movq %rax, %r15
movq 0x28(%r12), %rdi
movq 0x38(%rsp), %rsi
xorl %edx, %edx
callq 0x3170
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movslq %r13d, %r13
movq 0x28(%r12), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x3360
testq %rax, %rax
je 0x44df
leaq (%r15,%r13), %rsi
movb $0x0, (%r15,%r13)
leaq 0xf(%rsp), %rdx
movb $0xa, (%rdx)
movq %r15, %rdi
callq 0x5fc2
leaq 0xf(%rsp), %rdx
movb $0x0, (%rdx)
movq %r15, %rdi
movq %rax, %rsi
callq 0x5fc2
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3450
movq %r15, %rdi
callq 0x32c0
subq %r15, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3320
leaq 0x10(%rsp), %rdi
callq 0x3120
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4507
jmp 0x4507
movq %rax, %r15
movq %r13, %r14
jmp 0x4512
movq %rax, %r15
movq %rbx, %rdi
callq 0x3120
movq %r14, %rdi
callq 0x3120
movq %r15, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/soccin[P]BIC-RNAseq/tools/MergeFusion/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    parseOption(argc, argv);
    Merger my_merger;
    if(normalize_gene)
        my_merger.loadHugoFile(hugo_data_file.c_str());
    //my_merger.printHugoMap();
    for(size_t i = 0; i < input_files.size(); i++)
    {
        my_merger.loadFusionFile(input_files[i].first.c_str(), input_files[i].second, normalize_chrom, normalize_gene);
    }
    if(!sorting_criteria.empty())
        my_merger.sortBy(sorting_criteria);
    my_merger.outputStandardFusion(output_file.c_str());
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
callq 0x2788
leaq -0x88(%rbp), %rdi
callq 0x30d8
cmpb $0x0, 0xb81e(%rip)      # 0xe3e8
je 0x2bdf
movq 0xb81d(%rip), %rsi      # 0xe3f0
leaq -0x88(%rbp), %rdi
callq 0x393e
pushq $0x20
popq %r14
xorl %r15d, %r15d
pushq $0x28
popq %r12
leaq -0x88(%rbp), %rbx
movq 0xb7a0(%rip), %rax      # 0xe398
movq 0xb791(%rip), %rcx      # 0xe390
subq %rcx, %rax
cqto
idivq %r12
cmpq %rax, %r15
jae 0x2c35
movq -0x20(%rcx,%r14), %rsi
movl (%rcx,%r14), %edx
movzbl 0xb5b4(%rip), %ecx      # 0xe1d0
movzbl 0xb7c4(%rip), %r8d      # 0xe3e8
movq %rbx, %rdi
callq 0x3124
incq %r15
addq $0x28, %r14
jmp 0x2bf1
cmpq $0x0, 0xb793(%rip)      # 0xe3d0
je 0x2c68
leaq 0xb782(%rip), %rsi      # 0xe3c8
leaq -0x40(%rbp), %rdi
callq 0x2240
leaq -0x88(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x34ea
leaq -0x40(%rbp), %rdi
callq 0x2388
movq 0xb739(%rip), %rsi      # 0xe3a8
leaq -0x88(%rbp), %rdi
callq 0x33ea
leaq -0x88(%rbp), %rdi
callq 0x3104
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2388
jmp 0x2ca9
jmp 0x2ca6
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x3104
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/soccin[P]BIC-RNAseq/tools/MergeFusion/Merger.cpp
// Function: Merger::outputStandardFusion(char const*)
void Merger::outputStandardFusion(const char* filename)
{
#ifdef _DEBUG
    cout << "[DEBUG]: Printing result to: " << filename << endl;
#endif
    ofstream output_fs(filename);
    if(!output_fs)
    {
        cerr << "Error: fail to open output file: " << filename << endl;
        exit(1);
    }
    output_fusion_header(output_fs);
    for(size_t i = 0; i < fusion_vec.size(); i++)
        output_fs << fusion_vec[i] << endl;
    output_fs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x228(%rbp), %r15
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x208(%rbp,%rax)
jne 0x34a3
leaq -0x228(%rbp), %rdi
callq 0x802a
xorl %r15d, %r15d
movl $0x150, %r12d           # imm = 0x150
leaq -0x228(%rbp), %r14
xorl %r13d, %r13d
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
cqto
idivq %r12
cmpq %rax, %r13
jae 0x3479
addq %r15, %rsi
movq %r14, %rdi
callq 0x8225
movq %rax, %rdi
callq 0x2100
incq %r13
addq $0x150, %r15            # imm = 0x150
jmp 0x3446
leaq -0x228(%rbp), %rdi
callq 0x2250
leaq -0x228(%rbp), %rdi
callq 0x2270
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xab46(%rip), %rdi      # 0xdff0
leaq 0x60f0(%rip), %rsi      # 0x95a1
callq 0x21b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
movq %rax, %rdi
callq 0x2100
pushq $0x1
popq %rdi
callq 0x2210
jmp 0x34d3
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x2270
movq %rbx, %rdi
callq 0x2300