LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %eax
notl %eax
testb $0x5, %al
jne 0x4a8d
movq 0x18(%rbx), %rdi
callq 0x5182
movq %rax, %r14
movl 0x28(%rbx), %edi
callq 0x5536
addq %rax, %r14
addq $0x2, %r14
jmp 0x4a98
movq %rbx, %rdi
callq 0x4a1c
movq %rax, %r14
testb $0x2, 0x10(%rbx)
je 0x4aad
movq 0x20(%rbx), %rdi
callq 0x5182
addq %rax, %r14
incq %r14
testb $0x1, 0x8(%rbx)
jne 0x4ac2
movl %r14d, 0x14(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rbx), %rdi
addq $0x14, %rbx
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4050
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4b32
leaq 0x25d4(%rip), %rdx      # 0x70cb
leaq 0x8(%rsp), %r15
pushq $0x3
popq %rsi
movq %r15, %rdi
movl $0x157, %ecx            # imm = 0x157
callq 0x43f0
leaq 0x25ca(%rip), %rsi      # 0x70dd
movq %r15, %rdi
callq 0x4410
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x4330
leaq 0x8(%rsp), %rdi
callq 0x4460
leaq 0x5127(%rip), %rax      # 0x9c60
cmpq %rax, (%rbx)
je 0x4b4b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4280
jmp 0x4b56
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4b78
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x4b62
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4460
movq %rbx, %rdi
callq 0x4470
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4bcf
leaq 0x2537(%rip), %rdx      # 0x70cb
leaq 0x10(%rsp), %r15
pushq $0x3
popq %rsi
movq %r15, %rdi
movl $0x166, %ecx            # imm = 0x166
callq 0x43f0
leaq 0x252d(%rip), %rsi      # 0x70dd
movq %r15, %rdi
callq 0x4410
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x4330
leaq 0x10(%rsp), %rdi
callq 0x4460
movq 0x8(%r14), %rsi
testb $0x1, %sil
je 0x4bea
leaq 0x8(%rbx), %rdi
andq $-0x2, %rsi
addq $0x8, %rsi
callq 0x5630
movl 0x10(%r14), %ebp
testb $0x7, %bpl
je 0x4c28
testb $0x1, %bpl
je 0x4c06
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x519c
testb $0x2, %bpl
je 0x4c18
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x51c6
testb $0x4, %bpl
je 0x4c25
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
orl %ebp, 0x10(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4c35
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4460
movq %rbx, %rdi
callq 0x4470
// File: /workspace/github_cpp_makefile_star2_O2/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
jne 0x4cd3
testb $0x1, %sil
jne 0x4cdd
xorl %eax, %eax
jmp 0x4cf6
testb $0x1, %sil
je 0x4df6
andq $-0x2, %rsi
addq $0x8, %rsi
movq %r15, %rdi
callq 0x568c
movq (%r15), %r12
movl %r12d, %eax
andl $0x1, %eax
movl 0x10(%r14), %ecx
movl 0x10(%rbx), %edx
movl %edx, 0x10(%r14)
movl %ecx, 0x10(%rbx)
leaq 0x18(%r14), %rdi
movq %r12, %r13
testq %rax, %rax
jne 0x4ddd
leaq 0x18(%rbx), %rbp
movq (%rdi), %rcx
cmpq 0x528e(%rip), %rcx      # 0x9fb0
jne 0x4d31
movq (%rbp), %rcx
cmpq 0x5281(%rip), %rcx      # 0x9fb0
je 0x4d6d
movq 0x5278(%rip), %rsi      # 0x9fb0
movq %r13, %rdx
callq 0x5408
movq %r15, %r12
movq %rax, %r15
movq %rbp, %rdi
movq 0x5260(%rip), %rsi      # 0x9fb0
movq %r13, %rdx
callq 0x5408
movq %r15, %rdi
movq %rax, %rsi
callq 0x4200
movq (%r12), %r12
movl %r12d, %eax
andl $0x1, %eax
leaq 0x20(%r14), %rdi
testq %rax, %rax
jne 0x4dec
leaq 0x20(%rbx), %r15
movq (%rdi), %rax
cmpq 0x522c(%rip), %rax      # 0x9fb0
jne 0x4d92
movq (%r15), %rax
cmpq 0x5220(%rip), %rax      # 0x9fb0
je 0x4dc0
movq 0x5217(%rip), %r13      # 0x9fb0
movq %r13, %rsi
movq %r12, %rdx
callq 0x5408
movq %rax, %rbp
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x5408
movq %rbp, %rdi
movq %rax, %rsi
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, %rcx
andq $-0x2, %rcx
movq (%rcx), %r13
jmp 0x4d14
andq $-0x2, %r12
movq (%r12), %r12
jmp 0x4d76
leaq 0x8(%rbx), %rdi
callq 0x554e
movq %rax, %rsi
jmp 0x4ce5
nop
// File: /workspace/github_cpp_makefile_star2_O2/vgteam[P]stream/./cpp/example.pb.h
// Function: Person::set_name(char const*)
inline void Person::set_name(const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  _has_bits_[0] |= 0x00000001u;
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
              GetArena());
  // @@protoc_insertion_point(field_set_char:Person.name)
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x59ec
leaq 0x190f(%rip), %rdx      # 0x72c0
leaq 0x8(%rsp), %r15
pushq $0x3
popq %rsi
movq %r15, %rdi
movl $0x147, %ecx            # imm = 0x147
callq 0x43f0
leaq 0x1906(%rip), %rsi      # 0x72d3
movq %r15, %rdi
callq 0x4410
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x4330
leaq 0x8(%rsp), %rdi
callq 0x4460
orb $0x1, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x5c6c
movq 0x8(%rbx), %rcx
addq $0x18, %rbx
testb $0x1, %cl
jne 0x5a37
movq 0x459a(%rip), %rsi      # 0x9fb0
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x4ea2
leaq 0x8(%rsp), %rdi
callq 0x4150
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
andq $-0x2, %rcx
movq (%rcx), %rcx
jmp 0x5a0f
jmp 0x5a42
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4460
jmp 0x5a63
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4150
jmp 0x5a63
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4470
nop
// File: /workspace/github_cpp_makefile_star2_O2/vgteam[P]stream/./cpp/example.pb.h
// Function: Person::set_email(char const*)
inline void Person::set_email(const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  _has_bits_[0] |= 0x00000002u;
  email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
              GetArena());
  // @@protoc_insertion_point(field_set_char:Person.email)
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x5ac2
leaq 0x1839(%rip), %rdx      # 0x72c0
leaq 0x8(%rsp), %r15
pushq $0x3
popq %rsi
movq %r15, %rdi
movl $0x1c0, %ecx            # imm = 0x1C0
callq 0x43f0
leaq 0x1830(%rip), %rsi      # 0x72d3
movq %r15, %rdi
callq 0x4410
leaq 0x7(%rsp), %rdi
movq %rax, %rsi
callq 0x4330
leaq 0x8(%rsp), %rdi
callq 0x4460
orb $0x2, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x5c6c
movq 0x8(%rbx), %rcx
addq $0x20, %rbx
testb $0x1, %cl
jne 0x5b0d
movq 0x44c4(%rip), %rsi      # 0x9fb0
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x4ea2
leaq 0x8(%rsp), %rdi
callq 0x4150
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
andq $-0x2, %rcx
movq (%rcx), %rcx
jmp 0x5ae5
jmp 0x5b18
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4460
jmp 0x5b39
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4150
jmp 0x5b39
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4470
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x28, %rsp
movq %rdx, %rcx
movq %rsi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
pushq $0x30
popq %rsi
cqto
idivq %rsi
cmpq %rcx, %rax
jae 0x5b9f
xorl %ebp, %ebp
jmp 0x5bde
leaq 0x8(%rsp), %rdx
andq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
leaq 0x495(%rip), %rcx       # 0x6048
movq %rcx, 0x18(%rdx)
leaq 0x498(%rip), %rcx       # 0x6056
movq %rcx, 0x10(%rdx)
movq %rax, %rsi
callq 0x5ed5
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6040
leaq 0x8(%rsp), %rdi
callq 0x6480
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6480
movq %rbx, %rdi
callq 0x4470
// File: /workspace/github_cpp_makefile_star2_O2/vgteam[P]stream/src/stream.hpp
// Function: bool stream::write<Person>(std::ostream&, unsigned long, std::function<Person (unsigned long)>&)
bool write(std::ostream& out, uint64_t count, std::function<T(uint64_t)>& lambda) {

    ::google::protobuf::io::ZeroCopyOutputStream *raw_out =
          new ::google::protobuf::io::OstreamOutputStream(&out);
    ::google::protobuf::io::GzipOutputStream *gzip_out =
          new ::google::protobuf::io::GzipOutputStream(raw_out);
    ::google::protobuf::io::CodedOutputStream *coded_out =
          new ::google::protobuf::io::CodedOutputStream(gzip_out);

    // prefix the chunk with the number of objects
    coded_out->WriteVarint64(count);

    std::string s;
    uint64_t written = 0;
    for (uint64_t n = 0; n < count; ++n, ++written) {
        lambda(n).SerializeToString(&s);
        // and prefix each object with its size
        coded_out->WriteVarint32(s.size());
        coded_out->WriteRaw(s.data(), s.size());
    }

    delete coded_out;
    delete gzip_out;
    delete raw_out;

    return !count || written == count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x48
popq %rdi
callq 0x42b0
movq %rax, %r12
pushq $-0x1
popq %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40e0
movl $0xa8, %edi
callq 0x42b0
movq %rax, %rbp
movq %rax, %rdi
movq %r12, 0x10(%rsp)
movq %r12, %rsi
callq 0x44b0
pushq $0x50
popq %rdi
callq 0x42b0
movq %rax, %r13
movq %rax, %rdi
movq %rbp, 0x8(%rsp)
movq %rbp, %rsi
callq 0x611a
movq %r13, %rdi
movq %r15, %rsi
callq 0x6122
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %ebp, %ebp
leaq 0x38(%rsp), %rbx
leaq 0x18(%rsp), %r12
cmpq %rbp, %r15
je 0x5fad
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x6150
movq %rbx, %rdi
movq %r12, %rsi
callq 0x41b0
movq %rbx, %rdi
callq 0x4738
movl 0x20(%rsp), %esi
movq %r13, %rdi
callq 0x617a
movq 0x18(%rsp), %rsi
movl 0x20(%rsp), %edx
movq %r13, %rdi
callq 0x61a6
incq %rbp
jmp 0x5f65
movq %r13, %rdi
callq 0x4290
pushq $0x50
popq %rsi
movq %r13, %rdi
callq 0x42c0
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
callq 0x4150
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x50
popq %rsi
movq %r13, %rdi
jmp 0x6012
movq %rax, %rbx
movl $0xa8, %esi
movq %rbp, %rdi
jmp 0x6012
movq %rax, %rbx
pushq $0x48
popq %rsi
movq %r12, %rdi
callq 0x42c0
jmp 0x6037
jmp 0x602a
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4738
jmp 0x602d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4150
movq %rbx, %rdi
callq 0x4470
nop
// File: /workspace/github_cpp_makefile_star2_O2/davmac314[P]dinit/src/includes/dinit-client.h
// Function: get_default_socket_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool)
inline const char *get_default_socket_path(std::string &control_socket_str, bool user_dinit)
{
    const char *control_socket_path;
    const char *sockpath = getenv("DINIT_SOCKET_PATH");
    if (sockpath) {
        control_socket_str = sockpath;
        control_socket_path = control_socket_str.c_str();
    }
    else if (user_dinit) {
        const char * rundir = getenv("XDG_RUNTIME_DIR");
        const char * sockname = "dinitctl";
        if (rundir == nullptr) {
            sockname = ".dinitctl";
            rundir = getenv("HOME");
            if (rundir == nullptr) {
                struct passwd * pwuid_p = getpwuid(getuid());
                if (pwuid_p != nullptr) {
                    rundir = pwuid_p->pw_dir;
                }
            }
        }

        if (rundir != nullptr) {
            control_socket_str = rundir;
            control_socket_str.push_back('/');
            control_socket_str += sockname;
            control_socket_path = control_socket_str.c_str();
        }
        else {
            return nullptr;
        }
    }
    else {
        control_socket_path = SYSCONTROLSOCKET; // default to system
    }
    return control_socket_path;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x2e1d(%rip), %rdi      # 0x68ca
callq 0x2290
testq %rax, %rax
je 0x3ac4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2400
jmp 0x3b25
testb %bpl, %bpl
je 0x3ae3
leaq 0x2e0c(%rip), %rdi      # 0x68dc
callq 0x2290
testq %rax, %rax
je 0x3aec
leaq 0x2e0c(%rip), %r14      # 0x68ed
jmp 0x3b04
leaq 0x2f38(%rip), %rax      # 0x6a22
jmp 0x3b28
leaq 0x2e03(%rip), %rdi      # 0x68f6
callq 0x2290
leaq 0x2ded(%rip), %r14      # 0x68ec
testq %rax, %rax
je 0x3b2d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2400
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x21d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23f0
movq (%rbx), %rax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2130
movl %eax, %edi
callq 0x2260
testq %rax, %rax
je 0x3b47
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x3b04
xorl %eax, %eax
jmp 0x3b28
// File: /workspace/github_cpp_makefile_star2_O2/davmac314[P]dinit/src/includes/dinit-client.h
// Function: connect_to_daemon(char const*)
inline int connect_to_daemon(const char *control_socket_path)
{
    int socknum = socket(AF_UNIX, SOCK_STREAM, 0);
    if (socknum == -1) {
        throw general_error(errno, "opening socket");
    }

    struct sockaddr_un * name;
    uint sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen(control_socket_path) + 1;
    name = (struct sockaddr_un *) malloc(sockaddr_size);
    if (name == nullptr) {
        throw general_error(ENOMEM);
    }

    name->sun_family = AF_UNIX;
    strcpy(name->sun_path, control_socket_path);

    int connr = connect(socknum, (struct sockaddr *) name, sockaddr_size);
    free(name);

    if (connr == -1) {
        throw control_sock_conn_err(errno, control_socket_path);
    }

    return socknum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
pushq $0x1
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x2060
cmpl $-0x1, %eax
je 0x3bd1
movl %eax, %ebp
movq %rbx, %rdi
callq 0x20e0
movq %rax, %r14
addl $0x3, %r14d
movq %r14, %rdi
callq 0x22f0
testq %rax, %rax
je 0x3c4d
movq %rax, %r15
movw $0x1, (%rax)
movq %rax, %rdi
addq $0x2, %rdi
movq %rbx, %rsi
callq 0x2200
movl %ebp, %edi
movq %r15, %rsi
movl %r14d, %edx
callq 0x21b0
movl %eax, %r14d
movq %r15, %rdi
callq 0x2280
cmpl $-0x1, %r14d
je 0x3c87
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0x2120
movq %rax, %rbx
callq 0x2040
movl (%rax), %eax
leaq 0x38(%rsp), %rcx
xorl %edx, %edx
movb %dl, (%rcx)
movl %eax, (%rbx)
leaq 0x2d06(%rip), %rax      # 0x68fb
movq %rax, 0x8(%rbx)
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
movb (%rcx), %al
movb %al, 0x20(%rbx)
movq 0x1(%rcx), %rax
movq %rax, 0x21(%rbx)
movl 0x9(%rcx), %eax
movl %eax, 0x29(%rbx)
movzwl 0xd(%rcx), %eax
movw %ax, 0x2d(%rbx)
movb 0xf(%rcx), %al
movb %al, 0x2f(%rbx)
andq $0x0, 0x18(%rbx)
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %dl, (%rcx)
leaq 0x614f(%rip), %rsi      # 0x9d88
leaq 0x3b4(%rip), %rdx       # 0x3ff4
movq %rbx, %rdi
callq 0x23b0
jmp 0x3cd0
pushq $0x30
popq %rdi
callq 0x2120
movl $0xc, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x20(%rax), %rcx
movq %rcx, 0x10(%rax)
andq $0x0, 0x18(%rax)
movb $0x0, 0x20(%rax)
leaq 0x6110(%rip), %rsi      # 0x9d88
leaq 0x375(%rip), %rdx       # 0x3ff4
movq %rax, %rdi
callq 0x23b0
pushq $0x30
popq %rdi
callq 0x2120
movq %rax, %r14
callq 0x2040
movl (%rax), %ebp
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rbx, %rsi
callq 0x3f40
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x3f7c
leaq 0x60d7(%rip), %rsi      # 0x9d98
leaq 0x32c(%rip), %rdx       # 0x3ff4
movq %r14, %rdi
callq 0x23b0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x3cef
movq %rax, %rbx
movq %r14, %rdi
callq 0x2170
jmp 0x3cf4
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O2/davmac314[P]dinit/src/includes/dinit-client.h
// Function: fill_some(cpbuffer<1024u>&, int)
inline void fill_some(cpbuffer_t &buf, int fd)
{
    while(true) {
        int r = buf.fill(fd);
        if (r == 0) {
            throw cp_read_exception(0);
        }
        else if (r > 0) {
            return;
        }

        if (errno != EINTR) {
            throw cp_read_exception(errno);
        }

        // if EINTR, just try again
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq %r14, %rdi
movl %ebx, %esi
callq 0x4a92
testl %eax, %eax
je 0x4953
jg 0x494d
callq 0x2040
cmpl $0x4, (%rax)
je 0x4921
movq %rax, %r15
pushq $0x4
popq %rdi
callq 0x2120
movl (%r15), %ecx
movl %ecx, (%rax)
jmp 0x495e
popq %rbx
popq %r14
popq %r15
retq
pushq $0x4
popq %rdi
callq 0x2120
andl $0x0, (%rax)
leaq 0x5403(%rip), %rsi      # 0x9d68
movq %rax, %rdi
xorl %edx, %edx
callq 0x23b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/main.cpp
// Function: print(TreeNode*)
void print(TreeNode *p)
{
	cout<<"Current Address: "<<p<<endl;
	cout<<"Word: ("<<p->Node_Word.Number<<","<<p->Node_Word.Value<<")"<<endl;
	cout<<"Son_Count: "<<p->Next.size()<<endl;
	for(int i=0;i<p->Next.size();i++)
	{
		cout<<"\tAddress: "<<p->Next[i]<<endl;
	}
	cout<<"Parent: "<<p->Parent<<endl;
	cout<<endl;
	for(int i=0;i<p->Next.size();i++)
	{
		print(p->Next[i]);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8bd2(%rip), %r14      # 0xafd0
leaq 0x4bff(%rip), %rsi      # 0x7004
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2130
movq %rax, %rdi
callq 0x20d0
leaq 0x4bef(%rip), %rsi      # 0x7016
movq %r14, %rdi
callq 0x2190
movl (%rbx), %esi
movq %rax, %rdi
callq 0x2270
leaq 0x4bde(%rip), %rsi      # 0x701e
movq %rax, %rdi
callq 0x2190
movsd 0x8(%rbx), %xmm0
movq %rax, %rdi
callq 0x2240
leaq 0x4d1b(%rip), %rsi      # 0x7177
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20d0
leaq 0x4bad(%rip), %rsi      # 0x7020
movq %r14, %rdi
callq 0x2190
movq 0x18(%rbx), %rsi
subq 0x10(%rbx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x20d0
xorl %r12d, %r12d
leaq 0x4b8b(%rip), %r15      # 0x702c
movq 0x18(%rbx), %rax
subq 0x10(%rbx), %rax
sarq $0x3, %rax
cmpq %r12, %rax
jbe 0x24da
movq %r14, %rdi
movq %r15, %rsi
callq 0x2190
movq 0x10(%rbx), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20d0
incq %r12
jmp 0x24a1
movq 0x8aef(%rip), %r14      # 0xafd0
leaq 0x4b4f(%rip), %rsi      # 0x7037
movq %r14, %rdi
callq 0x2190
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x20d0
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x2531
movq (%rax,%r14,8), %rdi
callq 0x23ec
incq %r14
jmp 0x250f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Var_Number(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Lexical::Get_Var_Number(std::string s)
{
	if(this->Symbol_Table[s]==0)
	{
		int num=this->Symbol_Table.size();
		this->Symbol_Table[s]=num;
	}
	return this->Symbol_Table[s];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0x376c
cmpl $0x0, (%rax)
jne 0x328b
movl 0x60(%r15), %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x376c
movl %ebp, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x376c
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Keyword(int&)
Word Lexical::Get_Keyword(int &pos)
{
	if(pos+2<this->Source.length())
	{
		std::string check;
		check+=this->Source[pos];
		check+=this->Source[pos+1];
		check+=this->Source[pos+2];
		if(check=="var")
		{
			pos+=3;
			return Word(1,0);
		}
	}
	
	if(pos+4<this->Source.length())
	{
		std::string check;
		check+=this->Source[pos];
		check+=this->Source[pos+1];
		check+=this->Source[pos+2];
		check+=this->Source[pos+3];
		check+=this->Source[pos+4];
		if(check=="print")
		{
			pos+=5;
			return Word(2,0);
		}
	}
	
	return Word(-1,0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %eax
movslq %eax, %rdx
leaq 0x2(%rdx), %rsi
movq 0x8(%rdi), %rcx
leaq 0x18(%rsp), %r15
cmpq %rsi, %rcx
jbe 0x334f
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%r14), %rax
movsbl (%rax,%rdx), %esi
callq 0x2160
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x1(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2160
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x2(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2160
leaq 0x3ddb(%rip), %rsi      # 0x70f8
leaq 0x8(%rsp), %rdi
callq 0x37d2
testb %al, %al
je 0x333f
addl $0x3, (%rbx)
leaq 0x8(%rsp), %rdi
callq 0x20c0
pushq $0x1
jmp 0x3403
leaq 0x8(%rsp), %rdi
callq 0x20c0
movl (%rbx), %eax
movq 0x8(%r14), %rcx
leal 0x4(%rax), %edx
movslq %edx, %rdx
cmpq %rdx, %rcx
jbe 0x3401
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cltq
movq (%r14), %rcx
movsbl (%rcx,%rax), %esi
callq 0x2160
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x1(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2160
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x2(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2160
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x3(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2160
movslq (%rbx), %rax
movq (%r14), %rcx
movsbl 0x4(%rcx,%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x2160
leaq 0x3d24(%rip), %rsi      # 0x70fc
leaq 0x8(%rsp), %rdi
callq 0x37d2
movl %eax, %ebp
testb %al, %al
je 0x33ef
addl $0x5, (%rbx)
pushq $0x2
jmp 0x33f1
pushq $0x1
popq %rbx
leaq 0x8(%rsp), %rdi
callq 0x20c0
testb %bpl, %bpl
jne 0x3404
pushq $-0x1
popq %rbx
xorps %xmm0, %xmm0
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3416
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Var(int&)
Word Lexical::Get_Var(int &pos)
{
	if(!isalpha(this->Source[pos]))return Word(-1,0);
	
	std::string s;

	while((pos<this->Source.length())&&(isalpha(this->Source[pos]))||(isdigit(this->Source[pos])))
	{
		s+=this->Source[pos];
		pos++;
	}
	
	return Word(3,this->Get_Var_Number(s));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rsi), %r12
movq (%rdi), %r13
movsbl (%r13,%r12), %edi
callq 0x2230
testl %eax, %eax
je 0x3503
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x10(%rsp), %r15
movslq %r12d, %rax
movsbl (%r13,%rax), %r12d
cmpq %rax, 0x8(%rbx)
jbe 0x349b
movl %r12d, %edi
callq 0x2230
testl %eax, %eax
setne %al
leal -0x30(%r12), %ecx
cmpl $0xa, %ecx
setb %cl
orb %al, %cl
jne 0x34a5
jmp 0x34be
leal -0x30(%r12), %eax
cmpl $0x9, %eax
ja 0x34be
movq %r15, %rdi
movl %r12d, %esi
callq 0x2160
movl (%r14), %r12d
incl %r12d
movl %r12d, (%r14)
movq (%rbx), %r13
jmp 0x346e
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x21f0
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x325c
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x20c0
leaq 0x10(%rsp), %rdi
callq 0x20c0
movsd 0x8(%rsp), %xmm0
pushq $0x3
popq %rax
jmp 0x3509
pushq $-0x1
popq %rax
xorps %xmm0, %xmm0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20c0
jmp 0x352b
jmp 0x3528
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Number(int&)
Word Lexical::Get_Number(int &pos)
{	
	if(!isdigit(this->Source[pos]))return Word(-1,0);
	
	double ret=0;
	
	while((pos<this->Source.length())&&(isdigit(this->Source[pos])))
	{
		ret=ret*10+(this->Source[pos]-'0');
		pos++;
	}
	
	if(this->Source[pos]=='.')
	{
		double k=0.1;
		pos++;
		while((pos<this->Source.length())&&(isdigit(this->Source[pos])))
		{
			ret=ret+(this->Source[pos]-'0')*k;
			pos++;
			k/=10;
		}
	}
	
	return Word(4,ret);
}

// Assembly:
movslq (%rsi), %rax
movq (%rdi), %rcx
movsbl (%rcx,%rax), %edx
addl $-0x30, %edx
cmpl $0x9, %edx
ja 0x359a
movq 0x8(%rdi), %rdx
cmpq %rax, %rdx
movq %rax, %rdi
cmovaq %rdx, %rdi
leal 0x1(%rax), %r8d
xorpd %xmm0, %xmm0
movsd 0x3b62(%rip), %xmm1     # 0x70d0
movsbl (%rcx,%rax), %r9d
cmpq %rax, %rdx
jbe 0x35a6
leal -0x30(%r9), %r10d
cmpl $0x9, %r10d
ja 0x35a3
cvtsi2sd %r10d, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
incq %rax
movl %r8d, (%rsi)
incl %r8d
jmp 0x356e
pushq $-0x1
popq %rax
xorpd %xmm0, %xmm0
jmp 0x35f2
movq %rax, %rdi
pushq $0x4
popq %rax
cmpb $0x2e, %r9b
jne 0x35f2
leal 0x1(%rdi), %r8d
movl %r8d, (%rsi)
movslq %r8d, %r8
addl $0x2, %edi
movsd 0x3b04(%rip), %xmm2     # 0x70c8
cmpq %r8, %rdx
jbe 0x35f2
movsbl (%rcx,%r8), %r9d
addl $-0x30, %r9d
cmpl $0x9, %r9d
ja 0x35f2
cvtsi2sd %r9d, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm3, %xmm0
incq %r8
movl %edi, (%rsi)
divsd %xmm1, %xmm2
incl %edi
jmp 0x35c4
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Symbol(int&)
Word Lexical::Get_Symbol(int &pos)
{
	switch(this->Source[pos])
	{
		case '+':pos++;return Word(5,0);break;
		case '-':pos++;return Word(6,0);break;
		case '*':pos++;return Word(7,0);break;
		case '/':pos++;return Word(8,0);break;
		case '=':pos++;return Word(9,0);break;
		case '(':pos++;return Word(10,0);break;
		case ')':pos++;return Word(11,0);break;
		case ';':pos++;return Word(12,0);break;
		default:return Word(-1,0);
	}
}

// Assembly:
movslq (%rsi), %rcx
movq (%rdi), %rax
movzbl (%rax,%rcx), %edx
pushq $-0x1
popq %rax
leal -0x28(%rdx), %edi
cmpl $0x7, %edi
ja 0x361d
leaq 0x3ac8(%rip), %rdx      # 0x70d8
movslq (%rdx,%rdi,4), %rdi
addq %rdx, %rdi
jmpq *%rdi
pushq $0xa
jmp 0x3641
cmpl $0x3b, %edx
je 0x363f
cmpl $0x3d, %edx
jne 0x3646
pushq $0x9
jmp 0x3641
pushq $0x5
jmp 0x3641
pushq $0xb
jmp 0x3641
pushq $0x6
jmp 0x3641
pushq $0x7
jmp 0x3641
pushq $0x8
jmp 0x3641
pushq $0xc
popq %rax
incl %ecx
movl %ecx, (%rsi)
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Get_Next_Word(int&)
Word Lexical::Get_Next_Word(int &pos)
{
	Word ret;
	
	ret=this->Get_Keyword(pos);
	if(ret.Number!=-1)return ret;
	
	ret=this->Get_Var(pos);
	if(ret.Number!=-1)return ret;
	
	ret=this->Get_Number(pos);
	if(ret.Number!=-1)return ret;
	
	ret=this->Get_Symbol(pos);
	if(ret.Number!=-1)return ret;
	
	return Word(-1,0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x32a4
cmpl $-0x1, %eax
jne 0x3694
movq %r14, %rdi
movq %rbx, %rsi
callq 0x342c
cmpl $-0x1, %eax
jne 0x3694
movq %r14, %rdi
movq %rbx, %rsi
callq 0x353e
cmpl $-0x1, %eax
jne 0x3694
movq %r14, %rdi
movq %rbx, %rsi
callq 0x35f4
cmpl $-0x1, %eax
jne 0x3694
pushq $-0x1
popq %rax
xorps %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Lexical/Lexical.cpp
// Function: Lexical::Analysis()
bool Lexical::Analysis()
{
	int pos=0;
	while(pos<this->Source.length())
	{
		if(!isgraph(this->Source[pos]))
		{
			pos++;
			continue;
		}
		Word w=this->Get_Next_Word(pos);
		if(w.Number==-1)
		{
			this->Target.List.clear();
			return false;
		} 
		this->Target.List.push_back(w);
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %r14
andl $0x0, (%r14)
movq %rdi, %rbx
leaq 0x20(%rdi), %r15
xorl %r12d, %r12d
movslq %r12d, %r13
movq 0x8(%rbx), %rbp
cmpq %r13, %rbp
jbe 0x3744
movq (%rbx), %rax
movsbl (%rax,%r13), %edi
callq 0x2180
testl %eax, %eax
je 0x372c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x364a
movl %eax, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
cmpl $-0x1, %eax
je 0x3736
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x37e0
movl 0x4(%rsp), %r12d
jmp 0x36e1
incl %r12d
movl %r12d, 0x4(%rsp)
jmp 0x36e1
movq 0x20(%rbx), %rax
cmpq %rax, 0x28(%rbx)
je 0x3744
movq %rax, 0x28(%rbx)
cmpq %r13, %rbp
setbe %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Grammar/Grammar.cpp
// Function: Grammar::Input(Word_List)
void Grammar::Input(Word_List WL)
{
	this->Handle_List.clear();
	Word_List PWL;
	
	for(int pos=0;pos<WL.List.size();pos++)
	{
		Word &W=WL.List[pos];
		if(W.Number==12)
		{
			this->Handle_List.push_back(PWL);
			PWL.List.clear();
		}
		else
		{
			PWL.List.push_back(W);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x46c8
movq %rsp, %r15
andq $0x0, 0x10(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x4, %rax
cmpq %r13, %rax
jbe 0x44a0
cmpl $0xc, (%rsi,%r12)
jne 0x448c
movq %r14, %rdi
movq %r15, %rsi
callq 0x46d0
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x4497
movq %rax, 0x8(%rsp)
jmp 0x4497
addq %r12, %rsi
movq %r15, %rdi
callq 0x37e0
incq %r13
addq $0x10, %r12
jmp 0x4455
movq %rsp, %rdi
callq 0x304a
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x304a
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Grammar/Grammar.cpp
// Function: Grammar::Analysis()
bool Grammar::Analysis()
{
	this->Grammar_Forest.forest.clear();
	for(int i=0;i<this->Handle_List.size();i++)
	{
		if(this->Handle_Analysis(i))continue;
		return false;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
cmpq %rax, 0x20(%rdi)
je 0x44e3
movq %rax, 0x20(%rbx)
xorl %ecx, %ecx
pushq $0x18
popq %r12
movq %rcx, %r14
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cqto
idivq %r12
movq %rax, %r15
cmpq %rcx, %rax
jbe 0x4513
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3d48
leaq 0x1(%r14), %rcx
testb %al, %al
jne 0x44e9
cmpq %r14, %r15
setbe %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Caproner[P]Naive_Compiler/Semantic/Semantic.cpp
// Function: Semantic::Analysis(Forest&)
bool Semantic::Analysis(Forest &F)
{
	for(int i=0;i<F.forest.size();i++)
	{
		TreeNode *p=F.forest[i];
		if(this->DFS(p))continue;
		return false;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ecx, %ecx
movq %rcx, %r15
movq (%rbx), %rax
movq 0x8(%rbx), %r12
subq %rax, %r12
sarq $0x3, %r12
cmpq %rcx, %r12
jbe 0x5e1c
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x5b28
leaq 0x1(%r15), %rcx
testb %al, %al
jne 0x5df2
cmpq %r15, %r12
setbe %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/exercises/ex16_14_15_main.cc
// Function: main
int main(int argc, char const *argv[])
{
	Screen<5, 5> scr('c');

	scr.display(std::cout);

	// output src to the screen
	std::cout << scr;

	std::cin >> scr;

	std::cout << scr;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq -0x48(%rbp), %rdi
pushq $0x63
popq %rsi
callq 0x128c
leaq -0x30(%rbp), %rbx
movq 0x2da2(%rip), %rdi      # 0x3fd0
movq %rbx, %rsi
callq 0x1060
movq 0x2d93(%rip), %rdi      # 0x3fd0
leaq -0x48(%rbp), %rsi
callq 0x12c7
movq 0x2d93(%rip), %rdi      # 0x3fe0
leaq -0x48(%rbp), %rsi
callq 0x1348
movq 0x2d73(%rip), %rdi      # 0x3fd0
leaq -0x48(%rbp), %rsi
callq 0x12c7
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x10c0
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/exercises/./ex16_14_15.h
// Function: operator>>(std::istream&, Screen<5u, 5u>&)
std::istream& operator>>(std::istream& is, Screen<H, W>& s)
	{
		char a;
		is >> a;
		std::string temp(H*W, a);
		s.contents = std::move(temp);
		return is;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x19(%rbp), %r15
movq %r15, %rsi
callq 0x10a0
movsbl (%r15), %edx
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x40(%rbp), %r15
pushq $0x19
popq %rsi
movq %r15, %rdi
callq 0x1080
addq $0x18, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x1090
movq %r15, %rdi
callq 0x1030
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day02/ex00/main.cpp
// Function: main
int main(void) {
	Fixed a;
	Fixed b(a);
	Fixed c;

	c = b;
	std::cout << a.getRawBits() << std::endl;
	std::cout << b.getRawBits() << std::endl;
	std::cout << c.getRawBits() << std::endl;
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movq %rbx, %rdi
callq 0x11ac
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x11b2
leaq 0x4(%rsp), %rdi
callq 0x11ac
leaq 0x4(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x11b8
leaq 0xc(%rsp), %rdi
callq 0x11c4
movq 0x2dc7(%rip), %rdi      # 0x3fd8
movl %eax, %esi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0x8(%rsp), %rdi
callq 0x11c4
movq 0x2da7(%rip), %rdi      # 0x3fd8
movl %eax, %esi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0x4(%rsp), %rdi
callq 0x11c4
movq 0x2d87(%rip), %rdi      # 0x3fd8
movl %eax, %esi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0x4(%rsp), %rdi
callq 0x11b0
leaq 0x8(%rsp), %rdi
callq 0x11b0
leaq 0xc(%rsp), %rdi
callq 0x11b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
jmp 0x129d
movq %rax, %rbx
jmp 0x12a7
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x11b0
leaq 0x8(%rsp), %rdi
callq 0x11b0
leaq 0xc(%rsp), %rdi
callq 0x11b0
movq %rbx, %rdi
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/optimalSolver.cc
// Function: OptimalSolver::OptimalSolver()
OptimalSolver::OptimalSolver() {
	matrix = NULL;
	defaultCells = NULL;
	readLength = 0;
	seedNum = 0;
	matrixSize = 0;
	L0Loaded = false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0xa
popq %rsi
pushq $0x1e
popq %rdx
callq 0x5fc4
andq $0x0, 0x35c(%rbx)
movb $0x0, 0x358(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x368(%rbx)
movups %xmm0, 0x378(%rbx)
movups %xmm0, 0x384(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/optimalSolver.cc
// Function: OptimalSolver::~OptimalSolver()
OptimalSolver::~OptimalSolver() {
	if  (matrix != NULL) {
		delete [] matrix;
		matrix = NULL;
	}
	if  (defaultCells != NULL) {
		delete [] defaultCells;
		defaultCells = NULL;
	}

	if (level.size() != 0)
		level.clear();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x368(%rdi), %rdi
testq %rdi, %rdi
je 0x420c
callq 0x32f0
andq $0x0, 0x368(%rbx)
movq 0x388(%rbx), %rdi
testq %rdi, %rdi
je 0x4225
callq 0x32f0
andq $0x0, 0x388(%rbx)
leaq 0x370(%rbx), %r14
movq 0x378(%rbx), %rax
cmpq 0x370(%rbx), %rax
je 0x4244
movq %r14, %rdi
callq 0x57d0
movq %r14, %rdi
callq 0x57d8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6108
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/optimalSolver.cc
// Function: OptimalSolver::feedL0()
void OptimalSolver::feedL0() {
	reset();
	tree.setHashLength(10);
	int lvPosCount = readLength + 1 - tree.getHashLength();

	for (int i = 0; i < lvPosCount; i++) {
		for (int j = 0; j < lvPosCount - i; j++) {
			cin >> level[0][i][j].start;
			cin >> level[0][i][j].end;
			cin >> level[0][i][j].frequency;
			cin >> level[0][i][j].isleaf;
#ifdef DEBUG
			cout << "level[0][" << i << "][" << j << "].start=" << level[0][i][j].start << endl;
			cout.flush();
#endif
		}
	}
			L0Loaded = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x368(%rdi), %rdi
movq 0x388(%rbx), %rsi
movslq 0x390(%rbx), %rdx
callq 0x31d0
movl $0xa, (%rbx)
movl 0x35c(%rbx), %ebp
movq %rbx, %rdi
callq 0x6b42
subl %eax, %ebp
incl %ebp
movslq %ebp, %rax
xorl %r12d, %r12d
testl %eax, %eax
movl $0x0, %ecx
movq %rax, 0x8(%rsp)
cmovgl %eax, %ecx
movq %rcx, 0x10(%rsp)
movq 0xa99c(%rip), %r14      # 0xefd8
cmpq 0x10(%rsp), %r12
je 0x46e1
movq 0x8(%rsp), %rbp
subq %r12, %rbp
xorl %r15d, %r15d
xorl %r13d, %r13d
cmpq %rbp, %r13
jge 0x46d9
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x3440
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
leaq (%rax,%r15), %rsi
addq $0x4, %rsi
movq %r14, %rdi
callq 0x3440
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
leaq (%rax,%r15), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x3440
movq 0x370(%rbx), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rax
leaq (%rax,%r15), %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x31e0
incq %r13
addq $0x28, %r15
jmp 0x4655
incq %r12
jmp 0x463c
movb $0x1, 0x358(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sagardoshi[P]NegotiationsEncounter/src/main.cpp
// Function: reEnableSpecialCharacters()
void reEnableSpecialCharacters() {
    system("stty eof '^d'"  ); // re-enable CTRL+D
    system("stty intr '^c'" ); // re-enable CTRL+C
    system("stty quit '^\\'" ); // re-enable CTRL+backslash
    system("stty susp '^z'" ); // re-enable CTRL+Z
    system("stty dsusp '^y'"); // re-enable CTRL+Y
}

// Assembly:
pushq %rax
leaq 0x8a10(%rip), %rdi      # 0xc004
callq 0x31e0
leaq 0x8a12(%rip), %rdi      # 0xc012
callq 0x31e0
leaq 0x8a15(%rip), %rdi      # 0xc021
callq 0x31e0
leaq 0x8a18(%rip), %rdi      # 0xc030
callq 0x31e0
leaq 0x8a1b(%rip), %rdi      # 0xc03f
popq %rax
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O2/sagardoshi[P]NegotiationsEncounter/src/main.cpp
// Function: registerSignals()
void registerSignals() {
    struct sigaction act;

    act.sa_handler = signalHandler;
    sigemptyset(&act.sa_mask);
    act.sa_flags = 0;

    sigaction(SIGINT,  &act, 0); // Ctrl-C
    sigaction(SIGQUIT, &act, 0); // Ctrl-backslash
    sigaction(SIGTSTP, &act, 0); // Ctrl-Z
    sigaction(SIGTERM, &act, 0); // Like SIGINT

}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq -0x10(%rip), %rax       # 0x362a
leaq 0x10(%rsp), %rbx
movq %rax, -0x8(%rbx)
movq %rbx, %rdi
callq 0x3280
andl $0x0, 0x80(%rbx)
pushq $0x2
popq %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3290
pushq $0x3
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3290
pushq $0x14
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3290
pushq $0xf
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3290
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sagardoshi[P]NegotiationsEncounter/src/main.cpp
// Function: disableSpecialCharacters()
void disableSpecialCharacters() {
    system("stty eof undef"  ); // disable CTRL+D
    system("stty intr undef" ); // disable CTRL+C
    system("stty quit undef" ); // disable CTRL+backslash
    system("stty susp undef" ); // disable CTRL+Z
    system("stty dsusp undef"); // disable CTRL+Y
}

// Assembly:
pushq %rax
leaq 0x89b3(%rip), %rdi      # 0xc04f
callq 0x31e0
leaq 0x89b6(%rip), %rdi      # 0xc05e
callq 0x31e0
leaq 0x89ba(%rip), %rdi      # 0xc06e
callq 0x31e0
leaq 0x89be(%rip), %rdi      # 0xc07e
callq 0x31e0
leaq 0x89c2(%rip), %rdi      # 0xc08e
popq %rax
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O2/sagardoshi[P]NegotiationsEncounter/src/main.cpp
// Function: quitGame(GameMaster*)
void quitGame(GameMaster* gm) {
    reEnableSpecialCharacters();

    if (!gm->getGameFinished()) {
        gm->clearScreen();
        string gaveUp  = "You can't handle this anymore. This house, these ";
               gaveUp += "spirits, they are driving you\n";
               gaveUp += "mad! You've gotten this far, and that feels like an ";
               gaveUp += "achievement in itself.\n\n";
               gaveUp += "Perhaps it's the only achievement left to you. Yes, ";
               gaveUp += "perhaps it is.\n\n";
               gaveUp += "You lay back, allow the failure to fill you up, and ";
               gaveUp += "resign yourself to the\ncoming punishment.\n\n";
               gaveUp += "You have quit the game. Please come back and visit ";
               gaveUp += "the spirits again whenever\n";
               gaveUp += "you can! They'll be waiting...\n\n";

        cout << gaveUp;
    }
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x35ec
movq %rbx, %rdi
callq 0x43ec
testb %al, %al
jne 0x37df
movq %rbx, %rdi
callq 0x442e
leaq 0x8995(%rip), %rsi      # 0xc09f
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x3860
leaq 0x89ae(%rip), %rsi      # 0xc0d1
movq %rbx, %rdi
callq 0x33b0
leaq 0x89be(%rip), %rsi      # 0xc0f0
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x89e2(%rip), %rsi      # 0xc125
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x89ea(%rip), %rsi      # 0xc13e
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x8a0e(%rip), %rsi      # 0xc173
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x8a0e(%rip), %rsi      # 0xc184
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x8a32(%rip), %rsi      # 0xc1b9
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x8a4d(%rip), %rsi      # 0xc1e5
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x8a70(%rip), %rsi      # 0xc219
leaq 0x10(%rsp), %rdi
callq 0x33b0
leaq 0x8a7b(%rip), %rsi      # 0xc235
leaq 0x10(%rsp), %rdi
callq 0x33b0
movq 0xf7fd(%rip), %rdi      # 0x12fc8
leaq 0x10(%rsp), %rsi
callq 0x3200
leaq 0x10(%rsp), %rdi
callq 0x3130
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3380
// File: /workspace/github_cpp_makefile_star2_O2/sagardoshi[P]NegotiationsEncounter/src/main.cpp
// Function: main
int main() {
    GameMaster* gm = new GameMaster();

    setUpGame();
    gm->playGame();
    quitGame(gm);

    delete gm;
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x128, %edi            # imm = 0x128
callq 0x3220
movq %rax, %rbx
movq %rax, %rdi
callq 0x3934
callq 0x36d2
movq %rbx, %rdi
callq 0x58a6
movq %rbx, %rdi
callq 0x36de
movq %rbx, %rdi
callq 0x3f66
movl $0x128, %esi            # imm = 0x128
movq %rbx, %rdi
callq 0x3230
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movl $0x128, %esi            # imm = 0x128
movq %rbx, %rdi
callq 0x3230
movq %r14, %rdi
callq 0x3380
nop
// File: /workspace/github_cpp_makefile_star2_O2/sagardoshi[P]NegotiationsEncounter/src/GameMaster.cpp
// Function: GameMaster::savePlayerLevel()
void GameMaster::savePlayerLevel() {
    if (currLevel < 0) return; // Let level stay if quit typed on start screen
    string level = to_string(currLevel);

    ofstream out;
    out.open(LEVEL_FILEPATH);
    out << level << endl; // Overwrite with the single integer-as-string
    out.close();
}

// Assembly:
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movl 0x68(%rdi), %esi
testl %esi, %esi
js 0x4061
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x5b3f
leaq 0x20(%rsp), %rdi
callq 0x3370
addq $0x8, %rbx
leaq 0x20(%rsp), %rdi
pushq $0x10
popq %rdx
movq %rbx, %rsi
callq 0x3140
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x3200
movq %rax, %rdi
callq 0x3150
leaq 0x20(%rsp), %rdi
callq 0x32c0
leaq 0x20(%rsp), %rdi
callq 0x3300
movq %rsp, %rdi
callq 0x3130
addq $0x220, %rsp            # imm = 0x220
popq %rbx
retq
movq %rax, %rbx
jmp 0x407c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3300
movq %rsp, %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3380