LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/blocktofilemapper.cpp
// Function: BlockToFileMapper::scan(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int
BlockToFileMapper::scan(const std::string &basepath)
{
  int rv;
  int64_t blocksize;

  blocksize = File::logical_block_size(basepath);
  if(blocksize < 0)
    return blocksize;

  rv = ::scan(basepath,blocksize,_blockmap);

  ::compress(_blockmap);

  return rv;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0xe570
movq %rax, %rbx
testq %rax, %rax
js 0xd1c3
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xd1cf
movzbl %al, %ebx
movq 0x18(%r14), %r15
leaq 0x8(%r14), %r13
cmpq %r13, %r15
je 0xd1c3
movq %r15, %rdi
callq 0x4320
cmpq %r13, %rax
je 0xd1b3
movq %rax, %r12
movq 0x38(%r15), %rdx
cmpq 0x38(%r12), %rdx
jne 0xd1b3
testq %rdx, %rdx
je 0xd17d
movq 0x30(%r12), %rsi
movq 0x30(%r15), %rdi
callq 0x44c0
testl %eax, %eax
jne 0xd1b3
movq 0x28(%r15), %rax
movq 0x20(%r15), %rcx
addq %rax, %rcx
cmpq 0x20(%r12), %rcx
jne 0xd1b3
addq 0x28(%r12), %rax
movq %rax, 0x28(%r15)
movq %r14, %rdi
movq %r12, %rsi
callq 0xd818
movq %r15, %rdi
callq 0x4320
movq %rax, %r12
cmpq %r13, %rax
jne 0xd15b
movq %r15, %rdi
callq 0x4320
movq %rax, %r15
cmpq %r13, %rax
jne 0xd14b
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/blocktofilemapper.cpp
// Function: BlockToFileMapper::find[abi:cxx11](unsigned long) const
std::pair<bool,std::string>
BlockToFileMapper::find(const uint64_t block) const
{
  BlockMap::const_iterator iter;


  iter = _blockmap.upper_bound(block);
  if(iter != _blockmap.end())
    --iter;

  if(iter == _blockmap.end())
    return std::make_pair(false,std::string());

  if(block < (iter->first + iter->second.first))
    return std::make_pair(true,iter->second.second);

  return std::make_pair(false,std::string());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0xd653
movq %rdx, %r14
movq %rsi, %r15
addq $0x8, %r15
movq %r15, %rax
xorl %edx, %edx
cmpq %r14, 0x20(%rcx)
cmovaq %rcx, %rax
setbe %dl
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0xd5fc
cmpq %r15, %rax
je 0xd620
movq %rax, %rdi
callq 0x42b0
cmpq %r15, %rax
je 0xd653
movq 0x28(%rax), %rcx
addq 0x20(%rax), %rcx
cmpq %r14, %rcx
jbe 0xd653
movb $0x1, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
addq %rsi, %rdx
callq 0x9b48
jmp 0xd67c
xorl %eax, %eax
movb %al, (%rbx)
leaq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movb %al, 0x18(%rbx)
movq 0x1(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rax, 0x19(%rbx)
movq %rcx, 0x20(%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/captcha.cpp
// Function: captcha::calculate[abi:cxx11](BlkDev const&)
std::string
  calculate(const BlkDev &blkdev)
  {
    std::stringstream ss;

    if(blkdev.has_identity())
      ss << blkdev.identity().serial_number;

    if(ss.gcount() == 0)
      ss << blkdev.size_in_bytes();

    return ss.str();
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x4330
cmpb $0x1, 0x88(%r14)
jne 0xd899
leaq 0x10(%rsp), %r15
leaq 0x40(%r14), %r12
movq %r12, %rdi
callq 0x4200
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4500
cmpq $0x0, 0x8(%rsp)
jne 0xd8af
leaq 0x10(%rsp), %rdi
movq 0x18(%r14), %rsi
callq 0x4300
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x4650
movq 0x166cd(%rip), %rsi     # 0x23f90
movq %rsp, %rdi
callq 0x4370
leaq 0x80(%rsp), %rdi
callq 0x4190
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x1669c(%rip), %rsi     # 0x23f90
movq %rsp, %rdi
callq 0x4370
leaq 0x80(%rsp), %rdi
callq 0x4190
movq %rbx, %rdi
callq 0x46f0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/fiemap.cpp
// Function: FIEMap::extent_map(int)
struct fiemap *
  extent_map(const int fd)
  {
    int rv;
    int extent_count;
    int extent_size;
    struct fiemap *fm;

    extent_count = FIEMap::extent_map_count(fd);
    if(extent_count == -1)
      return NULL;

    extent_size = (sizeof(struct fiemap_extent) * extent_count);

    fm = (struct fiemap*)calloc(1,(sizeof(struct fiemap) + extent_size));
    if(fm == NULL)
      return NULL;

    fm->fm_length       = FIEMAP_MAX_OFFSET;
    fm->fm_extent_count = extent_count;

    rv = ::ioctl(fd,FS_IOC_FIEMAP,fm);
    if(rv == -1)
      {
        ::free(fm);
        return NULL;
      }

    return fm;
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movq $-0x1, 0x8(%r14)
xorl %ebx, %ebx
movl $0xc020660b, %esi       # imm = 0xC020660B
movq %r14, %rdx
xorl %eax, %eax
callq 0x45b0
cmpl $-0x1, %eax
sete %al
movl 0x14(%r14), %r14d
cmpl $-0x1, %r14d
sete %cl
orb %al, %cl
jne 0xe563
imull $0x38, %r14d, %eax
movslq %eax, %rsi
addq $0x20, %rsi
movl $0x1, %edi
callq 0x42f0
testq %rax, %rax
je 0xe561
movq %rax, %rbx
movq $-0x1, 0x8(%rax)
movl %r14d, 0x18(%rax)
movl $0xc020660b, %esi       # imm = 0xC020660B
movl %ebp, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x45b0
cmpl $-0x1, %eax
jne 0xe563
movq %rbx, %rdi
callq 0x4520
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/file.cpp
// Function: File::logical_block_size(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int64_t
  logical_block_size(const std::string &filepath)
  {
    int fd;
    int64_t logical_block_size;
    std::string devpath;

    devpath = FileToBlkDev::find(filepath);
    if(devpath.empty())
      return -ENOENT;

    fd = ::open(devpath.c_str(),O_RDONLY|O_NONBLOCK);
    if(fd == -1)
      return -errno;

    logical_block_size = IOCtl::logical_block_size(fd);

    ::close(fd);

    return logical_block_size;
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rsi
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x20(%rsp), %rdi
callq 0xe874
movq %rsp, %rdi
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
callq 0x4540
movq (%rbx), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xe5c4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x44b0
cmpq $0x0, 0x8(%rsp)
je 0xe5f8
movq (%rsp), %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x4360
movl %eax, %ebx
cmpl $-0x1, %eax
je 0xe601
movl %ebx, %edi
callq 0xef38
movl %eax, %ebp
movl %ebx, %edi
callq 0x4780
movslq %ebp, %rbx
jmp 0xe60c
movq $-0x2, %rbx
jmp 0xe60c
callq 0x4060
movslq (%rax), %rbx
negq %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xe622
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x44b0
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xe630
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xe649
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x44b0
movq %rbx, %rdi
callq 0x46f0
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/file.cpp
// Function: File::blocks(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<File::Block, std::allocator<File::Block>>&)
int
  blocks(const std::string &filepath,
         BlockVector       &blockvector)
  {
    int fd;
    int rv;
    int64_t logical_block_size;

    logical_block_size = File::logical_block_size(filepath);
    if(logical_block_size < 0)
      return logical_block_size;

    fd = ::open(filepath.c_str(),O_RDONLY);
    if(fd == -1)
      return -errno;

    rv = ::blocks(fd,logical_block_size,blockvector);

    ::close(fd);

    return rv;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0xe570
movq %rax, %rbx
testq %rax, %rax
js 0xe722
movq (%r15), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
xorl %eax, %eax
callq 0x4360
cmpl $-0x1, %eax
je 0xe709
movl %eax, %ebp
movl %eax, %edi
callq 0xe4d3
testq %rax, %rax
je 0xe716
movq %rax, %r15
cmpl $0x0, 0x14(%rax)
je 0xe6fd
movq %r15, %r13
addq $0x30, %r13
xorl %r12d, %r12d
movq -0x8(%r13), %rax
xorl %edx, %edx
divq %rbx
movq %rax, 0x8(%rsp)
movq (%r13), %rax
xorl %edx, %edx
divq %rbx
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0xe6e0
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%r14)
jmp 0xe6ed
movq %r14, %rdi
leaq 0x8(%rsp), %rdx
callq 0xe734
incq %r12
movl 0x14(%r15), %eax
addq $0x38, %r13
cmpq %rax, %r12
jb 0xe6ab
movq %r15, %rdi
callq 0x4520
xorl %ebx, %ebx
jmp 0xe71b
callq 0x4060
subl (%rax), %r15d
movl %r15d, %ebx
jmp 0xe722
movl $0xfffffff4, %ebx       # imm = 0xFFFFFFF4
movl %ebp, %edi
callq 0x4780
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/info.cpp
// Function: InfoPrinter::init(unsigned long, unsigned long, std::vector<unsigned long, std::allocator<unsigned long>>*)
void
InfoPrinter::init(const size_t  start_block_,
                  const size_t  end_block_,
                  U64Vec       *badblocks_)
{
  std::cout << "\r\x1B[2K" << '\x1B' << '7';

  _start_block = start_block_;
  _end_block   = end_block_;
  _badblocks   = badblocks_;
  _start_time  = Time::get_monotonic();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x154dc(%rip), %r13     # 0x23fb8
leaq 0x7f9d(%rip), %rsi      # 0x16a80
movl $0x5, %edx
movq %r13, %rdi
callq 0x4500
leaq 0xe(%rsp), %rsi
movb $0x1b, (%rsi)
movl $0x1, %edx
movq %r13, %rdi
callq 0x4500
leaq 0xf(%rsp), %rsi
movb $0x37, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x4500
movq %r12, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movq %r14, 0x18(%rbx)
callq 0x15340
movsd %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/ioctl.cpp
// Function: IOCtl::logical_block_size(int)
int
  logical_block_size(const int fd)
  {
    int rv;
    int size;

    rv = ::ioctl(fd, BLKSSZGET, &size);
    if(rv == -1)
      return -errno;

    return size;
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
leaq 0xc(%rsp), %rdx
movl $0x1268, %esi           # imm = 0x1268
xorl %eax, %eax
callq 0x45b0
cmpl $-0x1, %eax
je 0xef5b
movl 0xc(%rsp), %ebx
jmp 0xef62
callq 0x4060
subl (%rax), %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/ioctl.cpp
// Function: IOCtl::physical_block_size(int)
int
  physical_block_size(const int fd)
  {
    int rv;
    int size;

    rv = ::ioctl(fd,BLKBSZGET,&size);
    if(rv == -1)
      return -errno;

    return size;
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
leaq 0xc(%rsp), %rdx
movl $0x80081270, %esi       # imm = 0x80081270
xorl %eax, %eax
callq 0x45b0
cmpl $-0x1, %eax
je 0xef8d
movl 0xc(%rsp), %ebx
jmp 0xef94
callq 0x4060
subl (%rax), %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/ioctl.cpp
// Function: IOCtl::size_in_bytes(int)
int64_t
  size_in_bytes(const int fd)
  {
    int rv;

#ifdef BLKGETSIZE64
    {
      int64_t size;

      rv = ::ioctl(fd,BLKGETSIZE64,&size);
      if(rv != -1)
        return size;
    }
#endif

    {
      unsigned long size;

      rv = ::ioctl(fd,BLKGETSIZE,&size);
      if(rv != 0)
        return ((int64_t)size * 512);
    }

    return -errno;
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x8(%rsp), %rdx
movl $0x80081272, %esi       # imm = 0x80081272
xorl %eax, %eax
callq 0x45b0
cmpl $-0x1, %eax
je 0xefc0
movq 0x8(%rsp), %rax
jmp 0xefed
leaq 0x8(%rsp), %rdx
movl $0x1260, %esi           # imm = 0x1260
movl %ebx, %edi
xorl %eax, %eax
callq 0x45b0
testl %eax, %eax
je 0xefe2
movq 0x8(%rsp), %rax
shlq $0x9, %rax
jmp 0xefed
callq 0x4060
movslq (%rax), %rax
negq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/ioctl.cpp
// Function: IOCtl::logical_block_count(int)
int64_t
  logical_block_count(const int fd)
  {
    int logical_block_size;
    int64_t size_in_bytes;

    logical_block_size = IOCtl::logical_block_size(fd);
    if(logical_block_size < 0)
      return logical_block_size;

    size_in_bytes = IOCtl::size_in_bytes(fd);
    if(size_in_bytes < 0)
      return size_in_bytes;

    return (size_in_bytes / logical_block_size);
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
callq 0xef38
movl %eax, %ebx
testl %eax, %eax
js 0xf018
movl %ebp, %edi
callq 0xef9c
testq %rax, %rax
js 0xf01b
movl %ebx, %ecx
xorl %edx, %edx
divq %rcx
jmp 0xf01b
movslq %ebx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/ioctl.cpp
// Function: IOCtl::physical_block_count(int)
int64_t
  physical_block_count(const int fd)
  {
    int physical_block_size;
    int64_t size_in_bytes;

    physical_block_size = IOCtl::physical_block_size(fd);
    if(physical_block_size < 0)
      return physical_block_size;

    size_in_bytes = IOCtl::size_in_bytes(fd);
    if(size_in_bytes < 0)
      return size_in_bytes;

    return (size_in_bytes / physical_block_size);
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
callq 0xef6a
movl %eax, %ebx
testl %eax, %eax
js 0xf047
movl %ebp, %edi
callq 0xef9c
testq %rax, %rax
js 0xf04a
movl %ebx, %ecx
xorl %edx, %edx
divq %rcx
jmp 0xf04a
movslq %ebx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/num.cpp
// Function: num::humanize[abi:cxx11](unsigned long, bool)
std::string
  humanize(const uint64_t bytes,
           const bool     si)
  {
    int exp  = 0;
    int unit = (si ? 1000 : 1024);
    std::stringstream ss;

    exp = ((bytes == 0) ?
           0 :
           compute_exp(bytes,unit));

    ss.precision(2);
    ss << std::fixed
       << (bytes / std::pow(unit,exp))
       << suffix[exp][si];

    return ss.str();
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
movl $0x3e8, %eax            # imm = 0x3E8
movl $0x400, %r15d           # imm = 0x400
cmovnel %eax, %r15d
leaq 0x20(%rsp), %rdi
callq 0x4330
movq %r14, %xmm1
punpckldq 0x7977(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x797f(%rip), %xmm1     # 0x16a60
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
testq %r14, %r14
movapd %xmm0, 0x10(%rsp)
je 0xf137
callq 0x43c0
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, (%rsp)
callq 0x43c0
movsd (%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
cmpl $0x7, %eax
movl $0x7, %r15d
cmovll %eax, %r15d
jmp 0xf13f
cvtsi2sd %r15d, %xmm2
xorl %r15d, %r15d
leaq 0x30(%rsp), %r14
movq -0x10(%r14), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x28(%rsp,%rax)
movq (%r14), %rax
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x48(%rsp,%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x48(%rsp,%rax)
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
movapd %xmm2, %xmm0
callq 0x46e0
movapd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movq %r14, %rdi
movapd %xmm1, %xmm0
callq 0x4670
movq %rax, %r14
movslq %r15d, %rax
shlq $0x4, %rax
leaq 0x149bc(%rip), %rcx     # 0x23b60
addq %rax, %rcx
movzbl %bpl, %eax
movq (%rcx,%rax,8), %r15
testq %r15, %r15
je 0xf1cc
movq %r15, %rdi
callq 0x4200
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4500
jmp 0xf1e6
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r14, %rdi
addq %rax, %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x46c0
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x4650
movq 0x14d96(%rip), %rsi     # 0x23f90
leaq 0x20(%rsp), %rdi
callq 0x4370
leaq 0xa0(%rsp), %rdi
callq 0x4190
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x14d64(%rip), %rsi     # 0x23f90
leaq 0x20(%rsp), %rdi
callq 0x4370
leaq 0xa0(%rsp), %rdi
callq 0x4190
movq %rbx, %rdi
callq 0x46f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/rnd.cpp
// Function: rnd::str[abi:cxx11](int)
std::string
  str(int len_)
  {
    std::string s;

    for(int i = 0; i < len_; i++)
      s.push_back('a' + (std::rand() % 26));

    return s;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %esi, %esi
jle 0xfe25
movl %esi, %ebp
callq 0x4100
cltq
imulq $0x4ec4ec4f, %rax, %rcx # imm = 0x4EC4EC4F
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x23, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,4), %edx
leal (%rdx,%rdx,4), %edx
addl %ecx, %edx
subl %edx, %eax
addb $0x61, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x43f0
decl %ebp
jne 0xfdef
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xfe49
movq (%r15), %rsi
incq %rsi
callq 0x44b0
movq %r14, %rdi
callq 0x46f0
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::tf_init(sg::ata_tf*, unsigned char, unsigned long, unsigned int)
void
  tf_init(struct ata_tf *tf,
          uint8_t        ata_op,
          uint64_t       lba,
          unsigned int   nsect)
  {
    memset(tf,0,sizeof(struct ata_tf));

    tf->command   = ata_op;
    tf->dev       = ATA_USING_LBA | 0xA0;
    tf->lob.lbal  = lba;
    tf->lob.lbam  = lba >>  8;
    tf->lob.lbah  = lba >> 16;
    tf->lob.nsect = nsect;

    if(needs_lba48(ata_op,lba,nsect))
      {
        tf->is_lba48  = 1;
        tf->hob.feat  = 0;
        tf->hob.nsect = nsect >>  8;
        tf->hob.lbal  =   lba >> 24;
        tf->hob.lbam  =   lba >> 32;
        tf->hob.lbah  =   lba >> 40;
      }
    else
      {
        tf->dev |= (lba >> 24) & 0x0F;
      }
  }

// Assembly:
xorl %eax, %eax
movq %rax, 0x7(%rdi)
movq %rax, 0x2(%rdi)
movb %sil, 0x1(%rdi)
movb $-0x20, (%rdi)
movb %dl, 0x7(%rdi)
movb %dh, 0x8(%rdi)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x9(%rdi)
movb %cl, 0x6(%rdi)
cmpl $0xaf, %esi
jg 0x146c3
leal -0x6(%rsi), %eax
cmpl $0x3f, %eax
ja 0x146e0
movabsq $-0x6ffd3ffd3fffffff, %r8 # imm = 0x9002C002C0000001
btq %rax, %r8
jae 0x146e0
movb $0x1, 0x4(%rdi)
movb %ch, 0xb(%rdi)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0xc(%rdi)
movq %rdx, %rax
shrq $0x20, %rax
movb %al, 0xd(%rdi)
shrq $0x28, %rdx
movb %dl, 0xe(%rdi)
retq
leal -0xf3(%rsi), %eax
cmpl $0x2, %eax
jb 0x14715
cmpl $0xb0, %esi
je 0x14715
cmpl $0xea, %esi
je 0x146a2
jmp 0x146e8
cmpl $0x80, %esi
je 0x14715
cmpq $0xfffffff, %rdx        # imm = 0xFFFFFFF
setae %al
cmpl $0x100, %ecx            # imm = 0x100
setae %sil
orb %al, %sil
jne 0x146a2
movl %ecx, %eax
addq %rdx, %rax
movq $-0x10000000, %rsi      # imm = 0xF0000000
addq %rsi, %rax
cmpq %rsi, %rax
jbe 0x146a2
shrl $0x18, %edx
andb $0xf, %dl
orb $-0x20, %dl
movb %dl, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::identify(int, sg::identity&)
int
  identify(const int     fd,
           sg::identity &ident)
  {
    int rv;
    int timeout;
    char buf[512];
    int buflen = sizeof(buf);
    struct ata_tf tf;

    tf_init(&tf,ATA_OP_IDENTIFY,0,1);

    timeout = 60000;
    rv = exec(fd,SG_READ,SG_PIO,&tf,buf,buflen,timeout);
    if(rv == 0)
      buf_to_identity(buf,ident);

    return rv;
  }

// Assembly:
pushq %rbp
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %rbx
xorl %eax, %eax
leaq 0x11(%rsp), %rcx
movq %rax, 0x7(%rcx)
movq %rax, 0x2(%rcx)
movb %al, 0x7(%rcx)
movb %al, 0x9(%rcx)
movb $0x1, 0x6(%rcx)
movw $0xece0, (%rcx)         # imm = 0xECE0
movl $0xea60, (%rsp)         # imm = 0xEA60
leaq 0x20(%rsp), %r8
xorl %esi, %esi
xorl %edx, %edx
movl $0x200, %r9d            # imm = 0x200
callq 0x14721
movl %eax, %ebp
testl %eax, %eax
jne 0x14da3
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x14a5a
movl %ebp, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::read_block(int, unsigned long, unsigned long, void*, unsigned long, int)
int
  read_block(const int       fd_,
             const uint64_t  lba_,
             const uint64_t  blocks_,
             void           *buf_,
             const size_t    buflen_,
             const int       timeout_)
  {
    int blocks;
    int instruction;
    struct ata_tf tf;

    blocks = blocks_;
    if(blocks >= 65536)
      blocks = 0;
    instruction = ATA_OP_READ_PIO_EXT;
    tf_init(&tf,instruction,lba_,blocks);

    return exec(fd_,SG_READ,SG_PIO,&tf,buf_,buflen_,timeout_);
  }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %r8, %rax
movq %rcx, %r8
movq %rsi, %rbx
xorl %ecx, %ecx
cmpl $0x10000, %edx          # imm = 0x10000
cmovgel %ecx, %edx
leaq 0x11(%rsp), %rcx
movq $0x0, 0x2(%rcx)
movb $0x0, 0xa(%rcx)
movw $0x24e0, (%rcx)         # imm = 0x24E0
movb %bl, 0x7(%rcx)
movb %bh, 0x19(%rsp)
shrl $0x10, %esi
movb %sil, 0x9(%rcx)
movb %dl, 0x6(%rcx)
movb $0x1, 0x4(%rcx)
movb %dh, 0x1c(%rsp)
movl %ebx, %edx
shrl $0x18, %edx
movb %dl, 0xc(%rcx)
movq %rbx, %rdx
shrq $0x20, %rdx
movb %dl, 0xd(%rcx)
shrq $0x28, %rbx
movb %bl, 0xe(%rcx)
movl %r9d, (%rsp)
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %r9d
callq 0x14721
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::write_block(int, unsigned long, unsigned long, void const*, unsigned long, int)
int
  write_block(const int       fd_,
              const uint64_t  lba_,
              const uint64_t  blocks_,
              const void     *buf_,
              const size_t    buflen_,
              const int       timeout_)
  {
    int blocks;
    int instruction;
    struct ata_tf tf;

    blocks = blocks_;
    if(blocks >= 65536)
      blocks = 0;
    instruction = ATA_OP_WRITE_PIO_EXT;
    tf_init(&tf,instruction,lba_,blocks);

    return exec(fd_,SG_WRITE,SG_PIO,&tf,(void*)buf_,buflen_,timeout_);
  }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %r8, %rax
movq %rcx, %r8
movq %rsi, %rbx
xorl %ecx, %ecx
cmpl $0x10000, %edx          # imm = 0x10000
cmovgel %ecx, %edx
leaq 0x11(%rsp), %rcx
movq $0x0, 0x2(%rcx)
movb $0x0, 0xa(%rcx)
movw $0x34e0, (%rcx)         # imm = 0x34E0
movb %bl, 0x7(%rcx)
movb %bh, 0x19(%rsp)
shrl $0x10, %esi
movb %sil, 0x9(%rcx)
movb %dl, 0x6(%rcx)
movb $0x1, 0x4(%rcx)
movb %dh, 0x1c(%rsp)
movl %ebx, %edx
shrl $0x18, %edx
movb %dl, 0xc(%rcx)
movq %rbx, %rdx
shrq $0x20, %rdx
movb %dl, 0xd(%rcx)
shrq $0x28, %rbx
movb %bl, 0xe(%rcx)
movl %r9d, (%rsp)
movl $0x1, %esi
xorl %edx, %edx
movl %eax, %r9d
callq 0x14721
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::flush_write_cache(int, int)
int
  flush_write_cache(const int fd,
                    const int timeout)
  {
    int rv;
    struct ata_tf tf;

    tf_init(&tf,ATA_OP_FLUSHCACHE_EXT,0,0);

    rv = exec(fd,SG_READ,SG_PIO,&tf,NULL,0,timeout);
    if(rv < 0)
      {
        tf_init(&tf,ATA_OP_FLUSHCACHE,0,0);

        rv = exec(fd,SG_READ,SG_PIO,&tf,NULL,0,timeout);
      }

    return rv;
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movl %edi, %ebx
leaq 0x11(%rsp), %rcx
movq $0x0, 0x2(%rcx)
movb $0x0, 0xa(%rcx)
movw $0xeae0, (%rcx)         # imm = 0xEAE0
xorl %r14d, %r14d
movl %r14d, 0x6(%rcx)
movb $0x1, 0x4(%rcx)
movl %r14d, 0xb(%rcx)
movl %esi, (%rsp)
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x14721
testl %eax, %eax
jns 0x14f22
leaq 0x13(%rsp), %rax
movb $0x0, 0x8(%rax)
movq $0x0, (%rax)
movw $0xe7e0, -0x2(%rax)     # imm = 0xE7E0
movl %r14d, 0x4(%rax)
movb $0x1, 0x2(%rax)
movl %r14d, 0x9(%rax)
movl %ebp, (%rsp)
leaq 0x11(%rsp), %rcx
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x14721
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::write_uncorrectable(int, unsigned long, unsigned char, int)
int
  write_uncorrectable(const int      fd_,
                      const uint64_t lba_,
                      const uint8_t  type_,
                      const int      timeout_)
  {
    int rv;
    struct ata_tf tf;

    tf_init(&tf,ATA_OP_WRITE_UNC_EXT,lba_,1);
    tf.lob.feat = type_;
    tf.is_lba48 = 1;

    rv = exec(fd_,SG_READ,SG_PIO,&tf,NULL,0,timeout_);
    if(rv < 0)
      {
        char buf[520];

        tf_init(&tf,ATA_OP_WRITE_LONG_ONCE,lba_,1);
        memset(buf,0xA5,sizeof(buf));
        rv = exec(fd_,SG_WRITE,SG_PIO,&tf,buf,sizeof(buf),timeout_);
      }

    return rv;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movl %ecx, %r8d
movq %rsi, %r14
leaq 0x9(%rsp), %rcx
movq $0x0, 0x2(%rcx)
movw $0x0, 0xa(%rcx)
movw $0x45e0, (%rcx)         # imm = 0x45E0
movb %r14b, 0x7(%rcx)
movl %r14d, %r12d
shrl $0x8, %r12d
movb %r12b, 0x8(%rcx)
movl %r14d, %r13d
shrl $0x10, %r13d
movb %r13b, 0x9(%rcx)
movb $0x1, %al
movb %al, 0x6(%rcx)
movl %r14d, %r15d
shrl $0x18, %r15d
movb %r15b, 0xc(%rcx)
movq %rsi, %rbx
shrq $0x20, %rbx
movb %bl, 0xd(%rcx)
movq %rsi, %rbp
shrq $0x28, %rbp
movb %bpl, 0xe(%rcx)
movb %dl, 0x5(%rcx)
movb %al, 0x4(%rcx)
movl %r8d, 0x1c(%rsp)
movl %r8d, (%rsp)
movl %edi, 0x18(%rsp)
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x14721
testl %eax, %eax
jns 0x15050
movl 0x18(%rsp), %esi
movl 0x1c(%rsp), %edx
leaq 0xb(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x5(%rax)
movq %rcx, (%rax)
movw $0x33e0, -0x2(%rax)     # imm = 0x33E0
movb %r14b, 0x5(%rax)
movb %r12b, 0x6(%rax)
movb %r13b, 0x7(%rax)
movb $0x1, 0x4(%rax)
cmpq $0xfffffff, %r14        # imm = 0xFFFFFFF
jb 0x1500d
movb $0x1, 0xd(%rsp)
movb %r15b, 0x15(%rsp)
movb %bl, 0x16(%rsp)
movb %bpl, 0x17(%rsp)
jmp 0x15016
orb $-0x20, %r15b
movb %r15b, 0x9(%rsp)
movl %edx, %ebx
movl %esi, %ebp
leaq 0x20(%rsp), %r14
movl $0x208, %edx            # imm = 0x208
movq %r14, %rdi
movl $0xa5, %esi
callq 0x4280
movl %ebx, (%rsp)
leaq 0x9(%rsp), %rcx
movl %ebp, %edi
movl $0x1, %esi
xorl %edx, %edx
movq %r14, %r8
movl $0x208, %r9d            # imm = 0x208
callq 0x14721
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::security_set_password(int, int, char const*, int)
int
  security_set_password(const int  fd_,
                        const int  identifier_,
                        const char password_[32],
                        const int  timeout_)
  {
    uint8_t data[512];
    struct ata_tf tf;

    ::memset(data,0,512);
    ::memcpy(&data[2],password_,32);
    switch(identifier_)
      {
      case SG_IDENTIFIER_USER:
        data[0] = 0x00;
        break;
      case SG_IDENTIFIER_MASTER:
        data[0] = 0x01;
      default:
        return -EINVAL;
      }

    tf_init(&tf,ATA_OP_SECURITY_SET_PASSWORD,0,0);

    return exec(fd_,SG_WRITE,SG_PIO,&tf,data,512,timeout_);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %ebp
leaq 0x20(%rsp), %r12
xorl %r13d, %r13d
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x4280
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm0, 0x2(%r12)
movups %xmm1, 0x12(%r12)
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
testl %r15d, %r15d
jne 0x15116
leaq 0x11(%rsp), %rcx
movq $0x0, 0x2(%rcx)
movb $0x0, 0xa(%rcx)
movw $0xf1e0, (%rcx)         # imm = 0xF1E0
movl %r13d, 0x6(%rcx)
movb $0x1, 0x4(%rcx)
movl %r13d, 0xb(%rcx)
movl %ebx, (%rsp)
leaq 0x20(%rsp), %r8
movl %ebp, %edi
movl $0x1, %esi
xorl %edx, %edx
movl $0x200, %r9d            # imm = 0x200
callq 0x14721
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/sg.cpp
// Function: sg::security_erase(int, int, int, char const*, int)
int
  security_erase(const int  fd_,
                 const int  erase_mode_,
                 const int  identifier_,
                 const char password_[32],
                 const int  timeout_)
  {
    struct ata_tf tf;
    uint8_t data[512];

    ::memset(data,0,512);
    ::memcpy(&data[2],password_,32);
    switch(identifier_)
      {
      case SG_IDENTIFIER_USER:
        data[0] |= 0x00;
        break;
      case SG_IDENTIFIER_MASTER:
        data[0] |= 0x01;
        break;
      default:
        return -EINVAL;
      }

    switch(erase_mode_)
      {
      case SG_ERASE_NORMAL:
        data[0] |= 0x00;
        break;
      case SG_ERASE_ENHANCED:
        data[0] |= 0x02;
        break;
      default:
        return -EINVAL;
      }

    tf_init(&tf,ATA_OP_SECURITY_ERASE_UNIT,0,1);

    return exec(fd_,SG_WRITE,SG_PIO,&tf,data,512,timeout_);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movl %r8d, %ebx
movq %rcx, %r12
movl %edx, %r15d
movl %esi, %r14d
movl %edi, %ebp
leaq 0x20(%rsp), %r13
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
xorl %esi, %esi
callq 0x4280
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm0, 0x2(%r13)
movups %xmm1, 0x12(%r13)
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
testl %r15d, %r15d
je 0x151bf
cmpl $0x1, %r15d
jne 0x1520a
movb $0x1, 0x20(%rsp)
movb $0x3, %cl
jmp 0x151c1
movb $0x2, %cl
testl %r14d, %r14d
je 0x151d0
cmpl $0x1, %r14d
jne 0x1520a
movb %cl, 0x20(%rsp)
xorl %eax, %eax
leaq 0x11(%rsp), %rcx
movq %rax, 0x7(%rcx)
movq %rax, 0x2(%rcx)
movb %al, 0x7(%rcx)
movb %al, 0x9(%rcx)
movb $0x1, 0x6(%rcx)
movw $0xf4e0, (%rcx)         # imm = 0xF4E0
movl %ebx, (%rsp)
leaq 0x20(%rsp), %r8
movl %ebp, %edi
movl $0x1, %esi
xorl %edx, %edx
movl $0x200, %r9d            # imm = 0x200
callq 0x14721
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/trapexit[P]bbf/src/signals.cpp
// Function: signals::setup_handlers()
void
  setup_handlers()
  {
    struct sigaction sa = {0};

    sa.sa_flags   = SA_RESTART;
    sa.sa_handler = signals::handler;

    sigaction(SIGHUP,&sa,NULL);
    sigaction(SIGALRM,&sa,NULL);
    sigaction(SIGTERM,&sa,NULL);
    sigaction(SIGINT,&sa,NULL);
    sigaction(SIGQUIT,&sa,NULL);
    sigaction(SIGUSR1,&sa,NULL);
    sigaction(SIGUSR2,&sa,NULL);
  }

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x10(%rsp), %rbx
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4280
movl $0x10000000, 0x80(%rbx) # imm = 0x10000000
leaq -0x3b(%rip), %rax       # 0x15282
movq %rax, -0x8(%rbx)
leaq 0x8(%rsp), %rbx
movl $0x1, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4560
movl $0xe, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4560
movl $0xf, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4560
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4560
movl $0x3, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4560
movl $0xa, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4560
movl $0xc, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4560
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/cpp/example.pb.cc
// Function: InitDefaultsscc_info_Person_example_2eproto()
static void InitDefaultsscc_info_Person_example_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::_Person_default_instance_;
    new (ptr) ::Person();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::Person::InitAsDefaultInstance();
}

// Assembly:
pushq %rax
leaq 0x2a67(%rip), %rdx      # 0x70cb
movl $0x2df5a4, %edi         # imm = 0x2DF5A4
movl $0x2df5a0, %esi         # imm = 0x2DF5A0
callq 0x4310
xorps %xmm0, %xmm0
movups %xmm0, 0x5cc3(%rip)     # 0xa340
leaq 0x55d4(%rip), %rax      # 0x9c58
movq %rax, 0x5cad(%rip)      # 0xa338
movl 0x5bef(%rip), %eax      # 0xa280
testl %eax, %eax
jne 0x46c8
movq 0x590c(%rip), %rax      # 0x9fa8
movq %rax, 0x5cad(%rip)      # 0xa350
leaq 0x5c8e(%rip), %rsi      # 0xa338
movq %rax, 0x5ca7(%rip)      # 0xa358
movl $0x0, 0x5ca5(%rip)      # 0xa360
movq 0x58f6(%rip), %rdi      # 0x9fb8
popq %rax
jmp 0x4070
leaq 0x5bb1(%rip), %rdi      # 0xa280
callq 0x4300
jmp 0x4695
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/cpp/example.pb.cc
// Function: Person::Person(Person const&)
Person::Person(const Person& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_name()) {
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(),
      GetArena());
  }
  email_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from._internal_has_email()) {
    email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_email(),
      GetArena());
  }
  id_ = from.id_;
  // @@protoc_insertion_point(copy_constructor:Person)
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movq $0x0, 0x8(%rdi)
leaq 0x5515(%rip), %rax      # 0x9c58
movq %rax, (%rdi)
movl 0x10(%rsi), %eax
movl %eax, 0x10(%rdi)
movl $0x0, 0x14(%rdi)
movq 0x8(%rsi), %rsi
testb $0x1, %sil
je 0x476d
andq $-0x2, %rsi
addq $0x8, %rsi
movq %r15, %rdi
callq 0x584e
movq 0x5834(%rip), %r12      # 0x9fa8
movq %r12, 0x18(%rbx)
movl 0x10(%r14), %eax
testb $0x1, %al
je 0x479a
leaq 0x18(%rbx), %rdi
movq 0x18(%r14), %rdx
movq (%r15), %rsi
testb $0x1, %sil
jne 0x47cb
callq 0x550c
movl 0x10(%r14), %eax
movq %r12, 0x20(%rbx)
testb $0x2, %al
je 0x47b8
leaq 0x20(%rbx), %rdi
movq 0x20(%r14), %rdx
movq (%r15), %rsi
testb $0x1, %sil
jne 0x47d4
callq 0x550c
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x4791
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x47b3
nop
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/cpp/example.pb.cc
// Function: Person::Clear()
void Person::Clear() {
// @@protoc_insertion_point(message_clear_start:Person)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      email_.ClearNonDefaultToEmpty();
    }
  }
  id_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

// Assembly:
movl 0x10(%rdi), %eax
testb $0x3, %al
je 0x4875
testb $0x1, %al
je 0x485f
movq 0x18(%rdi), %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x2, %al
je 0x4875
movq 0x20(%rdi), %rax
movq $0x0, 0x8(%rax)
movq (%rax), %rax
movb $0x0, (%rax)
xorl %eax, %eax
movl %eax, 0x28(%rdi)
movl %eax, 0x10(%rdi)
testb $0x1, 0x8(%rdi)
jne 0x4884
retq
addq $0x8, %rdi
jmp 0x587c
nop
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/cpp/example.pb.cc
// Function: Person::ByteSizeLong() const
size_t Person::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Person)
  size_t total_size = 0;

  if (((_has_bits_[0] & 0x00000005) ^ 0x00000005) == 0) {  // All required fields are present.
    // required string name = 1;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());

    // required int32 id = 2;
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_id());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional string email = 3;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000002u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_email());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %ebp
movl %ebp, %eax
notl %eax
testb $0x5, %al
jne 0x4d5a
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
movl 0x28(%rbx), %edx
testl %edx, %edx
js 0x4d64
orl $0x1, %edx
bsrl %edx, %edx
leal (%rdx,%rdx,8), %edx
addl $0x49, %edx
shrl $0x6, %edx
jmp 0x4d69
movq %rbx, %rdi
callq 0x4cc4
jmp 0x4d73
movl $0xa, %edx
addq %rcx, %rax
addq %rdx, %rax
addq $0x2, %rax
testb $0x2, %bpl
je 0x4d99
movq 0x20(%rbx), %rcx
movq 0x8(%rcx), %rcx
addq %rcx, %rax
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %rax
incq %rax
testb $0x1, 0x8(%rbx)
jne 0x4da9
movl %eax, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x8(%rbx), %rdi
addq $0x14, %rbx
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4060
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/cpp/example.pb.cc
// Function: Person::MergeFrom(google::protobuf::Message const&)
void Person::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Person)
  GOOGLE_DCHECK_NE(&from, this);
  const Person* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Person>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:Person)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:Person)
    MergeFrom(*source);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rdi, %rsi
jne 0x4e1a
leaq 0x22ee(%rip), %rdx      # 0x70cb
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x3, %esi
movl $0x157, %ecx            # imm = 0x157
callq 0x4400
leaq 0x22e2(%rip), %rsi      # 0x70dd
movq %r15, %rdi
callq 0x4420
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x4340
leaq 0x8(%rsp), %rdi
callq 0x4470
leaq 0x4e37(%rip), %rax      # 0x9c58
cmpq %rax, (%rbx)
je 0x4e33
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4280
jmp 0x4e3e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e60
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x4e4a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4470
movq %rbx, %rdi
callq 0x4480
nop
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/cpp/example.pb.cc
// Function: Person::MergeFrom(Person const&)
void Person::MergeFrom(const Person& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Person)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_email(from._internal_email());
    }
    if (cached_has_bits & 0x00000004u) {
      id_ = from.id_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rdi, %rsi
jne 0x4eb9
leaq 0x224f(%rip), %rdx      # 0x70cb
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x3, %esi
movl $0x166, %ecx            # imm = 0x166
callq 0x4400
leaq 0x2243(%rip), %rsi      # 0x70dd
movq %r15, %rdi
callq 0x4420
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x4340
leaq 0x10(%rsp), %rdi
callq 0x4470
movq 0x8(%r14), %rsi
testb $0x1, %sil
je 0x4ed4
leaq 0x8(%rbx), %rdi
andq $-0x2, %rsi
addq $0x8, %rsi
callq 0x584e
movl 0x10(%r14), %ebp
testb $0x7, %bpl
je 0x4f66
testb $0x1, %bpl
je 0x4f1c
movq 0x18(%r14), %rdx
orl $0x1, 0x10(%rbx)
leaq 0x18(%rbx), %rdi
movq 0x8(%rbx), %rsi
testb $0x1, %sil
jne 0x4f71
movq (%rdi), %rax
cmpq 0x50a0(%rip), %rax      # 0x9fa8
je 0x4f17
movq %rax, %rdi
movq %rdx, %rsi
callq 0x4180
jmp 0x4f1c
callq 0x550c
testb $0x2, %bpl
je 0x4f56
movq 0x20(%r14), %rdx
orl $0x2, 0x10(%rbx)
leaq 0x20(%rbx), %rdi
movq 0x8(%rbx), %rsi
testb $0x1, %sil
jne 0x4f7a
movq (%rdi), %rax
cmpq 0x5066(%rip), %rax      # 0x9fa8
je 0x4f51
movq %rax, %rdi
movq %rdx, %rsi
callq 0x4180
jmp 0x4f56
callq 0x550c
testb $0x4, %bpl
je 0x4f63
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
orl %ebp, 0x10(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x4efe
andq $-0x2, %rsi
movq (%rsi), %rsi
jmp 0x4f38
jmp 0x4f85
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4470
movq %rbx, %rdi
callq 0x4480
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/cpp/example.pb.cc
// Function: Person::InternalSwap(Person*)
void Person::InternalSwap(Person* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  email_.Swap(&other->email_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  swap(id_, other->id_);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %r12
movq 0x8(%rsi), %rsi
testb $0x1, %r12b
movq %r15, (%rsp)
jne 0x5033
testb $0x1, %sil
jne 0x503d
movl 0x10(%r14), %eax
movl 0x10(%rbx), %ecx
movl %ecx, 0x10(%r14)
movl %eax, 0x10(%rbx)
jmp 0x5069
testb $0x1, %sil
je 0x5184
andq $-0x2, %rsi
addq $0x8, %rsi
movq %r15, %rdi
callq 0x58b0
movq 0x8(%r14), %r12
movl 0x10(%r14), %eax
movl 0x10(%rbx), %ecx
movl %ecx, 0x10(%r14)
movl %eax, 0x10(%rbx)
testb $0x1, %r12b
jne 0x5163
xorl %eax, %eax
movq %r12, %r13
leaq 0x18(%rbx), %rbp
movq 0x18(%r14), %r15
cmpq 0x4f2b(%rip), %r15      # 0x9fa8
jne 0x50a5
movq (%rbp), %rcx
cmpq 0x4f1e(%rip), %rcx      # 0x9fa8
je 0x50dd
leaq 0x18(%r14), %r15
movq 0x4f11(%rip), %rdx      # 0x9fa8
movq %r15, %rdi
movq %r13, %rsi
callq 0x550c
movq (%r15), %r15
movq (%rbp), %rsi
cmpq 0x4ef8(%rip), %rsi      # 0x9fa8
jne 0x50c8
movq 0x4eef(%rip), %rdx      # 0x9fa8
movq %rbp, %rdi
movq %r13, %rsi
callq 0x550c
movq (%rbp), %rsi
movq %r15, %rdi
callq 0x4200
movq (%rsp), %rax
movq (%rax), %r12
movl %r12d, %eax
andl $0x1, %eax
leaq 0x20(%r14), %r13
testq %rax, %rax
jne 0x5177
leaq 0x20(%rbx), %r15
movq (%r13), %rbp
cmpq 0x4eaf(%rip), %rbp      # 0x9fa8
jne 0x511d
movq (%r15), %rax
cmpq 0x4ea3(%rip), %rax      # 0x9fa8
je 0x5146
movq 0x4e9a(%rip), %rdx      # 0x9fa8
movq %r13, %rdi
movq %r12, %rsi
callq 0x550c
movq (%r13), %rbp
movq (%r15), %rsi
cmpq 0x4e81(%rip), %rsi      # 0x9fa8
jne 0x513e
movq 0x4e78(%rip), %rdx      # 0x9fa8
movq %r15, %rdi
movq %r12, %rsi
callq 0x550c
movq (%r15), %rsi
movq %rbp, %rdi
callq 0x4200
movl 0x28(%r14), %eax
movl 0x28(%rbx), %ecx
movl %ecx, 0x28(%r14)
movl %eax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rax
andq $-0x2, %rax
movq (%rax), %r13
movl $0x1, %eax
jmp 0x506e
andq $-0x2, %r12
movq (%r12), %r12
jmp 0x50ea
leaq 0x8(%rbx), %rdi
callq 0x577e
movq %rax, %rsi
jmp 0x5045
nop
// File: /workspace/github_cpp_makefile_star2_O3/vgteam[P]stream/src/stream.hpp
// Function: bool stream::write_buffered<Person>(std::ostream&, std::vector<Person, std::allocator<Person>>&, unsigned long)
bool write_buffered(std::ostream& out, std::vector<T>& buffer, uint64_t buffer_limit) {
    bool wrote = false;
    if (buffer.size() >= buffer_limit) {
        std::function<T(uint64_t)> lambda = [&buffer](uint64_t n) { return buffer.at(n); };
#pragma omp critical (stream_out)
        wrote = write(out, buffer.size(), lambda);
        buffer.clear();
    }
    return wrote;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
cmpq %rdx, %rsi
jae 0x5f1f
xorl %ebp, %ebp
jmp 0x5f85
movq %rsp, %rdx
movq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0x5f8(%rip), %rax       # 0x652c
movq %rax, 0x18(%rdx)
leaq 0x5fb(%rip), %rax       # 0x653a
movq %rax, 0x10(%rdx)
callq 0x6249
movl %eax, %ebp
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r15, %r12
je 0x5f6e
movq %r15, %r14
movq %r14, %rdi
callq 0x47de
addq $0x30, %r14
cmpq %r12, %r14
jne 0x5f59
movq %r15, 0x8(%rbx)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x5f85
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5fb8
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x5fb0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x4480
movq %rax, %rdi
callq 0x538a
// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit-monitor.cc
// Function: request_environ(int, cpbuffer<1024u>&, unsigned short)
static void request_environ(int socknum, cpbuffer_t &rbuffer, uint16_t proto_version)
{
    char c = (char)cp_cmd::LISTENENV;

    if (proto_version < 5) {
        throw cp_old_server_exception();
    }

    write_all_x(socknum, &c, 1);

    wait_for_reply(rbuffer, socknum);

    cp_rply reply_pkt_h = (cp_rply)rbuffer[0];
    if (reply_pkt_h != cp_rply::ACK) {
        throw dinit_protocol_error();
    }
    rbuffer.consume(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movb $0x1b, 0xf(%rsp)
cmpw $0x5, %dx
jb 0x3b01
movq %rsi, %rbx
movl %edi, %ebp
movl $0x1, %r12d
leaq 0xf(%rsp), %r14
xorl %r15d, %r15d
movl %r12d, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x20a0
cmpl $-0x1, %eax
je 0x3a77
addl %eax, %r15d
movslq %eax, %rcx
addq %rcx, %r14
subl %eax, %r12d
jmp 0x3a81
callq 0x2040
cmpl $0x4, (%rax)
jne 0x3ada
testl %r12d, %r12d
jg 0x3a57
cmpl $-0x1, %r15d
je 0x3adf
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4a5b
movl 0x400(%rbx), %eax
leal -0x400(%rax), %ecx
cmpl $0x400, %eax            # imm = 0x400
cmovbl %eax, %ecx
cmpb $0x32, (%rbx,%rcx)
jne 0x3b14
leal 0x1(%rax), %ecx
addl $0xfffffc01, %eax       # imm = 0xFFFFFC01
cmpl $0x400, %ecx            # imm = 0x400
cmovbl %ecx, %eax
movl %eax, 0x400(%rbx)
decl 0x404(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
jg 0x3a8c
movl $0x4, %edi
callq 0x2100
movq %rax, %rbx
callq 0x2040
movl (%rax), %eax
movl %eax, (%rbx)
leaq 0x527c(%rip), %rsi      # 0x8d78
movq %rbx, %rdi
jmp 0x3b28
movl $0x1, %edi
callq 0x2100
leaq 0x523e(%rip), %rsi      # 0x8d50
jmp 0x3b25
movl $0x1, %edi
callq 0x2100
leaq 0x5203(%rip), %rsi      # 0x8d28
movq %rax, %rdi
xorl %edx, %edx
callq 0x2390