LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_writer_t<unsigned char, 6u, 4194304ul>::seek(unsigned int, unsigned long)
void seek(const suint_t i, const luint_t new_pos) {
    if (bases[i] == nullptr || new_pos < pos[i] || new_pos >= pos[i]+L) {
      if (bases[i] != nullptr) {
        munmap(bases[i], L);
      }
      pos[i] = new_pos - (new_pos % L);
      bases[i] = static_cast<t*>(
          mmap(nullptr, sizeof(t)*L, PROT_READ | PROT_WRITE, MAP_SHARED, fno,
               static_cast<__off_t>(pos[i]))
      );
      assert(bases[i] != MAP_FAILED);
    }
    off[i] = new_pos - pos[i];
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, %r15d
movq 0x68(%rdi,%r15,8), %rdi
testq %rdi, %rdi
je 0x5132
movq 0x8(%r14,%r15,8), %rax
cmpq %rbx, %rax
setbe %cl
leaq 0x400000(%rax), %rdx
cmpq %rbx, %rdx
seta %dl
testb %dl, %cl
jne 0x5166
movl $0x400000, %esi         # imm = 0x400000
callq 0x2120
movq %rbx, %r9
andq $-0x400000, %r9         # imm = 0xFFC00000
movq %r9, 0x8(%r14,%r15,8)
movl (%r14), %r8d
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
movl $0x400000, %esi         # imm = 0x400000
xorl %edi, %edi
callq 0x23e0
movq %rax, 0x68(%r14,%r15,8)
cmpq $-0x1, %rax
je 0x5174
movq 0x8(%r14,%r15,8), %rax
subq %rax, %rbx
movq %rbx, 0x38(%r14,%r15,8)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x43af(%rip), %rdi      # 0x952a
leaq 0x4139(%rip), %rsi      # 0x92bb
leaq 0x43b8(%rip), %rcx      # 0x9541
movl $0x93, %edx
callq 0x2140
nop
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_reader_t<unsigned char, 4194304ul>::read()
T read() {
    assert(base != nullptr);
    assert(off < L);
    const T res = base[off];
    ++off;
    if (off>=L) seek(pos+off);
    return res;
  }

// Assembly:
pushq %rbx
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x51d1
movq 0x10(%rdi), %rcx
cmpq $0x400000, %rcx         # imm = 0x400000
jae 0x51f0
movb (%rax,%rcx), %bl
leaq 0x1(%rcx), %rax
movq %rax, 0x10(%rdi)
cmpq $0x3fffff, %rcx         # imm = 0x3FFFFF
jne 0x51cd
movl $0x400000, %esi         # imm = 0x400000
addq 0x8(%rdi), %rsi
callq 0x505c
movl %ebx, %eax
popq %rbx
retq
leaq 0x41b3(%rip), %rdi      # 0x938b
leaq 0x40dc(%rip), %rsi      # 0x92bb
leaq 0x43cc(%rip), %rcx      # 0x95b2
movl $0x11d, %edx            # imm = 0x11D
callq 0x2140
leaq 0x41f8(%rip), %rdi      # 0x93ef
leaq 0x40bd(%rip), %rsi      # 0x92bb
leaq 0x43ad(%rip), %rcx      # 0x95b2
movl $0x11e, %edx            # imm = 0x11E
callq 0x2140
nop
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_writer_t<unsigned char, 6u, 4194304ul>::write(unsigned int, unsigned char)
void write(const suint_t i, const T el) {
    assert(i<N);
    assert(bases[i] != nullptr);
    assert(off[i] < L);
    if (bases[i][off[i]] != el) bases[i][off[i]] = el;
    ++off[i];
    if (off[i]>=L) seek(i, pos[i]+off[i]);
  }

// Assembly:
pushq %rax
cmpl $0x6, %esi
jae 0x52c7
movl %esi, %ecx
movq 0x68(%rdi,%rcx,8), %r8
testq %r8, %r8
je 0x52e6
movl %edx, %eax
movq 0x38(%rdi,%rcx,8), %rdx
cmpq $0x400000, %rdx         # imm = 0x400000
jae 0x5305
cmpb %al, (%r8,%rdx)
je 0x52a9
movb %al, (%r8,%rdx)
movq 0x38(%rdi,%rcx,8), %rdx
incq %rdx
movq %rdx, 0x38(%rdi,%rcx,8)
cmpq $0x400000, %rdx         # imm = 0x400000
jb 0x52c5
addq 0x8(%rdi,%rcx,8), %rdx
popq %rax
jmp 0x50f4
popq %rax
retq
leaq 0x432c(%rip), %rdi      # 0x95fa
leaq 0x3fe6(%rip), %rsi      # 0x92bb
leaq 0x4322(%rip), %rcx      # 0x95fe
movl $0x9f, %edx
callq 0x2140
leaq 0x437d(%rip), %rdi      # 0x966a
leaq 0x3fc7(%rip), %rsi      # 0x92bb
leaq 0x4303(%rip), %rcx      # 0x95fe
movl $0xa0, %edx
callq 0x2140
leaq 0x4372(%rip), %rdi      # 0x967e
leaq 0x3fa8(%rip), %rsi      # 0x92bb
leaq 0x42e4(%rip), %rcx      # 0x95fe
movl $0xa1, %edx
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: compute_Lpos(unsigned long*, unsigned long, unsigned long const*)
inline
bool compute_Lpos(
  luint_t* const Lpos,
  const luint_t b,
  const luint_t* Lcount
) {
  Lpos[0] = b;
  for (enc_nucl_t sigma = 1; sigma<ALPHSIZE; ++sigma) {
    Lpos[sigma] = Lpos[sigma-1] + Lcount[sigma-1];
  }
  bool this_has_pseg_wider_than_1 = false;
  for (enc_nucl_t sigma = 1; sigma<ALPHSIZE; ++sigma) {
    this_has_pseg_wider_than_1 |= (Lcount[sigma] > 1);
  }
  return this_has_pseg_wider_than_1;
}

// Assembly:
movq %rsi, (%rdi)
xorl %eax, %eax
cmpq $0x5, %rax
je 0x533d
addq (%rdx,%rax,8), %rsi
movq %rsi, 0x8(%rdi,%rax,8)
incq %rax
jmp 0x5329
pushq $0x1
popq %rcx
xorl %eax, %eax
cmpq $0x6, %rcx
je 0x5359
cmpq $0x2, (%rdx,%rcx,8)
setae %sil
orb %sil, %al
incq %rcx
jmp 0x5342
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: mmap_writer_t<unsigned char, 6u, 4194304ul>::~mmap_writer_t()
~mmap_writer_t() {
    for (suint_t i= 0; i < N; ++i) {
      if (bases[i] != nullptr) munmap(bases[i], L);
      bases[i] = nullptr;
    }
    if (fno >= 0) close(fno);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0xd
popq %r14
cmpq $0x13, %r14
je 0x53da
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x53d0
movl $0x400000, %esi         # imm = 0x400000
callq 0x2120
andq $0x0, (%rbx,%r14,8)
incq %r14
jmp 0x53b7
movl (%rbx), %edi
testl %edi, %edi
js 0x53e5
callq 0x2430
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x5c29
nop
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: seq_reader_t<unsigned char>::seq_reader_t(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*)
seq_reader_t(const fname_t& fname, const char* mode = "rb") {
    f = fopen(fname.c_str(), mode);
    assert(f != nullptr);
    int fno = fileno(f);
    posix_fadvise(fno, 0, 0, POSIX_FADV_SEQUENTIAL);
    posix_fadvise(fno, 0, 0, POSIX_FADV_WILLNEED);
    read();
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
movq %rdx, %rsi
callq 0x2290
movq %rax, (%rbx)
testq %rax, %rax
je 0x5443
movq %rax, %rdi
callq 0x2270
movl %eax, %ebp
pushq $0x2
popq %rcx
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21b0
pushq $0x3
popq %rcx
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5492
leaq 0x3e64(%rip), %rdi      # 0x92ae
leaq 0x3e6a(%rip), %rsi      # 0x92bb
leaq 0x4231(%rip), %rcx      # 0x9689
pushq $0x20
popq %rdx
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: void create_empty_file<unsigned char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
void create_empty_file(const fname_t& fname, const luint_t n) {
  int fno = creat(fname.c_str(), 0666);
#ifdef FALLOC_FL_ZERO_RANGE
  fallocate(fno, FALLOC_FL_ZERO_RANGE, 0, static_cast<__off_t>(n*sizeof(T)));
#else
  fallocate(fno, 0, 0, static_cast<__off_t>(n*sizeof(T)));
#endif
  close(fno);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rdi
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x2180
movl %eax, %ebp
pushq $0x10
popq %rsi
movl %eax, %edi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x21e0
movl %ebp, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2430
nop
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: seq_reader_t<unsigned char>::read()
T read() {
    T res = el;
    if (sizeof(T) == sizeof(unsigned char)) {
      el = static_cast<T>(getc_unlocked(f));
    } else {
      fread_unlocked(&el, sizeof(T), 1, f);
    }
    return res;
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x8(%rdi), %bpl
movq (%rdi), %rdi
callq 0x2420
movb %al, 0x8(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/bwt_lcp.cpp
// Function: base_env_t::base_env_t(unsigned char, unsigned int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, mmap_swriter_t<unsigned char, 4194304ul>&)
base_env_t(
      const strlen_t _k,
      const strnum_t _m,
      const fnames_t& _IX_names,
      lcp_writer_t& _LCP
  )
    : k(_k),
      m(_m),
      IX_names(_IX_names),
      LCP(_LCP),
      p(0),
      midpoints{new luint_t[concurrency_level]},
      E(static_cast<luint_t>(_m)*(_k+1), false)
  {
    const luint_t tot = static_cast<luint_t>(m)*(k+1);
    const luint_t step =
      atleast1(tot/concurrency_level + ((tot%concurrency_level)>(concurrency_level/2) ? 1 : 0));
    for (luint_t i = 0, pos = step; i<concurrency_level-1; ++i, pos += step) {
      midpoints[i] = pos;
    }
    midpoints[concurrency_level-1] = tot;

    E[tot-1] = true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %rbx
movb %bpl, (%rdi)
movl %edx, 0x4(%rdi)
movq %rcx, 0x8(%rdi)
movq %r8, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x21(%rdi)
movl 0x9cf8(%rip), %edi      # 0xf240
shlq $0x3, %rdi
callq 0x2030
movq %rax, 0x38(%rbx)
leaq 0x40(%rbx), %r14
movl %r15d, %eax
movzbl %bpl, %esi
incq %rsi
imulq %rax, %rsi
leaq 0x7(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x6(%rsp), %rcx
movq %r14, %rdi
callq 0x5caa
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
andq $0x0, 0x88(%rbx)
movl 0x4(%rbx), %eax
movzbl (%rbx), %esi
incq %rsi
imulq %rax, %rsi
movl 0x9c9e(%rip), %edi      # 0xf240
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
xorl %ecx, %ecx
movl %edi, %r8d
shrl %r8d
xorl %r9d, %r9d
cmpq %r8, %rdx
seta %r9b
leal -0x1(%rdi), %edx
leaq (%rax,%r9), %rdi
cmpq $0x1, %rdi
adcq %r9, %rax
movq 0x38(%rbx), %rdi
movq %rax, %r8
cmpq %rcx, %rdx
je 0x55e2
movq %r8, (%rdi,%rcx,8)
incq %rcx
addq %rax, %r8
jmp 0x55d1
movq 0x38(%rbx), %rax
movq %rsi, (%rax,%rdx,8)
decq %rsi
movq %r14, %rdi
callq 0x5210
orq %rdx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x5d0e
jmp 0x5615
jmp 0x5612
movq %rax, %r15
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x538a
movq %r15, %rdi
callq 0x23d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: optifasta_reader_t<unsigned char, 2u>::advance()
void advance() {
    if (nel == 0 && !iseof) {
      if (reader.has_next()) {
        io_el = reader.read();
        nel = NEL;
      } else {
        iseof = true;
      }
    }
    if (!iseof) {
      result = (io_el & MASK) >> ((NEL - 1) * SHIFT);
      io_el <<= SHIFT;
      --nel;
      if (result == EOFEL) {
        nel = 0;
        iseof = true;
      }
    }
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
jne 0x668c
cmpb $0x0, 0x16(%rbx)
jne 0x668c
movq %rbx, %rdi
callq 0x6648
testb %al, %al
je 0x6688
movq %rbx, %rdi
callq 0x5492
movb %al, 0x14(%rbx)
movl $0x2, 0x10(%rbx)
jmp 0x668c
movb $0x1, 0x16(%rbx)
cmpb $0x0, 0x16(%rbx)
jne 0x66b3
movb 0x14(%rbx), %al
movl %eax, %ecx
shrb $0x4, %cl
movb %cl, 0x15(%rbx)
shlb $0x4, %al
movb %al, 0x14(%rbx)
decl 0x10(%rbx)
cmpb $0xf, %cl
jne 0x66b3
andl $0x0, 0x10(%rbx)
movb $0x1, 0x16(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/AlgoLab[P]bwt-lcp-parallel/./io.hpp
// Function: seq_reader_t<unsigned int>::operator=(seq_reader_t<unsigned int>&&)
my_t& operator=(my_t&& other) {
    if (f != nullptr) fclose(f);
    f = other.f;
    el = other.el;
    other.f = nullptr;
    return *this;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x67d1
callq 0x2240
movq (%r14), %rax
movq %rax, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
andq $0x0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/bndm_t.c
// Function: main
int main(int argc, char **argv)
{
    plan_tests(1);
    char dflt[] = "one", *patt = argc > 1 ? argv[1] : dflt;
    char const *util = getenv("util") ? getenv("util") : ".";
    char const *file = argc > 1 ? argv[1] : "words";
    FILE *fp = fopenf("r", "%s/%s", util, file);
    if (!fp) return fprintf(stderr, "bndm_t: cannot open %s\n", file);
    int patlen = strlen(patt), lines = 0, goods = 0, hits = 0;
    char buf[999];

    while (fgets(buf, sizeof buf, fp)) {
        lines++;
        char *cp = strstr(buf, patt);
        hits += !!cp;
        if (cp == bndmem(buf, strlen(buf) - 1, patt, patlen)) ++goods;
        else fprintf(stderr, "# failed: %s", buf);
    }
    ok(goods == lines, "strstr == bndmem %d/%d times (%d hits)", goods, lines, hits);

    return exit_status();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %r14
movl %edi, %ebp
pushq $0x1
popq %rdi
callq 0x5193
movl $0x656e6f, 0x14(%rsp)   # imm = 0x656E6F
cmpl $0x2, %ebp
jl 0x349d
movq 0x8(%r14), %rbx
jmp 0x34a2
leaq 0x14(%rsp), %rbx
leaq 0x2b5b(%rip), %rdi      # 0x6004
callq 0x3230
testq %rax, %rax
leaq 0x3502(%rip), %rdx      # 0x69ba
cmovneq %rax, %rdx
cmpl $0x2, %ebp
jl 0x34c7
movq 0x8(%r14), %r15
jmp 0x34ce
leaq 0x2b3b(%rip), %r15      # 0x6009
leaq 0x35b0(%rip), %rdi      # 0x6a85
leaq 0x2b33(%rip), %rsi      # 0x600f
movq %r15, %rcx
xorl %eax, %eax
callq 0x4176
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x35fc
movq %rbx, %rdi
callq 0x30a0
movq %rax, %r15
leaq 0x20(%rsp), %r12
xorl %r13d, %r13d
movq $0x0, 0x8(%rsp)
xorl %r14d, %r14d
movq %r12, %rdi
movl $0x3e7, %esi            # imm = 0x3E7
movq 0x18(%rsp), %rdx
callq 0x32c0
testq %rax, %rax
je 0x358f
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3050
movq %rax, %rbp
cmpq $0x1, %rax
sbbl $-0x1, %r14d
movq %r12, %rdi
callq 0x30a0
leal -0x1(%rax), %esi
movq %r12, %rdi
movq %rbx, %rdx
movl %r15d, %ecx
callq 0x3628
cmpq %rax, %rbp
je 0x357e
movq 0x5a7b(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x2abe(%rip), %rsi      # 0x602d
movq %r12, %rdx
xorl %eax, %eax
callq 0x3290
incl %r13d
jmp 0x3513
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
incl %r13d
jmp 0x3513
movq 0x8(%rsp), %rbx
leaq 0x2aad(%rip), %r10      # 0x6048
leaq 0x2a9d(%rip), %r11      # 0x603f
leaq 0x2a91(%rip), %r9       # 0x603a
cmpl %r13d, %ebx
jne 0x35c4
pushq $0x1
popq %rsi
xorl %edi, %edi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r14
pushq %r13
pushq %r13
jmp 0x35d6
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %r14
pushq %r13
pushq %rbx
pushq %r10
pushq $0x2a
pushq %r11
callq 0x4884
addq $0x30, %rsp
callq 0x5431
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x59dd(%rip), %rax      # 0x8fe0
movq (%rax), %rdi
leaq 0x2a08(%rip), %rsi      # 0x6015
movq %r15, %rdx
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3290
// File: /workspace/github_cpp_makefile_star2_O2/walker-xian[P]teisye/heapperf/heapperf.cpp
// Function: main
int main(int argc, char **argv)
{
    try
    {
        application app;

        app.parse_args(argc, argv);
        app.run();
    }
    catch (const std::exception& e)
    {
        cerr << e.what() << endl;
    }

    return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rdx
movl %edi, %eax
leaq 0x1c36c(%rip), %rsi     # 0x20a20
pushq $0xf
popq %rcx
leaq 0x8(%rsp), %r8
movq %r8, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0xf947(%rip), %xmm0     # 0x14010
movups %xmm0, 0x78(%r8)
movq %r8, %rdi
movl %eax, %esi
callq 0x47fa
leaq 0x8(%rsp), %rdi
callq 0x4ad6
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x472c
movq %rbx, %rdi
callq 0x4100
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x1c8db(%rip), %rdi     # 0x20fe8
movq %rax, %rsi
callq 0x4300
movq %rax, %rdi
callq 0x4170
callq 0x4440
jmp 0x46e2
movq %rax, %rbx
callq 0x4440
movq %rbx, %rdi
callq 0x44c0
movq %rax, %rdi
callq 0x50dd
// File: /workspace/github_cpp_makefile_star2_O2/walker-xian[P]teisye/src/teisye.cpp
// Function: tssize
size_t tssize(const void* ptr)
{
    using namespace teisye;
    if (!ptr) return static_cast<size_t>(-1);
    auto unit = reinterpret_cast<memory_unit*>(reinterpret_cast<size_t>(ptr) - sizeof(memory_unit::header));
    if (!_heap.validate(unit)) return static_cast<size_t>(-1);
    return unit->_header._size;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbx
testq %rdi, %rdi
je 0x125e5
movq %rdi, %r14
addq $-0x8, %r14
leaq 0xf5fb(%rip), %rdi      # 0x21bd0
movq %r14, %rsi
callq 0x1298e
testb %al, %al
je 0x125e5
movl 0x4(%r14), %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/walker-xian[P]teisye/src/teisye.cpp
// Function: teisye::heap::free(void*)
inline void free(void* ptr) noexcept
    {
        if (!ptr) return;

        auto unit = reinterpret_cast<memory_unit*>(reinterpret_cast<size_t>(ptr) - sizeof(memory_unit::header));
        if (!validate(unit)) return;

        if (unit->_header._idle) return;
        unit->_header._idle = true;

        auto key = unit->_header._key;
        if (key <= _book.key_max_small())
        {
            _thread_cache.free(unit);
        }
        else if (key <= _book.key_max_medium())
        {
            _shared_cache.free(unit);
        }
        else if (key <= _book.key_max_large())
        {
            _large.free(unit);
        }
        else
        {
            auto hu = reinterpret_cast<huge_unit*>(reinterpret_cast<size_t>(unit) - sizeof(huge_unit::_raw_ptr));
            ::free(hu->_raw_ptr);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x12866
movq %rsi, %r15
movq %rdi, %r14
leaq -0x8(%rsi), %rbx
movq %rbx, %rsi
callq 0x1298e
testb %al, %al
je 0x12866
cmpb $0x0, 0x3(%rbx)
je 0x1286c
popq %rbx
popq %r14
popq %r15
retq
movb $0x1, 0x3(%rbx)
movb 0x2(%rbx), %al
cmpb 0xf02f(%rip), %al       # 0x218a8
jle 0x12899
cmpb 0xf028(%rip), %al       # 0x218a9
jle 0x128bb
cmpb 0xf021(%rip), %al       # 0x218aa
jle 0x128cf
movq -0x10(%r15), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4528
callq 0x125f0
movq %fs:0x0, %rax
leaq -0x1a0(%rax), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x12ffc
leaq 0xefee(%rip), %rdi      # 0x218b0
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1303e
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x13050
nop
// File: /workspace/github_cpp_makefile_star2_O2/walker-xian[P]teisye/src/teisye.cpp
// Function: teisye::heap::realloc(void*, unsigned long)
inline void* realloc(void *ptr, size_t size) noexcept
    {
        if (!ptr) return alloc(size);

        auto unit = reinterpret_cast<memory_unit*>(reinterpret_cast<size_t>(ptr) - sizeof(memory_unit::header));
        if (!validate(unit)) return nullptr;

        auto key = _book.key(size + sizeof(memory_unit::header));
        if (key == unit->_header._key)
        {
            unit->_header._size = static_cast<uint32_t>(size);
            return ptr;
        }

        void *new_ptr = alloc(size);
        if (new_ptr)
        {
            memcpy(new_ptr, ptr, min(static_cast<size_t>(unit->_header._size), size));
            free(ptr);
        }

        return new_ptr;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x1292b
movq %rsi, %rbx
leaq -0x8(%rsi), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1298e
testb %al, %al
je 0x1297c
leaq 0x8(%r14), %rsi
leaq 0xee00(%rip), %rdi      # 0x21718
callq 0x129b6
cmpb 0x2(%r12), %al
jne 0x12941
movl %r14d, 0x4(%r12)
jmp 0x1297e
movq %r15, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1262e
movq %r15, %rdi
movq %r14, %rsi
callq 0x1262e
testq %rax, %rax
je 0x1297c
movq %rax, %r12
movl -0x4(%rbx), %eax
cmpq %r14, %rax
cmovbq %rax, %r14
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4280
movq %r15, %rdi
movq %rbx, %rsi
callq 0x12840
movq %r12, %rbx
jmp 0x1297e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/walker-xian[P]teisye/src/teisye.cpp
// Function: teisye::slabs<teisye::heap::slab, teisye::memory_unit>::alloc(unsigned long)
inline unit_t* alloc(size_t size)  noexcept
    {
        unit_t *unit{};
        for (auto s = _slabs.top(); s; s = s->_next)
        {
            unit = s->alloc(size);
            if (unit) return unit;
        }

        // need a new slab
        auto s = new slab_t;
        if (s)
        {
            unit = s->alloc(size);
            _slabs.push(s);
        }

        return unit;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x12b9f
movq %r15, %rdi
movq %r14, %rsi
callq 0x12c5e
testq %rax, %rax
jne 0x12bea
movq 0x10(%r15), %r15
jmp 0x12b84
movl $0x100000, %edi         # imm = 0x100000
callq 0x4530
movq %rax, %r15
addq $0x100000, %rax         # imm = 0x100000
movq %rax, 0x8(%r15)
andq $0x0, 0x10(%r15)
leaq 0x2f(%r15), %rax
andq $-0x10, %rax
orq $0x8, %rax
movq %rax, (%r15)
xchgq %rax, 0x18(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x12c5e
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x12cdc
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/walker-xian[P]teisye/src/teisye.cpp
// Function: teisye::heap::slab::alloc(unsigned long)
inline unit_t* alloc(size_t size) noexcept
        {
            assert(is_aligned(size));

            unit_t *ptr = _current;
            unit_t *next;
            do
            {
                next = reinterpret_cast<unit_t*>(reinterpret_cast<size_t>(ptr) + size);
                if (next >= _last) return nullptr;
            }
            while (!_current.compare_exchange_weak(ptr, next));

            return ptr;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testb $0xf, %bl
jne 0x12cbd
movq %rdi, %r14
leaq 0x18(%rdi), %r12
movq 0x18(%rdi), %rax
movq %rsp, %r13
movq %rax, (%r13)
xorl %r15d, %r15d
pushq $0x5
popq %rbp
movq (%rsp), %rdx
addq %rbx, %rdx
cmpq %rdx, 0x8(%r14)
jbe 0x12cab
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %ecx
callq 0x12d1c
testb %al, %al
je 0x12c89
movq (%rsp), %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2d25(%rip), %rdi      # 0x159e9
leaq 0x2ba4(%rip), %rsi      # 0x1586f
leaq 0x2d28(%rip), %rcx      # 0x159fa
movl $0x242, %edx            # imm = 0x242
callq 0x4220
// File: /workspace/github_cpp_makefile_star2_O2/walker-xian[P]teisye/src/teisye.cpp
// Function: teisye::heap_large::large_slab::alloc(unsigned long)
inline unit_t*  alloc(size_t size) noexcept
        {
            unit_t *chunk{};
            size_t aligned_size = align(size + sizeof(*chunk));

            if (aligned_size > _free_size || _busy.test_and_set()) return nullptr;

            for (auto cur = _first; cur < _last; cur = cur->_right)
            {
                // the unit is not free
                if (cur->_owner) continue;

                // merge free units
                for (auto right = cur->_right; right < _last && !right->_owner; right = right->_right)
                {
                    cur->_right = right->_right;
                }
                assert(cur->_right > _first && cur->_right <= _last);

                auto free_size = pointer_diff(cur->_right, cur);
                if (aligned_size > free_size) continue;

                // if the remaining size is equal or greater than 128 bytes, split it
                if (free_size - aligned_size >= 128)
                {
                    auto split = reinterpret_cast<unit_t*>(reinterpret_cast<size_t>(cur) + aligned_size);
                    split->_owner = nullptr;
                    split->_right = cur->_right;
                    cur->_right = split;
                }

                chunk = cur;
                chunk->_owner = this;

                assert(pointer_diff(chunk->_right, chunk) >= size + sizeof(*chunk));
                
                _free_size.fetch_sub(pointer_diff(chunk->_right, chunk));
                break;
            }

            _busy.clear();
            
            return chunk;
        }

// Assembly:
pushq %rax
leaq 0x27(%rsi), %rcx
andq $-0x10, %rcx
movq 0x18(%rdi), %rax
cmpq %rax, %rcx
ja 0x12e5b
movb $0x1, %al
xchgb %al, 0x20(%rdi)
testb %al, %al
je 0x12e5f
xorl %eax, %eax
popq %rcx
retq
addq $0x18, %rsi
movq (%rdi), %r8
movq 0x8(%rdi), %r9
movq %r8, %rdx
cmpq %r9, %rdx
jae 0x12ed9
movq %rdx, %rax
cmpq $0x0, 0x8(%rdx)
movq (%rdx), %rdx
jne 0x12e6d
jmp 0x12e87
movq (%rdx), %rdx
movq %rdx, (%rax)
cmpq %r9, %rdx
jae 0x12e93
cmpq $0x0, 0x8(%rdx)
je 0x12e81
cmpq %r8, %rdx
jbe 0x12ee5
cmpq 0x8(%rdi), %rdx
ja 0x12ee5
movq %rdx, %r10
subq %rax, %r10
movq %r10, %r11
subq %rcx, %r11
jb 0x12e6d
cmpq $0x80, %r11
jb 0x12ec9
andq $0x0, 0x8(%rcx,%rax)
leaq (%rcx,%rax), %r8
movq %rdx, (%rcx,%rax)
movq %r8, (%rax)
movq %rcx, %r10
movq %rdi, 0x8(%rax)
cmpq %rsi, %r10
jb 0x12f04
lock
subq %r10, 0x18(%rdi)
jmp 0x12edb
xorl %eax, %eax
xorl %ecx, %ecx
xchgb %cl, 0x20(%rdi)
jmp 0x12e5d
leaq 0x2b38(%rip), %rdi      # 0x15a24
leaq 0x297c(%rip), %rsi      # 0x1586f
leaq 0x2b57(%rip), %rcx      # 0x15a51
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x4220
leaq 0x2b7c(%rip), %rdi      # 0x15a87
leaq 0x295d(%rip), %rsi      # 0x1586f
leaq 0x2b38(%rip), %rcx      # 0x15a51
movl $0x206, %edx            # imm = 0x206
callq 0x4220
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_13.cc
// Function: main
int main(int argc, char const *argv[])
{
	{
		auto sp = std::make_shared<int>();
		auto p = sp.get();
		delete p;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq -0x18(%rbp), %rbx
movq %rbx, %rdi
callq 0x11ae
movq (%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x1060
leaq -0x10(%rbp), %rdi
callq 0x11ca
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/exercises/ex12_16.cc
// Function: main
int main(int argc, char const *argv[])
{
	unique_ptr<string> p1 (new string("Henry"));

	/* error: call to deleted constructor of 'unique_ptr<string>' */
	// unique_ptr<string> p2(p1); // copy

	/**
	 * error: overload resolution selected deleted operator '='
	 * note: candidate function has been explicitly deleted
     * unique_ptr& operator=(const unique_ptr&) = delete;
     */
	// unique_ptr<string> p3;
	// p3 = p1; //assign

	cout << *p1 << endl;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
pushq $0x20
popq %rdi
callq 0x1080
movq %rax, %rbx
leaq 0xdeb(%rip), %rsi       # 0x2004
leaq -0x11(%rbp), %rdx
movq %rax, %rdi
callq 0x1030
movq %rbx, -0x20(%rbp)
movq 0x2da8(%rip), %rdi      # 0x3fd8
movq %rbx, %rsi
callq 0x1070
movq %rax, %rdi
callq 0x1050
leaq -0x20(%rbp), %rdi
callq 0x1278
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x1090
jmp 0x1270
movq %rax, %r14
leaq -0x20(%rbp), %rdi
callq 0x1278
movq %r14, %rdi
callq 0x10b0
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH11_AssociativeContainers/exercises/ex11_08.cc
// Function: main
int main(int argc, char const *argv[])
{
	std::vector<std::string> exclude = { "aa", "bb", "bb", "cc", "dd", "ee", "ff" };
	for (std::string word; std::cout << "Enter plz:\n", std::cin >> word; ) {
		auto is_excluded = std::binary_search(exclude.cbegin(), exclude.cend(), word);
		auto reply = is_excluded ? "excluded" : "not excluded";
		std::cout << reply << std::endl;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0xd4d(%rip), %rsi       # 0x2004
leaq -0x128(%rbp), %rbx
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x1060
leaq -0x108(%rbp), %r14
leaq 0xd2f(%rip), %rsi       # 0x2007
leaq -0x2f(%rbp), %rdx
movq %r14, %rdi
callq 0x1060
leaq -0xe8(%rbp), %r14
leaq 0xd15(%rip), %rsi       # 0x2007
leaq -0x2e(%rbp), %rdx
movq %r14, %rdi
callq 0x1060
leaq -0xc8(%rbp), %r14
leaq 0xcfe(%rip), %rsi       # 0x200a
leaq -0x2d(%rbp), %rdx
movq %r14, %rdi
callq 0x1060
leaq -0xa8(%rbp), %r14
leaq 0xce7(%rip), %rsi       # 0x200d
leaq -0x2c(%rbp), %rdx
movq %r14, %rdi
callq 0x1060
leaq -0x88(%rbp), %r14
leaq 0xcd0(%rip), %rsi       # 0x2010
leaq -0x2b(%rbp), %rdx
movq %r14, %rdi
callq 0x1060
leaq -0x68(%rbp), %r14
leaq 0xcbc(%rip), %rsi       # 0x2013
leaq -0x2a(%rbp), %rdx
movq %r14, %rdi
callq 0x1060
leaq -0x48(%rbp), %rdi
leaq -0x128(%rbp), %rsi
pushq $0x7
popq %rdx
leaq -0x29(%rbp), %rcx
callq 0x14ce
movl $0xc0, %ebx
leaq (%rbx,%rbp), %rdi
addq $-0x128, %rdi           # imm = 0xFED8
callq 0x1080
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x137f
leaq -0x118(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x2c1d(%rip), %rbx      # 0x3fd0
leaq 0xc5c(%rip), %r14       # 0x2016
movq 0x2c1f(%rip), %r15      # 0x3fe0
leaq -0x128(%rbp), %r12
leaq 0xc53(%rip), %r13       # 0x2022
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10d0
movq %r15, %rdi
movq %r12, %rsi
callq 0x1100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1425
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
callq 0x1507
testb %al, %al
movq %r13, %rsi
leaq 0xc17(%rip), %rax       # 0x2026
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x10d0
movq %rax, %rdi
callq 0x1090
jmp 0x13cf
leaq -0x128(%rbp), %rdi
callq 0x1080
leaq -0x48(%rbp), %rdi
callq 0x1534
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movl $0xc0, %r12d
leaq (%r12,%rbp), %rdi
addq $-0x128, %rdi           # imm = 0xFED8
callq 0x1080
addq $-0x20, %r12
cmpq $-0x20, %r12
jne 0x1457
movb $0x1, %al
jmp 0x1484
jmp 0x147f
jmp 0x147f
jmp 0x147f
jmp 0x147f
jmp 0x147f
movq %rax, %r15
xorl %eax, %eax
cmpq %r14, %rbx
sete %cl
testb %al, %al
jne 0x14c6
testb %cl, %cl
jne 0x14c6
addq $-0x20, %r14
movq %r14, %rdi
callq 0x1080
cmpq %rbx, %r14
jne 0x1492
jmp 0x14c6
movq %rax, %r15
jmp 0x14c6
jmp 0x14ae
jmp 0x14ae
movq %rax, %r15
leaq -0x128(%rbp), %rdi
callq 0x1080
leaq -0x48(%rbp), %rdi
callq 0x1534
movq %r15, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O2/olahol[P]cpp-csp/examples/primes.cpp
// Function: main
int main() {
  csp::Scheduler scheduler;

  auto ch = new csp::Channel<int>;

  scheduler.spawn(generate, ch);

  for (int i = 0; i < PRIMES; i++) {
    int prime = ch->get();
    std::cout << prime << std::endl;
    auto ch1 = new csp::Channel<int>;
    scheduler.spawn(filter, ch, ch1, prime);
    ch = ch1;
  }

  scheduler.join();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movl $0xb0, %edi
callq 0x20f0
movq %rax, %rbx
movq %rax, %rdi
callq 0x2416
leaq 0xc4(%rip), %rsi        # 0x23d7
movq %rsp, %rdi
movq %rbx, %rdx
callq 0x2440
pushq $0x64
popq %r14
leaq 0xc5(%rip), %r15        # 0x23ee
movq %rsp, %r12
subl $0x1, %r14d
jb 0x2380
movq %rbx, %rdi
callq 0x24a4
movl %eax, %ebp
movq 0x2c95(%rip), %rdi      # 0x4fd8
movl %eax, %esi
callq 0x2190
movq %rax, %rdi
callq 0x2080
movl $0xb0, %edi
callq 0x20f0
movq %rax, %r13
movq %rax, %rdi
callq 0x2416
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x2520
movq %r13, %rbx
jmp 0x232c
movq %rsp, %rdi
callq 0x2596
movq %rsp, %rdi
callq 0x25c2
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0xb0, %esi
movq %rbx, %rdi
jmp 0x23bb
jmp 0x23c4
movq %rax, %r14
movl $0xb0, %esi
movq %r13, %rdi
callq 0x2100
jmp 0x23c7
jmp 0x23c4
movq %rax, %r14
movq %rsp, %rdi
callq 0x25c2
movq %r14, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O2/olahol[P]cpp-csp/examples/primes.cpp
// Function: generate(csp::Channel<int>*)
void generate(csp::Channel<int>* chan) {
  int i = 2;
  for (;;) {
    chan->put(i);
    i++;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2612
incl %ebp
jmp 0x23e0
// File: /workspace/github_cpp_makefile_star2_O2/olahol[P]cpp-csp/examples/primes.cpp
// Function: filter(csp::Channel<int>*, csp::Channel<int>*, int)
void filter(csp::Channel<int>* in, csp::Channel<int>* out, int prime) {
  for (;;) {
    int i = in->get();
    if (i % prime != 0) {
      out->put(i);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %r15, %rdi
callq 0x24a4
movl %eax, %esi
cltd
idivl %ebx
testl %edx, %edx
je 0x23fb
movq %r14, %rdi
callq 0x2612
jmp 0x23fb
// File: /workspace/github_cpp_makefile_star2_O2/NichtJens[P]lmf2txt/./conio.h
// Function: fopen_s(_IO_FILE**, char const*, char const*)
int fopen_s(FILE **f, const char *name, const char *mode) {
    int ret = 0;
    assert(f);
    *f = fopen(name, mode);
    if (! *f)
        ret = errno;
    return ret;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x10172
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x1160
movq %rax, %rcx
movq %rax, (%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x10170
callq 0x1040
movl (%rax), %eax
popq %rbx
retq
leaq 0x13ed(%rip), %rdi      # 0x11566
leaq 0x1328(%rip), %rsi      # 0x114a8
leaq 0x132b(%rip), %rcx      # 0x114b2
pushq $0xb
popq %rdx
callq 0x10d0
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/defs.hh
// Function: trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char)
static void trim(std::string &str, char to_trim)
{
    std::string::size_type pos = str.find_last_not_of(to_trim);
    if(pos != std::string::npos) {
        str.erase(pos + 1);
        pos = str.find_first_not_of(to_trim);
        if(pos != std::string::npos) str.erase(0, pos);
    }
    else str.erase(str.begin(), str.end());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
pushq $-0x1
popq %rdx
callq 0x4270
cmpq $-0x1, %rax
je 0x5dda
incq %rax
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x40c0
movsbl %r14b, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4320
cmpq $-0x1, %rax
je 0x5df0
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x40c0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x40b0
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kerolloz[P]os/shell.cc
// Function: main
int main() {
  hello();
  string user_input;
  while (1) {
    printf("\n[shell@user]$ ");

    getline(cin, user_input);
    if (cin.eof() || user_input == "exit") {
      // if pressed CTRL + D "EOF" or entered "exit"
      break;
    }
    pid_t process_id = fork();
    if (process_id < 0) {
      printf("Failed to fork");
      exit(-1);
    }
    if (isChildProcess(process_id)) {
      command cmd(user_input);
      // (execute) replaces the child process image with the command to execute
      cmd.execute();
      // the following lines will execute, IFF command failed to execute
      printf("ERROR executing: %s\n", user_input.c_str());
      exit(0); // stop the child process, if failed
    }
    wait(NULL); // wait for the child to finish execution
  }
  bye();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
callq 0x235c
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xc4d(%rip), %rbx       # 0x3004
movq 0x2c22(%rip), %r14      # 0x4fe0
leaq -0x40(%rbp), %r15
leaq 0xc4b(%rip), %r12       # 0x3014
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
movq %r14, %rdi
movq %r15, %rsi
callq 0x2050
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%r14,%rax)
jne 0x2410
movq %r15, %rdi
movq %r12, %rsi
callq 0x24c8
testb %al, %al
jne 0x2410
callq 0x2060
testl %eax, %eax
js 0x2430
je 0x2446
xorl %edi, %edi
callq 0x2170
jmp 0x23c9
callq 0x236d
leaq -0x40(%rbp), %rdi
callq 0x20c0
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbe2(%rip), %rdi       # 0x3019
xorl %eax, %eax
callq 0x2030
pushq $-0x1
popq %rdi
callq 0x2160
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2190
leaq -0x98(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x24d8
leaq -0x60(%rbp), %rdi
callq 0x20c0
leaq -0x98(%rbp), %rdi
callq 0x257e
movq -0x40(%rbp), %rsi
leaq 0xba5(%rip), %rdi       # 0x3028
xorl %eax, %eax
callq 0x2030
xorl %edi, %edi
callq 0x2160
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x2590
jmp 0x24b7
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20c0
jmp 0x24b7
jmp 0x24b4
jmp 0x24b4
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/kerolloz[P]os/shell.cc
// Function: command::command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
command(string s) : command_string(s) {
    vector<string> args;
    split(args);
    for (const string &arg : args) {
      char *str = const_cast<char *>(arg.c_str());
      argschar.push_back(str);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x2190
leaq 0x20(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
andq $0x0, 0x30(%rbx)
leaq -0x50(%rbp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x25b0
movq -0x50(%rbp), %r12
movq -0x48(%rbp), %r13
leaq -0x30(%rbp), %r15
cmpq %r13, %r12
je 0x253f
movq (%r12), %rax
movq %rax, -0x30(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2678
addq $0x20, %r12
jmp 0x2521
leaq -0x50(%rbp), %rdi
callq 0x269c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2559
movq %rax, %r15
leaq -0x50(%rbp), %rdi
callq 0x269c
movq %r14, %rdi
callq 0x2bc0
movq %rbx, %rdi
callq 0x20c0
movq %r15, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/kerolloz[P]os/shell.cc
// Function: command::split(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void split(vector<string> &commands) {
    // just like python split
    // intput(string): "ls -la --color"
    // output(array of strings): ["ls", "-la", "--color"]
    string tmp_str = "";
    for (char c : command_string) {
      if (isspace(c)) {
        if (tmp_str.size())
          commands.push_back(tmp_str);
        tmp_str = "";
      } else
        tmp_str += c;
    }
    if (tmp_str.size())
      commands.push_back(tmp_str);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, %r12
leaq 0xa6d(%rip), %rsi       # 0x303c
leaq -0x58(%rbp), %r15
leaq -0x29(%rbp), %rdx
movq %r15, %rdi
callq 0x26c8
movq (%r12), %r13
movq 0x8(%r12), %r14
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x2635
movsbl (%r13,%rbx), %r12d
movl %r12d, %edi
callq 0x2040
testl %eax, %eax
je 0x2625
cmpq $0x0, -0x50(%rbp)
je 0x2614
movq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x2704
movq %r15, %rdi
leaq 0xa1e(%rip), %rsi       # 0x303c
callq 0x2210
jmp 0x2630
movq %r15, %rdi
movl %r12d, %esi
callq 0x2120
incq %rbx
jmp 0x25ea
cmpq $0x0, -0x50(%rbp)
je 0x2649
leaq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x2704
leaq -0x58(%rbp), %rdi
callq 0x20c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2663
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/DecisionTree.cpp
// Function: TreeNode::TreeNode(File&)
TreeNode::TreeNode(File & file):data(file), feature_sets(file.featureset), lchild(nullptr), rchild(nullptr)
{
    for(int i=0; i < data.records.size(); ++i)
    {
        record_index.push_back(i);
    }
    set_label();
    divide_node();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
andq $0x0, 0x18(%rdi)
leaq 0x30(%rdi), %rax
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0x8(%rdi), %r14
movb $0x0, 0x30(%rdi)
leaq 0x48(%rdi), %r15
addq $0x38, %rsi
movq %r15, %rdi
callq 0x324a
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
xorl %eax, %eax
pushq $0x38
popq %r13
leaq 0xc(%rsp), %r12
movl %eax, 0xc(%rsp)
movslq %eax, %rcx
movq (%rbx), %rdx
movq 0x28(%rdx), %rax
subq 0x20(%rdx), %rax
cqto
idivq %r13
cmpq %rcx, %rax
jbe 0x24f4
movq %r14, %rdi
movq %r12, %rsi
callq 0x3132
movl 0xc(%rsp), %eax
incl %eax
jmp 0x24c5
movq %rbx, %rdi
callq 0x2540
movq %rbx, %rdi
callq 0x258e
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2519
movq %rax, %r12
jmp 0x2524
movq %rax, %r12
movq %r15, %rdi
callq 0x34ea
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x37b8
movq %r12, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/DecisionTree.cpp
// Function: TreeNode::set_label()
void TreeNode::set_label()
{
    int  pos=0, neg=0;
    for(auto index : record_index)
    {
        if(data.records[index].label == 1) pos += 1;
        else neg += 1;
    }
    label = pos > neg ? 1 : -1;
}

// Assembly:
pushq %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
cmpq %rsi, %rdx
je 0x257d
movslq (%rdx), %r9
movq 0x20(%rax), %r10
imulq $0x38, %r9, %r9
xorl %r11d, %r11d
xorl %ebx, %ebx
cmpl $0x1, (%r10,%r9)
sete %r11b
setne %bl
addl %ebx, %ecx
addl %r11d, %r8d
addq $0x4, %rdx
jmp 0x2551
xorl %eax, %eax
cmpl %r8d, %ecx
adcl $-0x1, %eax
orl $0x1, %eax
movl %eax, 0x78(%rdi)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/DecisionTree.cpp
// Function: TreeNode::test(Record&)
int TreeNode::test(Record &record)
{
    TreeNode * node = this;
    std::string feature = node->attr;
    while(feature != "no divided")
    {
        if(record.data.find(feature) == record.data.end())
        {
            node = node->rchild;
        }
        else node = node->lchild;
        feature = node->attr;
    }
    return node->label;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rdi), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x2220
leaq 0x8(%r14), %r12
addq $0x10, %r14
leaq 0x251f(%rip), %r13      # 0x5044
movq %r15, %rdi
movq %r13, %rsi
callq 0x319d
testb %al, %al
je 0x2b5d
movq %r12, %rdi
movq %r15, %rsi
callq 0x3b78
xorl %ecx, %ecx
cmpq %r14, %rax
sete %cl
movq 0x80(%rbx,%rcx,8), %rbx
leaq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x20f0
jmp 0x2b25
movl 0x78(%rbx), %ebx
movq %rsp, %rdi
callq 0x20c0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2b7a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/DecisionTree.cpp
// Function: TreeNode::test(File&)
double TreeNode::test(File &test_file)
{
    std::cout << "the size of test set is " << test_file.records.size() << std::endl;
    float tp=0, tn=0, fp=0, fn=0;
    for(auto record : test_file.records) {
        if(record.label == test(record))
            if(record.label == 1)
                tp += 1;
            else
                tn += 1;
        else
            if(record.label == 1)
                fp += 1;
            else
                fn += 1;
    }
    std::cout << "the true_positive is " << tp / (tp+fp) << std::endl;
    std::cout << "the false_positive is " << tn / (tn + fn) << std::endl;
    std::cout << "the recall is " << tp / (tp + fn) << std::endl;
    return tp / (tp+tn);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x542f(%rip), %rdi      # 0x7fd8
leaq 0x249f(%rip), %rsi      # 0x504f
callq 0x21a0
movq %rax, %rdi
movq 0x28(%r14), %rax
subq 0x20(%r14), %rax
pushq $0x38
popq %rcx
cqto
idivq %rcx
movq %rax, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20d0
movq 0x20(%r14), %r15
movq 0x28(%r14), %r13
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r12
movss %xmm0, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movss %xmm0, (%rsp)
cmpq %r13, %r15
je 0x2c9e
movq %r12, %rdi
movq %r15, %rsi
callq 0x31a8
movl 0x10(%rsp), %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2af4
movl 0x10(%rsp), %ecx
cmpl %eax, %ebp
jne 0x2c48
cmpl $0x1, %ecx
jne 0x2c63
movss (%rsp), %xmm0
addss 0x23ff(%rip), %xmm0     # 0x5040
movss %xmm0, (%rsp)
jmp 0x2c8d
cmpl $0x1, %ecx
jne 0x2c79
movss 0xc(%rsp), %xmm0
addss 0x23e5(%rip), %xmm0     # 0x5040
movss %xmm0, 0xc(%rsp)
jmp 0x2c8d
movss 0x8(%rsp), %xmm0
addss 0x23cf(%rip), %xmm0     # 0x5040
movss %xmm0, 0x8(%rsp)
jmp 0x2c8d
movss 0x4(%rsp), %xmm0
addss 0x23b9(%rip), %xmm0     # 0x5040
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
callq 0x37a4
addq $0x38, %r15
jmp 0x2c04
movq 0x5333(%rip), %rbx      # 0x7fd8
leaq 0x23bc(%rip), %rsi      # 0x5068
movq %rbx, %rdi
callq 0x21a0
movss (%rsp), %xmm0
movss 0xc(%rsp), %xmm1
addss %xmm0, %xmm1
divss %xmm1, %xmm0
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20d0
leaq 0x23a0(%rip), %rsi      # 0x507e
movq %rbx, %rdi
callq 0x21a0
movss 0x4(%rsp), %xmm1
movss 0x8(%rsp), %xmm0
addss %xmm0, %xmm1
divss %xmm1, %xmm0
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20d0
leaq 0x2384(%rip), %rsi      # 0x5095
movq %rbx, %rdi
callq 0x21a0
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm2
addss %xmm0, %xmm2
divss %xmm2, %xmm0
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20d0
movss 0x8(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm1, %xmm0
divss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x37a4
movq %rbx, %rdi
callq 0x22a0
nop