LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::operator=(text_ed&)
text_ed& text_ed::operator=(text_ed& rhs) { //overloading assignment
 if ( this != &rhs ) {
   delete [] document;
   last_line = rhs.last_line;
   capacity = rhs.capacity;
   document = new string[capacity];
   for (int i=0; i<last_line; i++) {
     document[i] = rhs.document[i];
   }
 }
 return (*this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x6584
movq %rsi, %r14
movq (%rbx), %r13
testq %r13, %r13
je 0x64fe
leaq -0x8(%r13), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%r13), %r15
testq %r15, %r15
je 0x64ea
addq $-0x10, %r13
movq %r15, %r12
shlq $0x5, %r12
leaq (%r12,%r13), %rax
movq -0x10(%r13,%r12), %rdi
cmpq %rdi, %rax
je 0x64e4
movq (%rax), %rsi
incq %rsi
callq 0x2140
addq $-0x20, %r12
jne 0x64cb
shlq $0x5, %r15
orq $0x8, %r15
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x22a0
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
movslq 0x18(%r14), %r12
movq %r12, %r15
shlq $0x5, %r15
leaq 0x8(%r15), %rax
testq %r12, %r12
movl %r12d, 0x18(%rbx)
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
leaq 0x8(%rax), %rcx
movq %r12, (%rax)
testq %r12, %r12
je 0x6554
addq $0x18, %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r15
jne 0x653b
movq %rcx, (%rbx)
cmpl $0x0, 0x10(%rbx)
jle 0x6584
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rsi
addq %r15, %rsi
movq (%rbx), %rdi
addq %r15, %rdi
callq 0x20b0
incq %r12
movslq 0x10(%rbx), %rax
addq $0x20, %r15
cmpq %rax, %r12
jl 0x6563
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::load_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool text_ed::load_file(string filename) { // Read the file and remember the name in current_file.
 string nextline;
 current_file = filename;
 last_line=0;
 ifstream form (filename.c_str());
 while (getline(form,nextline)) { //while lines can be retrieved, insert them into document array
   insert_line(nextline,last_line);
 }
 form.close();
 return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
addq $0x20, %rdi
callq 0x20b0
movl $0x0, 0x10(%rbx)
movq (%r14), %rsi
leaq -0x270(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x2280
leaq -0x58(%rbp), %r15
leaq -0x68(%rbp), %r12
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %edx
movq %r14, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x67b3
movq %r15, -0x68(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5f86
movl 0x10(%rbx), %r13d
movq %rbx, %rdi
movl %r13d, %esi
movl $0x1, %edx
callq 0x621e
movslq %r13d, %rax
movq (%rbx), %rcx
shlq $0x5, %rax
leaq (%rcx,%rax), %rdi
addq $0x20, %rdi
movq %r12, %rsi
callq 0x20b0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x671b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2140
jmp 0x671b
leaq -0x270(%rbp), %rdi
callq 0x2060
leaq -0x270(%rbp), %rdi
callq 0x2070
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x67e4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2140
movb $0x1, %al
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x681e
movq %rax, %rbx
jmp 0x682d
movq %rax, %rbx
jmp 0x6831
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x6821
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2140
jmp 0x6821
movq %rax, %rbx
leaq -0x270(%rbp), %rdi
callq 0x2070
leaq -0x38(%rbp), %r15
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6846
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::insert_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
bool text_ed::insert_line(string newline,int n) { // Insert newline as a new line following line n.
 open_up(n,1);
 document[n+1] = newline;
 if (n > last_line-1) {
   n=last_line+1;
     }
 return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %esi
movl $0x1, %edx
callq 0x621e
movq (%r15), %rax
movslq %ebx, %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x20b0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::save_file()
bool text_ed::save_file() { //function to check if saving to a given filename is possible and save it
 if (save_file(current_file)) { 
 return true;
 } else {
   return false;
 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rdi), %rsi
movq 0x28(%rdi), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x5f86
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6910
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x68e3
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2140
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x6908
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::save_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool text_ed::save_file (string filename) { // Save the text under the new name; remember the new name in current_file.
 ofstream savefile;
 int i;
 savefile.open(filename.c_str());
 for (i=1; i<=last_line; i++) { //save each line from document arry to file
   savefile << document[i]; 
   savefile << endl;
 }
 savefile.close();
 return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x220(%rbp), %r14
movq %r14, %rdi
callq 0x2230
movq (%r15), %rsi
movq %r14, %rdi
movl $0x10, %edx
callq 0x2050
cmpl $0x0, 0x10(%rbx)
jle 0x69a5
movl $0x28, %r15d
xorl %r12d, %r12d
movq (%rbx), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %r14, %rdi
callq 0x2180
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movslq 0x10(%rbx), %rax
incq %r12
addq $0x20, %r15
cmpq %rax, %r12
jl 0x6956
leaq -0x220(%rbp), %rdi
callq 0x21b0
movq 0x3600(%rip), %rax      # 0x9fb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x218(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x220(%rbp,%rcx)
callq 0x2100
leaq -0x128(%rbp), %rdi
callq 0x2080
movb $0x1, %al
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x69fb
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
callq 0x21d0
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::delete_lines(int, int)
bool text_ed::delete_lines(int start, int end) { // Delete lines from start position to end position.
  int i;
  int num_lines = end-start;
  for (i=start; i<=last_line; i++) { //delete lines from start to end positions
    document[i] = document[i+num_lines+1];
  }
  last_line = last_line-num_lines-1;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %edx, %r14d
subl %esi, %r14d
movl 0x10(%rdi), %eax
cmpl %esi, %eax
jl 0x6a69
movslq %esi, %r15
movslq %edx, %r12
shlq $0x5, %r12
addq $0x20, %r12
leaq -0x1(%r15), %r13
shlq $0x5, %r15
movq (%rbx), %rdi
leaq (%rdi,%r12), %rsi
addq %r15, %rdi
callq 0x20b0
movslq 0x10(%rbx), %rax
addq $0x20, %r12
incq %r13
addq $0x20, %r15
cmpq %rax, %r13
jl 0x6a46
notl %r14d
addl %eax, %r14d
movl %r14d, 0x10(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::get_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
bool text_ed::get_line(string& dest, int n) { // Copy line n into dest.
  if (n>last_line) {
    return false;
  }
 dest = document[n];
 return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl 0x10(%rdi), %r14d
cmpl %edx, %r14d
jl 0x6aab
movslq %ebx, %rax
shlq $0x5, %rax
addq (%rdi), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x20b0
cmpl %ebx, %r14d
setge %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::copy_lines(int, int, int)
bool text_ed::copy_lines(int start, int end, int location) { //copy lines start through end to follow line location.
  int buff_capacity=end-start+1;
  copy_to_buffer(start,end);
  open_up(location, buff_capacity);
  copy_to_document(start,end,location);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movl %edx, %r13d
subl %esi, %r13d
incl %r13d
callq 0x60bc
movq %r12, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x621e
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x6168
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::move_lines(int, int, int)
bool text_ed::move_lines(int start, int end, int location) { //move lines between two given lines (start to end) to after the given line location
  if (location<start || location>end) { //make sure new line location isnt between the start and end selections
    copy_lines(start,end,location);
    delete_lines(start,end); //delete the original lines so there aren't duplicates
    return true;
  } else {
    cout << "Error. Make sure location given is not between the two lines selected." << endl;
    return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl %esi, %ecx
setl %al
cmpl %edx, %ecx
setg %bl
orb %al, %bl
cmpb $0x1, %bl
jne 0x6b46
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
callq 0x6ab6
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x6a12
jmp 0x6b88
movq 0x347b(%rip), %r14      # 0x9fc8
leaq 0x93e(%rip), %rsi       # 0x7492
movl $0x46, %edx
movq %r14, %rdi
callq 0x2180
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20d0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::replace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
bool text_ed::replace(string oldstr, string newstr, int start, int end) { //replace old word with new word between given lines (start to end)
  int i, j;
  for (i=start; i<=end; i++) { //for each line in the given area
    for(j=0;j<document[i].length(); j++){ //for character in string
      if(document[i].substr(j,oldstr.length())==oldstr){ //if substring found starting at the character position
	document[i].replace(j,oldstr.length(),newstr); //replace old string with new string
      }
    }
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x40(%rbp)
movl %r8d, -0x2c(%rbp)
cmpl %r8d, %ecx
jg 0x6c7d
movq %rsi, %r15
movq %rdi, %r12
movslq %ecx, %r13
incl -0x2c(%rbp)
movq (%r12), %rsi
movq %r13, -0x38(%rbp)
shlq $0x5, %r13
cmpq $0x0, 0x8(%rsi,%r13)
je 0x6c6c
addq %r13, %rsi
xorl %ebx, %ebx
movq 0x8(%r15), %rcx
leaq -0x60(%rbp), %rdi
movq %rbx, %rdx
callq 0x2160
movq -0x58(%rbp), %rdx
cmpq 0x8(%r15), %rdx
jne 0x6c12
testq %rdx, %rdx
je 0x6c17
movq (%r15), %rsi
movq -0x60(%rbp), %rdi
callq 0x2150
testl %eax, %eax
sete %r14b
jmp 0x6c1a
xorl %r14d, %r14d
jmp 0x6c1a
movb $0x1, %r14b
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x6c33
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2140
testb %r14b, %r14b
je 0x6c56
movq (%r12), %rdi
addq %r13, %rdi
movq 0x8(%r15), %rdx
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r8
movq %rbx, %rsi
callq 0x2170
incq %rbx
movq (%r12), %rax
leaq (%rax,%r13), %rsi
cmpq %rbx, 0x8(%rax,%r13)
ja 0x6bdf
movq -0x38(%rbp), %r13
incq %r13
cmpl %r13d, -0x2c(%rbp)
jne 0x6bc2
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tdv[P]boss/boss/src/class_factory/class_factory.cpp
// Function: Boss::ClassFactory::FinalizeConstruct()
void ClassFactory::FinalizeConstruct()
  {
    Locator = Boss::Private::GetServiceLocator();
    if (Locator.Get() && Locator->AddService(Service::Locator::Id::ClassFactoryService, GetThisIBase()))
      throw ClassFactoryException("Failed to put ClassFactory into ServiceLocator");
    
    //CleanerThread.reset(new std::thread(&ClassFactory::Clean, this));
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x79340
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x7cf43
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0xd0(%rbx)
movq (%rsp), %r14
movq %r14, 0xd0(%rbx)
testq %r14, %r14
je 0x7cf7c
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq (%r14), %rcx
movq %r14, %rdi
movl $0x16d1a76d, %esi       # imm = 0x16D1A76D
movq %rax, %rdx
callq *0x30(%rcx)
testl %eax, %eax
jne 0x7cf84
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x78540
movq %rax, %r14
leaq 0xa5078(%rip), %rsi     # 0x122010
movq %rax, %rdi
callq 0x779b0
movq 0xe0db9(%rip), %rsi     # 0x15dd60
movq 0xe02da(%rip), %rdx     # 0x15d288
movq %r14, %rdi
callq 0x78af0
movq %rax, %rbx
movq %r14, %rdi
callq 0x77360
jmp 0x7cfd5
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7cfd5
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x11eb60
movq %rax, %rdi
callq 0x7e04b
nop
// File: /workspace/github_cpp_makefile_star2_O1/tdv[P]boss/boss/src/class_factory/class_factory.cpp
// Function: Boss::ClassFactory::BeforeRelease()
void ClassFactory::BeforeRelease()
  {
    std::lock_guard<std::recursive_mutex> Lock(Mtx);
    IsRunCleaner = false;
    //CleanerThread->join();
    CleanerThread.reset();
    Registry.Release();
    for (auto &i : Modules)
    {
      try
      {
        assert(!i.second->GetModule().GetRefCount() && "Module has not null reference counter.");
      }
      catch (...)
      {
        assert(false && "Failed to get module reference counter.");
      }
    }
    if (Locator.Get())
      Locator->DelService(Service::Locator::Id::ClassFactoryService);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x79d60
testl %eax, %eax
jne 0x7d098
movb $0x0, 0xb8(%r14)
leaq 0xc0(%r14), %rdi
xorl %esi, %esi
callq 0x7a0a0
movq 0xc8(%r14), %rdi
testq %rdi, %rdi
je 0x7d02a
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0xc8(%r14)
leaq 0x90(%r14), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x7d074
movq 0x10(%r15), %rdi
addq $0x8, %rdi
callq 0x785c0
testl %eax, %eax
je 0x7d03c
leaq 0xa4fe3(%rip), %rdi     # 0x12203f
leaq 0xa502d(%rip), %rsi     # 0x122090
leaq 0xa504f(%rip), %rcx     # 0x1220b9
movl $0x5d, %edx
callq 0x77980
movq 0xd0(%r14), %rdi
testq %rdi, %rdi
je 0x7d08b
movq (%rdi), %rax
movl $0x16d1a76d, %esi       # imm = 0x16D1A76D
callq *0x38(%rax)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7a140
movl %eax, %edi
callq 0x7a120
movq %rax, %r14
movq %rbx, %rdi
callq 0x7a140
movq %r14, %rdi
callq 0x11eb60
movq %rax, %rdi
callq 0x77460
leaq 0xa5021(%rip), %rdi     # 0x1220e2
leaq 0xa4fc8(%rip), %rsi     # 0x122090
leaq 0xa4fea(%rip), %rcx     # 0x1220b9
movl $0x61, %edx
callq 0x77980
nop
// File: /workspace/github_cpp_makefile_star2_O1/tdv[P]boss/boss/src/class_factory/class_factory.cpp
// Function: Boss::ClassFactory::SetRegistry(Boss::IServiceRegistry*)
RetCode BOSS_CALL ClassFactory::SetRegistry(IServiceRegistry *registry)
  {
    try
    {
      std::lock_guard<std::recursive_mutex> Lock(Mtx);
      Registry = registry;
    }
    catch (...)
    {
      return Status::Fail;
    }
    return Status::Ok;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x79d60
testl %eax, %eax
jne 0x7d6e7
addq $0xc8, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7a0f0
movq %rbx, %rdi
callq 0x7a140
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x7a120
movq %rax, %r14
movq %rbx, %rdi
callq 0x7a140
jmp 0x7d6fe
movq %rax, %r14
movq %r14, %rdi
callq 0x77460
callq 0x79080
movl $0x2, %eax
jmp 0x7d6e1
// File: /workspace/github_cpp_makefile_star2_O1/tdv[P]boss/boss/include/plugin/module_holder.h
// Function: Boss::ModuleHolder::GetRefCount() const
UInt const GetRefCount() const
    {
      typedef RetCode (*PFNBossGetRefCount)(UInt *);
      auto *BossGetRefCount = Dll.GetProc<PFNBossGetRefCount>("BossGetRefCount");
      UInt RefCount = 0;
      if (BossGetRefCount(&RefCount) != Status::Ok)
        throw ModuleHolderException("Failed to call BossGetRefCount.");
      return RefCount;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa4759(%rip), %rsi     # 0x122115
leaq 0xa4761(%rip), %rdx     # 0x122124
leaq 0x8(%rsp), %rdi
callq 0x796b0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x790d0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x7d9ec
callq 0x77e30
leaq 0x8(%rsp), %rdi
movl $0x0, (%rdi)
callq *%rbx
testl %eax, %eax
jne 0x7da09
movl 0x8(%rsp), %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x78540
movq %rax, %r14
leaq 0xa4708(%rip), %rsi     # 0x122125
movq %rax, %rdi
callq 0x77080
movq 0xdff94(%rip), %rsi     # 0x15d9c0
movq 0xdf855(%rip), %rdx     # 0x15d288
movq %r14, %rdi
callq 0x78af0
movq %rax, %rbx
movq %r14, %rdi
callq 0x77360
jmp 0x7da5f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x7da5f
callq 0x77e30
jmp 0x7da5f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11eb60
nop
// File: /workspace/github_cpp_makefile_star2_O1/tdv[P]boss/boss/src/class_factory/class_factory.cpp
// Function: Boss::ClassFactory::ModuleHolderEx::ModuleHolderEx(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ModuleHolderEx(std::string const &path)
      : Module(std::move(DllHolder(path)))
    {
      auto Locator = Private::GetServiceLocator();
      if (Locator.Get())
      {
        Module.SetServiceLocator(Locator.Get());
        LocatorExists = false;
      }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movb $0x0, (%rdi)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x79f40
movq (%rbx), %rax
movq %rax, 0x8(%r14)
movq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x7a320
leaq 0x8(%r14), %rbx
movq %rsp, %rdi
callq 0x79340
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x7ead4
movq %rbx, %rdi
callq 0x79dd0
movb $0x0, (%r14)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7eae3
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x7eb20
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7eaff
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, (%rsp)
jmp 0x7eb0e
jmp 0x7eb20
movq %rax, %r14
movq %rbx, %rdi
callq 0x7a320
movq %r14, %rdi
callq 0x11eb60
jmp 0x7eb20
movq %rax, %rdi
callq 0x7e04b
// File: /workspace/github_cpp_makefile_star2_O1/tetsuok[P]kernel-pa/kernel_pa.cc
// Function: kernel::(anonymous namespace)::Usage(char const*)
[[noreturn]] void Usage(const char* name) {
  cerr << "usage: " << name << " [-C FLOAT] [-d INT] [-t INT] [-o FILE] FILE\n"
      "-C hyperparameter passive-aggressive. C should be positive. (default: " << kC << ")\n"
      "-d the degree of polynomial kernel (supported: d = 1, 2, 3, and 4) (deafult: " << kKernelDegree << ")\n"
      "-t the number of iterations (default: " << kNumIter << ")\n"
      "-o model filename (default " << kModel << ")\n";
  exit(1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x5707(%rip), %rdi      # 0x7ff0
leaq 0x2778(%rip), %rsi      # 0x5068
callq 0x2180
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2180
leaq 0x2769(%rip), %rsi      # 0x5070
movq %rax, %rdi
callq 0x2180
movsd 0x26f1(%rip), %xmm0     # 0x5008
movq %rax, %rdi
callq 0x22f0
leaq 0x27be(%rip), %rsi      # 0x50e4
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
movl $0x2, %esi
callq 0x22a0
leaq 0x27f2(%rip), %rsi      # 0x5134
movq %rax, %rdi
callq 0x2180
movq %rax, %rdi
movl $0x3, %esi
callq 0x22a0
leaq 0x27ff(%rip), %rsi      # 0x515d
movq %rax, %rdi
callq 0x2180
leaq 0x26a3(%rip), %rsi      # 0x5010
movq %rax, %rdi
callq 0x2180
leaq 0x27ff(%rip), %rsi      # 0x517b
movq %rax, %rdi
callq 0x2180
movl $0x1, %edi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/dinit.cc
// Function: sigquit_cb(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&)
static void sigquit_cb(eventloop_t &eloop) noexcept
{
    // This performs an immediate shutdown, without service rollback.
    close_control_socket();
    execl(shutdown_exec.c_str(), shutdown_exec.c_str(), "--system", (char *) 0);
    log(loglevel_t::ERROR, error_exec_sd, strerror(errno));
    sync(); // since a hard poweroff might be required at this point...
}

// Assembly:
pushq %rbx
callq 0xb274
leaq 0x29338(%rip), %rdi     # 0x33f56
leaq 0x285cc(%rip), %rdx     # 0x331f1
movq %rdi, %rsi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x8750
callq 0x8050
movl (%rax), %edi
callq 0x81d0
movq %rax, %rbx
leaq 0x2931e(%rip), %rsi     # 0x33f65
movl $0x3, %edi
callq 0x2e63a
movq %rbx, %rdi
callq 0x2e759
popq %rbx
jmp 0x85b0
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/dinit.cc
// Function: control_socket_ready()
static void control_socket_ready() noexcept
{
    if (!control_socket_open || socket_ready_fd < 0) {
        return;
    }
    write(socket_ready_fd, control_socket_path, strlen(control_socket_path) + 1);
    // Once done with, close it (but leave stdout/stderr alone)
    if (socket_ready_fd > 2) {
        close(socket_ready_fd);
    }
    // Ensure that we don't try to issue readiness again:
    socket_ready_fd = -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x3b3c2(%rip), %ebx     # 0x465e0
testl %ebx, %ebx
setns %al
andb 0x3bafa(%rip), %al      # 0x46d23
cmpb $0x1, %al
jne 0xb264
movq 0x3b3b4(%rip), %r14     # 0x465e8
movq %r14, %rdi
callq 0x8230
leaq 0x1(%rax), %rdx
movl %ebx, %edi
movq %r14, %rsi
callq 0x81e0
movl 0x3b390(%rip), %edi     # 0x465e0
cmpl $0x3, %edi
jl 0xb25a
callq 0x8b60
movl $0xffffffff, 0x3b37c(%rip) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0xb8be
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/dinit.cc
// Function: close_control_socket()
static void close_control_socket() noexcept
{
    if (control_socket_open) {
        int fd = control_socket_io.get_watched_fd();
        control_socket_io.deregister(event_loop);
        close(fd);
        
        // Unlink the socket:
        unlink(control_socket_path);

        control_socket_open = false;
    }
}

// Assembly:
pushq %rbx
cmpb $0x1, 0x3baa7(%rip)     # 0x46d23
jne 0xb2b3
movl 0x3ba00(%rip), %ebx     # 0x46c84
leaq 0x3b9dd(%rip), %rsi     # 0x46c68
leaq 0x3b79e(%rip), %rdi     # 0x46a30
movl %ebx, %edx
callq 0xda6a
movl %ebx, %edi
callq 0x8b60
movq 0x3b341(%rip), %rdi     # 0x465e8
callq 0x8250
movb $0x0, 0x3ba70(%rip)     # 0x46d23
popq %rbx
retq
movq %rax, %rdi
callq 0xb8be
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/dinit.cc
// Function: rootfs_is_rw()
void rootfs_is_rw() noexcept
{
    open_control_socket(true);
    control_socket_ready();
    if (!log_is_syslog && !external_log_open) {
        // Try (again) to open log file if we couldn't do so earlier.
        setup_external_log();
    }
    if (!did_log_boot) {
        did_log_boot = log_boot();
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl $0x1, %edi
callq 0xac5f
callq 0xb214
cmpb $0x1, 0x3ba35(%rip)     # 0x46d12
jne 0xb2ed
cmpb $0x0, 0x3b8b2(%rip)     # 0x46b98
jne 0xb2ed
callq 0xafd9
cmpb $0x0, 0x3ba2d(%rip)     # 0x46d21
jne 0xb36f
leaq 0x18(%rsp), %rbx
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8350
movw $0x2, (%rbx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x8a10
movl (%r14), %eax
movl 0x8(%r14), %ecx
movl %eax, 0x154(%rbx)
movl %ecx, 0x158(%rbx)
leaq 0x289bc(%rip), %rdi     # 0x33cf4
movq %rbx, %rsi
callq 0x89d0
leaq 0x289bb(%rip), %rdi     # 0x33d02
xorl %esi, %esi
callq 0x87f0
callq 0x8270
leaq 0x18(%rsp), %rdi
callq 0x80c0
movq %rax, %rbx
callq 0x8100
testq %rbx, %rbx
setne 0x3b9b2(%rip)           # 0x46d21
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0xb8be
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::signal_watcher_impl<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>, (anonymous namespace)::callback_signal_handler>::dispatch(void*)
void dispatch(void *loop_ptr) noexcept override
    {
        EventLoop &loop = *static_cast<EventLoop *>(loop_ptr);
        loop_access::get_base_lock(loop).unlock();

        auto rearm_type = static_cast<Derived *>(this)->received(loop, this->siginfo.get_signo(), this->siginfo);

        loop_access::get_base_lock(loop).lock();

        if (rearm_type != rearm::REMOVED) {

            this->active = false;
            if (this->deleteme) {
                // We don't want a watch that is marked "deleteme" to re-arm itself.
                rearm_type = rearm::REMOVE;
            }

            loop_access::process_signal_rearm(loop, this, rearm_type);

            post_dispatch(loop, this, rearm_type);
        }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq *0xa0(%rbx)
movb 0xc(%rbx), %al
movl %eax, %ecx
andb $-0x2, %cl
movb %cl, 0xc(%rbx)
andb $0x2, %al
shrb %al
movzbl %al, %eax
leal (%rax,%rax,2), %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xd498
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0xbfac
movq %rax, %rdi
callq 0xb8be
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/includes/service.h
// Function: log_service_load_failure(service_description_exc&)
inline void log_service_load_failure(service_description_exc &exc)
{
    if (exc.input_pos.get_line_num() != (unsigned)-1) {
        if (exc.setting_name == nullptr) {
            log(loglevel_t::ERROR, "Error in service description for '", exc.service_name,
                    "' (file ", exc.input_pos.get_file_name(), ", line ", exc.input_pos.get_line_num(), "): ",
                    exc.exc_description);
        }
        else {
            log(loglevel_t::ERROR, "Error in service description for '", exc.service_name, "': setting '", exc.setting_name, "' "
                    "(file ", exc.input_pos.get_file_name(), ", line ", exc.input_pos.get_line_num(), "): ",
                    exc.exc_description);
        }
    }
    else {
        // If no line number, setting name must be present
        log(loglevel_t::ERROR, "Error in service description for '", exc.service_name, "' setting '", exc.setting_name, "': ",
                exc.exc_description);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x40(%rdi), %ebp
cmpl $-0x1, %ebp
je 0xb872
movq 0x68(%rbx), %r14
leaq 0x283f9(%rip), %rsi     # 0x33bf0
movl $0x3, %edi
callq 0x2e63a
movq (%rbx), %rdi
callq 0x2e73d
testq %r14, %r14
je 0xb823
leaq 0x2840f(%rip), %rdi     # 0x33c24
callq 0x2e73d
movq 0x68(%rbx), %rdi
callq 0x2e73d
leaq 0x283e9(%rip), %rdi     # 0x33c13
callq 0x2e73d
movq 0x48(%rbx), %rdi
callq 0x2e73d
leaq 0x283dd(%rip), %rdi     # 0x33c1c
callq 0x2e73d
leaq 0x2af91(%rip), %rdx     # 0x367dc
leaq 0x4(%rsp), %r14
movl $0xc, %esi
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x89e0
movq %r14, %rdi
callq 0x2e73d
leaq 0x2a423(%rip), %rdi     # 0x35c93
jmp 0xb8a7
leaq 0x28377(%rip), %rsi     # 0x33bf0
movl $0x3, %edi
callq 0x2e63a
movq (%rbx), %rdi
callq 0x2e73d
leaq 0x2839f(%rip), %rdi     # 0x33c31
callq 0x2e73d
movq 0x68(%rbx), %rdi
callq 0x2e73d
leaq 0x28396(%rip), %rdi     # 0x33c3d
callq 0x2e73d
movq 0x20(%rbx), %rdi
callq 0x2e759
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::bidi_fd_watcher_impl<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>, control_conn_watcher>::dispatch(void*)
void dispatch(void *loop_ptr) noexcept override
    {
        EventLoop &loop = *static_cast<EventLoop *>(loop_ptr);
        this->emulate_enabled = false;
        loop_access::get_base_lock(loop).unlock();

        auto rearm_type = static_cast<Derived *>(this)->read_ready(loop, this->watch_fd);

        loop_access::get_base_lock(loop).lock();

        if (rearm_type != rearm::REMOVED) {
            this->event_flags &= ~IN_EVENTS;
            this->active = false;
            if (this->deleteme) {
                // We don't want a watch that is marked "deleteme" to re-arm itself.
                rearm_type = rearm::REMOVE;
            }

            rearm_type = loop_access::process_primary_rearm(loop, this, rearm_type);

            auto &outwatcher = bidi_fd_watcher<EventLoop>::out_watcher;
            post_dispatch(loop, this, &outwatcher, rearm_type);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
andb $-0x9, 0xc(%rdi)
movl 0x1c(%rdi), %edx
callq 0xc26c
cmpl $0x4, %eax
je 0xc1af
andb $-0x2, 0x24(%rbx)
movb 0xc(%rbx), %cl
movl %ecx, %edx
andb $-0x2, %dl
movb %dl, 0xc(%rbx)
testb $0x2, %cl
movl $0x3, %edx
cmovel %eax, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc832
leaq 0x28(%rbx), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0xc2df
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0xb8be
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::bidi_fd_watcher_impl<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>, control_conn_watcher>::dispatch_second(void*)
void dispatch_second(void *loop_ptr) noexcept override
    {
        auto &outwatcher = bidi_fd_watcher<EventLoop>::out_watcher;

        EventLoop &loop = *static_cast<EventLoop *>(loop_ptr);
        loop_access::get_base_lock(loop).unlock();

        auto rearm_type = static_cast<Derived *>(this)->write_ready(loop, this->watch_fd);

        loop_access::get_base_lock(loop).lock();

        if (rearm_type != rearm::REMOVED) {
            this->event_flags &= ~OUT_EVENTS;
            outwatcher.active = false;
            if (outwatcher.deleteme) {
                // We don't want a watch that is marked "deleteme" to re-arm itself.
                rearm_type = rearm::REMOVE;
            }

            rearm_type = loop_access::process_secondary_rearm(loop, this, &outwatcher, rearm_type);

            if (rearm_type == rearm::REQUEUE) {
                post_dispatch(loop, &outwatcher, rearm_type);
            }
            else {
                post_dispatch(loop, this, &outwatcher, rearm_type);
            }
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x1c(%rdi), %edx
callq 0xc954
cmpl $0x4, %eax
je 0xc246
leaq 0x28(%rbx), %r15
andb $-0x3, 0x24(%rbx)
movb 0x34(%rbx), %cl
movl %ecx, %edx
andb $-0x2, %dl
movb %dl, 0x34(%rbx)
testb $0x2, %cl
movl $0x3, %ecx
cmovel %eax, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xc9c8
cmpl $0x5, %eax
jne 0xc236
movl 0x40(%rbx), %eax
addq $0x38, %rbx
movq 0x20(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%r14)
movq %rsp, %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc4be
jmp 0xc246
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq 0xc2df
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0xb8be
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: void dasynq::v2::dprivate::post_dispatch<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, dasynq::v2::dprivate::bidi_fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>*, dasynq::v2::dprivate::base_watcher*, dasynq::rearm)
void post_dispatch(Loop &loop, bidi_fd_watcher<Loop> *bdfd_watcher,
            base_watcher *out_watcher, rearm rearm_type)
    {
        base_watcher *watcher = (base_watcher *)bdfd_watcher;
        if (rearm_type == rearm::REMOVE) {
            loop_access::get_base_lock(loop).unlock();
            loop_access::release_watcher(loop, watcher);
            loop_access::release_watcher(loop, out_watcher);
            watcher->watch_removed();
            loop_access::get_base_lock(loop).lock();
        }
        else if (rearm_type == rearm::REQUEUE) {
            loop_access::requeue_watcher(loop, watcher);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x5, %ecx
je 0xc328
cmpl $0x3, %ecx
jne 0xc34f
movq %rdx, %r15
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0xc92c
addq $0x10, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xc92c
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *0x20(%rax)
movl 0x18(%rbx), %eax
addq $0x10, %rbx
movq 0x20(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%r14)
movq %rsp, %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc4be
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::bidi_fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::set_watches(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, int)
void set_watches(event_loop_t &eloop, int new_flags) noexcept
    {
        std::lock_guard<mutex_t> guard(eloop.get_base_lock());
        bool use_emulation = this->emulatefd || this->out_watcher.emulatefd;
        if (use_emulation || EventLoop::loop_traits_t::has_separate_rw_fd_watches) {
            set_watch_enabled(eloop, true, (new_flags & IN_EVENTS) != 0);
            set_watch_enabled(eloop, false, (new_flags & OUT_EVENTS) != 0);
        }
        else {
            this->watch_flags = (this->watch_flags & ~IO_EVENTS) | new_flags;
            eloop.set_fd_enabled_nolock((dprivate::base_watcher *) this, this->watch_fd, this->watch_flags & IO_EVENTS, true);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movb 0x34(%rdi), %al
orb 0xc(%rdi), %al
testb $0x4, %al
je 0xc39f
movl %ebx, %ecx
andl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xc3c8
andl $0x2, %ebx
shrl %ebx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %ebx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0xc3c8
movl 0x1c(%r14), %esi
movl 0x20(%r14), %eax
andl $-0x4, %eax
orl %ebx, %eax
movl %eax, 0x20(%r14)
andl $0x3, %ebx
orl $0x8, %ebx
movq %r15, %rdi
movq %r14, %rdx
movl %ebx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0xc7ec
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::dprivate::bidi_fd_watcher<dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>>::set_watch_enabled(dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>&, bool, bool)
void set_watch_enabled(EventLoop &eloop, bool in, bool b)
    {
        int events = in ? IN_EVENTS : OUT_EVENTS;
        auto orig_flags = this->watch_flags;
        
        if (b) {
            this->watch_flags |= events;
        }
        else {
            this->watch_flags &= ~events;
        }

        dprivate::base_watcher * watcher = in ? this : &this->out_watcher;

        if (! watcher->emulatefd) {
            if (EventLoop::loop_traits_t::has_separate_rw_fd_watches) {
                eloop.set_fd_enabled_nolock(this, this->watch_fd, events | ONE_SHOT, b);
            }
            else {
                eloop.set_fd_enabled_nolock(this, this->watch_fd,
                        (this->watch_flags & IO_EVENTS) | ONE_SHOT,
                        (this->watch_flags & IO_EVENTS) != 0);
            }
        }
        else {
            // emulation: if enabling a previously disabled watcher, must queue now:
            if (b && (orig_flags != this->watch_flags)) {
                this->watch_flags = orig_flags;
                loop_access::requeue_watcher(eloop, watcher);
            }
        }

        if (! b) {
            eloop.dequeue_watcher(watcher);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdi, %rax
movl $0x2, %edi
subl %edx, %edi
movl 0x20(%rax), %ecx
movl %edi, %r8d
notl %r8d
andl %ecx, %r8d
orl %ecx, %edi
testl %ebx, %ebx
cmovel %r8d, %edi
movq %rsi, %r14
movl %edi, 0x20(%rax)
leaq 0x28(%rax), %r15
testl %edx, %edx
cmovneq %rax, %r15
testb $0x4, 0xc(%r15)
jne 0xc427
movl 0x1c(%rax), %edx
andl $0x3, %edi
leal 0x8(%rdi), %ecx
xorl %r8d, %r8d
testl %edi, %edi
setne %r8b
movq %r14, %rdi
movq %rax, %rsi
callq 0xc47c
jmp 0xc45b
cmpl %edi, %ecx
setne %dl
andb %bl, %dl
cmpb $0x1, %dl
jne 0xc45b
movl %ecx, 0x20(%rax)
leaq 0x10(%r15), %rsi
movl 0x18(%r15), %eax
movq 0x20(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%r14)
movq %rsp, %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
movq %r14, %rdi
callq 0xc4be
testb %bl, %bl
jne 0xc471
movq 0x10(%r15), %rsi
cmpq $-0x1, %rsi
je 0xc471
movq %r14, %rdi
callq 0xc67c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::process_timer_rearm(dasynq::v2::dprivate::base_timer_watcher*, dasynq::rearm)
void process_timer_rearm(base_timer_watcher *btw, rearm rearm_type) noexcept
    {
        // Called with lock held
        if (rearm_type == rearm::REARM) {
            loop_mech.enable_timer_nolock(btw->timer_handle, true, btw->clock);
        }
        else if (rearm_type == rearm::REMOVE) {
            loop_mech.remove_timer_nolock(btw->timer_handle, btw->clock);
        }
        else if (rearm_type == rearm::DISARM) {
            loop_mech.enable_timer_nolock(btw->timer_handle, false, btw->clock);
        }
    }

// Assembly:
cmpl $0x3, %edx
je 0xd050
cmpl $0x1, %edx
je 0xd04b
testl %edx, %edx
jne 0xd04f
movl 0x4c(%rsi), %ecx
addq $0x20, %rsi
movl $0x1, %edx
jmp 0xd05c
movb $0x0, 0x34(%rsi)
retq
movl 0x4c(%rsi), %edx
addq $0x20, %rsi
jmp 0xd0ae
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq/timerbase.h
// Function: dasynq::timer_base<dasynq::v2::child_proc_events<dasynq::v2::dprivate::event_dispatch<dasynq::v2::epoll_traits, dasynq::v2::default_traits<dasynq::null_mutex>>>>::enable_timer_nolock(dasynq::dary_heap<dasynq::timer_data, dasynq::time_val, dasynq::compare_timespec, 4>::handle_t&, bool, dasynq::clock_type)
void enable_timer_nolock(timer_handle_t &timer_id, bool enable, clock_type clock = clock_type::MONOTONIC) noexcept
    {
        auto &timer_queue = this->queue_for_clock(clock);
        auto &node_data = timer_queue.node_data(timer_id);
        auto expiry_count = node_data.expiry_count;
        if (expiry_count != 0 && enable) {
            node_data.expiry_count = 0;
            Base::receive_timer_expiry(timer_id, node_data.userdata, expiry_count);
        }
        else {
            timer_queue.node_data(timer_id).enabled = enable;
        }
    }

// Assembly:
movl %edx, %ecx
xorb $0x1, %cl
movl 0x10(%rsi), %eax
testl %eax, %eax
sete %r8b
orb %cl, %r8b
jne 0xd0a9
subq $0x18, %rsp
movl $0x0, 0x10(%rsi)
movq 0x18(%rsi), %rsi
addl %eax, 0x48(%rsi)
movl 0x18(%rsi), %eax
addq $0x10, %rsi
movq 0x20(%rdi), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x20(%rdi)
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movq %rcx, 0x8(%rdx)
callq 0xc4be
addq $0x18, %rsp
retq
movb %dl, 0x14(%rsi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::process_signal_rearm(dasynq::v2::dprivate::base_signal_watcher<dasynq::v2::epoll_traits::sigdata_t>*, dasynq::rearm)
void process_signal_rearm(base_signal_watcher * bsw, rearm rearm_type) noexcept
    {
        // Called with lock held
        if (rearm_type == rearm::REARM) {
            loop_mech.rearm_signal_watch_nolock(bsw->siginfo.get_signo(), bsw);
            if (backend_traits_t::interrupt_after_signal_add) {
                interrupt_if_necessary();
            }
        }
        else if (rearm_type == rearm::REMOVE) {
            loop_mech.remove_signal_watch_nolock(bsw->siginfo.get_signo());
        }
        // Note that signal watchers cannot (currently) be disarmed
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3, %edx
je 0xd4ca
testl %edx, %edx
jne 0xd4f3
movl 0x20(%rsi), %esi
leaq 0xa8(%rbx), %r14
movq %r14, %rdi
callq 0x8970
movl 0xa4(%rbx), %edi
movq %r14, %rsi
movl $0x80800, %edx          # imm = 0x80800
jmp 0xd4e7
movl 0x20(%rsi), %esi
leaq 0xa8(%rbx), %r14
movq %r14, %rdi
callq 0x87a0
movl 0xa4(%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8360
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/includes/service.h
// Function: service_set::load_service(char const*)
virtual service_record *load_service(const char *name)
    {
        auto r = find_service(name);
        if (r == nullptr) {
            throw service_not_found(name);
        }
        return r;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0xd652
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x222fc
movq %rax, %rbx
movq (%r15), %rdi
leaq 0x18(%rsp), %r15
cmpq %r15, %rdi
je 0xd5b8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8620
testq %rbx, %rbx
je 0xd5cb
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x40, %edi
callq 0x82c0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0xd652
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xd690
xorl %ebp, %ebp
leaq 0x377ed(%rip), %rsi     # 0x44df0
leaq 0x110(%rip), %rdx       # 0xd71a
movq %rbx, %rdi
callq 0x8aa0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0xd634
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8620
jmp 0xd634
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xd641
movq %rbx, %rdi
callq 0x8440
movq %r14, %rdi
callq 0x8ab0
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/includes/service.h
// Function: service_set::process_queues()
void process_queues() noexcept
    {
        while (! stop_queue.is_empty() || ! prop_queue.is_empty()) {
            while (! prop_queue.is_empty()) {
                auto next = prop_queue.pop_front();
                next->do_propagation();
            }
            if (! stop_queue.is_empty()) {
                auto next = stop_queue.pop_front();
                next->execute_transition();
            }
        }
    }

// Assembly:
movq 0x38(%rdi), %rax
orq 0x40(%rdi), %rax
je 0xd93d
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0xd90e
movq 0x1f8(%rdi), %rax
movq %rax, 0x38(%rbx)
movq $0x0, 0x1f8(%rdi)
callq 0x22e0a
jmp 0xd8e8
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0xd932
movq 0x200(%rdi), %rax
movq %rax, 0x40(%rbx)
movq $0x0, 0x200(%rdi)
callq 0x231ce
movq 0x38(%rbx), %rax
orq 0x40(%rbx), %rax
jne 0xd8e8
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/includes/service.h
// Function: service_set::stop_all_services(shutdown_type_t)
void stop_all_services(shutdown_type_t type = shutdown_type_t::HALT) noexcept
    {
        restart_enabled = false;
        shutdown_type = type;
        for (std::list<service_record *>::iterator i = records.begin(); i != records.end(); ++i) {
            (*i)->stop(false);
            (*i)->unpin();
        }
        process_queues();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x28(%rdi)
movb %sil, 0x29(%rdi)
leaq 0x10(%rdi), %r14
movq 0x10(%rdi), %r15
cmpq %r14, %r15
je 0xd9c2
movq 0x10(%r15), %rdi
xorl %esi, %esi
callq 0x234e0
movq 0x10(%r15), %rdi
callq 0x23800
movq (%r15), %r15
jmp 0xd9a4
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd8da
nop
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/../dasynq/include/dasynq.h
// Function: dasynq::v2::event_loop<dasynq::null_mutex, dasynq::v2::default_traits<dasynq::null_mutex>>::register_signal(dasynq::v2::dprivate::base_signal_watcher<dasynq::v2::epoll_traits::sigdata_t>*, int)
void register_signal(base_signal_watcher *callBack, int signo)
    {
        std::lock_guard<mutex_t> guard(loop_mech.lock);

        loop_mech.prepare_watcher(callBack);
        try {
            loop_mech.add_signal_watch_nolock(signo, callBack);
            if (backend_traits_t::interrupt_after_signal_add) {
                interrupt_if_necessary();
            }
        }
        catch (...) {
            loop_mech.release_watcher(callBack);
            throw;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsi), %rbx
movq %rbx, %rsi
callq 0xccbe
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xe2da
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x8210
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc92c
callq 0x8920
movq %rax, %rbx
callq 0x8a50
movq %rbx, %rdi
callq 0x8ab0
movq %rax, %rdi
callq 0xb8be
nop