LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov.cc
// Function: scdc_dataprov::dataset_open_read_state(scdc_data*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
scdc_dataset *scdc_dataprov::dataset_open_read_state(scdc_data *incoming, scdc_result &result)
{
  SCDC_TRACE("dataset_open_read_state:");

  char *buf;
  scdcint_t buf_size;
  const char *end;

  while (1)
  {
    buf = incoming->get_read_pos_buf();
    buf_size = incoming->get_read_pos_buf_size();
    end = memchr(buf, '|', buf_size);

    if (end) break;

    incoming->do_next();
  }

  buf_size = end - buf;

  scdc_dataset *dataset = 0;

  string dataset_str(buf, buf_size);
  sscanf(dataset_str.c_str(), "%p", &dataset);

  incoming->inc_read_pos(buf_size + 1);

  if (!dataset)
  {
    result = "dataset not available";
    SCDC_FAIL("dataset_open_read_state: " << result);
    return 0;
  }

  return dataset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq 0x8(%rsi), %r12
movq 0x20(%rsi), %r13
movq 0x28(%rsi), %rbp
leaq (%r12,%rbp), %r15
movq %r13, %rdx
subq %rbp, %rdx
movq %r15, %rdi
movl $0x7c, %esi
callq 0xb5b0
testq %rax, %rax
jne 0x364c4
movq 0x38(%r14), %rax
testq %rax, %rax
je 0x3648c
movq %r14, %rdi
callq *%rax
movq 0x8(%r14), %r12
movq 0x20(%r14), %r13
movq 0x28(%r14), %rbp
jmp 0x3648c
movq %rax, %rbp
subq %r15, %rbp
leaq 0x20(%rsp), %r12
movq $0x0, (%r12)
leaq 0x10(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rsp, %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1be38
movq (%r13), %rdi
leaq 0x33004(%rip), %rsi     # 0x69500
movq %r12, %rdx
xorl %eax, %eax
callq 0xb4e0
movq 0x28(%r14), %rax
addq %rbp, %rax
incq %rax
movq %rax, 0x28(%r14)
movq (%r12), %r14
testq %r14, %r14
jne 0x365e5
movq 0x8(%rbx), %rdx
leaq 0x35821(%rip), %rcx     # 0x6bd4d
movl $0x15, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x5602d(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x365e5
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x33c3e(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x35712(%rip), %rsi     # 0x6bc90
movl $0xa, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x357d1(%rip), %rsi     # 0x6bd63
movl $0x19, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x36600
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x36630
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov.cc
// Function: scdc_dataprov::dataset_close_write_state(scdc_dataset*, scdc_data*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov::dataset_close_write_state(scdc_dataset *dataset, scdc_data *outgoing, scdc_result &result)
{
  SCDC_TRACE("dataset_close_write_state: '" << dataset << "'");

  char *buf = outgoing->get_write_pos_buf();
  scdcint_t buf_size = outgoing->get_write_pos_buf_size();

  scdcint_t n = snprintf(buf, buf_size, "%p|", dataset);

  SCDC_ASSERT(n <= buf_size);

  if (n > buf_size) n = buf_size;

  outgoing->inc_write_pos(n);

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rcx
movq 0x10(%rdx), %r14
movq 0x20(%rdx), %rax
movq 0x8(%rdx), %rdi
addq %rax, %rdi
subq %rax, %r14
leaq 0x33f05(%rip), %rdx     # 0x6a565
movq %r14, %rsi
xorl %eax, %eax
callq 0xb8e0
movslq %eax, %r12
cmpq %r12, %r14
jge 0x36745
leaq 0x55ef3(%rip), %r13     # 0x8c570
movq (%r13), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x36745
addq $0x20, %rdi
callq 0xb7d0
movq (%r13), %rax
movq 0x18(%rax), %r15
leaq 0x33ec5(%rip), %rsi     # 0x6a569
movl $0xd, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x356c5(%rip), %rsi     # 0x6bd7d
movl $0x14, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x33c98(%rip), %rsi     # 0x6a364
movl $0x1, %edx
movq %r15, %rdi
callq 0xb5f0
movq %r15, %rdi
movl $0xe3, %esi
callq 0xb9a0
movq %rax, %r15
leaq 0x33ea1(%rip), %rsi     # 0x6a591
movl $0x10, %edx
movq %rax, %rdi
callq 0xb5f0
leaq 0x357fc(%rip), %rsi     # 0x6bf00
movl $0x8, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r13), %rdi
addq $0x20, %rdi
callq 0xb3b0
cmpq %r12, %r14
cmovlq %r14, %r12
addq %r12, 0x20(%rbx)
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_access_stub_handler.cc
// Function: scdc_dataprov_access_stub_handler::info_entry(void*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_access_stub_handler::info_entry(dir_t dir, const char *path, std::string &result)
{
  SCDC_TRACE(__func__ << ": dir: '" << dir << "', path: '" << path << "'");

  bool ret = true;
  result = "no info in stub for entry '" + std::string(path) + "'";

  SCDC_TRACE(__func__ << ": return: " << ret << ", result: '" << result << "'");

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
leaq 0x28(%rsp), %r14
leaq 0x7(%rsp), %rax
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x1bd28
leaq 0x31bb5(%rip), %rcx     # 0x6bf86
movl $0x1b, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xb5d0
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3a40a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x3a411
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x31f9f(%rip), %rsi     # 0x6c3d3
callq 0xba60
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3a461
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x3a469
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb670
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x3a4a5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a4bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a4d7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3a504
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x3a504
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a51f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_bench.cc
// Function: scdc_dataset_bench::do_cmd_get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, _scdc_dataset_inout_t*, _scdc_dataset_inout_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool do_cmd_get(const string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
    {
      SCDC_TRACE("dataset_bench: do_cmd_get: '" << params << "'");

      scdcint_t total_size;

      stringstream(params) >> total_size;

      SCDC_TRACE("dataset_bench: do_cmd_get: start get of size = " << total_size);

      output->total_size = total_size;
      output->total_size_given = SCDC_DATASET_INOUT_TOTAL_SIZE_GIVEN_EXACT;

      dataset_output_next_data_t *data = new dataset_output_next_data_t();

      data->total_size_left = total_size;
      data->format = format;
      data->content = content;

      if (mode == "file")
      {
        if (content == "zero") data->file = fopen("/dev/zero", "r");
        else if (content == "random") data->file = fopen("/dev/urandom", "r");
      }

      output->next = dataset_output_next;
      output->data = data;

      /* get first chunk of data */
      output->next(output, 0);

      return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rcx, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x18, %edx
callq 0xb8d0
movq %rsp, %rsi
movq %r14, %rdi
callq 0xb750
movq 0x511c4(%rip), %rsi     # 0x8bfb0
leaq 0x8(%rsp), %rdi
callq 0xb390
leaq 0x88(%rsp), %rdi
callq 0xb180
movq (%rsp), %r12
movq %r12, 0x28(%rbx)
movb $0x78, 0x30(%rbx)
movl $0x50, %edi
callq 0xb500
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
leaq 0x8(%rax), %rdi
addq $0x18, %rax
movq %rax, 0x8(%r14)
xorl %eax, %eax
movb %al, 0x18(%r14)
leaq 0x28(%r14), %r13
leaq 0x38(%r14), %rcx
movq %rcx, 0x28(%r14)
movb %al, 0x38(%r14)
movq %r12, (%r14)
leaq 0x38(%r15), %rsi
callq 0xb2c0
leaq 0x58(%r15), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0xb2c0
addq $0x78, %r15
leaq 0x30807(%rip), %rsi     # 0x6b67e
movq %r15, %rdi
callq 0xb110
testl %eax, %eax
jne 0x3aec9
leaq 0x31176(%rip), %rsi     # 0x6c000
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x3aeb2
leaq 0x3116e(%rip), %rsi     # 0x6c00b
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
jne 0x3aec9
leaq 0x31155(%rip), %rdi     # 0x6c005
jmp 0x3aeb9
leaq 0x31142(%rip), %rdi     # 0x6bffb
leaq 0x2e967(%rip), %rsi     # 0x69827
callq 0xb640
movq %rax, 0x48(%r14)
leaq -0x5c8(%rip), %rax      # 0x3a908
movq %rax, 0x38(%rbx)
movq %r14, 0x40(%rbx)
movq %rbx, %rdi
callq 0x3a908
movb $0x1, %al
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x510b3(%rip), %rsi     # 0x8bfb0
leaq 0x8(%rsp), %rdi
callq 0xb390
leaq 0x88(%rsp), %rdi
callq 0xb180
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: scdc_dataprov_fs2::make_pwd_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_fs2::make_pwd_path(const std::string &pwd, const std::string &sub, std::string &pwd_path)
{
  std::string p;

  if (!sub.empty())
  {
    if (sub[0] != '/') p = pwd + "/";
    p += sub;

  } else p = pwd;

  normalize_path(p.c_str(), pwd_path);

  if (!pwd_path.empty() && pwd_path[0] == '/') pwd_path = pwd_path.erase(0, 1);

  return (pwd_path.compare("..") != 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rbx
movq %rdx, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x8(%rdx), %rdx
testq %rdx, %rdx
je 0x4562a
movq (%r14), %rax
cmpb $0x2f, (%rax)
je 0x4561d
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x1d0a0
leaq 0x24d86(%rip), %rsi     # 0x6a36d
leaq 0x20(%rsp), %rdi
callq 0xba60
movq %rsp, %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0xb670
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x45616
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movq (%r14), %rax
movq 0x8(%r14), %rdx
movq %rsp, %rdi
movq %rax, %rsi
callq 0xb150
jmp 0x45632
movq %rsp, %rdi
callq 0xb2c0
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x1cb66
cmpq $0x0, 0x8(%rbx)
je 0x45667
movq (%rbx), %rax
cmpb $0x2f, (%rax)
jne 0x45667
movl $0x1, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb0e0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb2c0
leaq 0x24d01(%rip), %rsi     # 0x6a36f
movq %rbx, %rdi
callq 0xb110
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4568e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
testl %ebx, %ebx
setne %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x456c2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x456c2
jmp 0x456bf
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x456d8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: scdc_dataprov_fs2::undo_full_path(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_fs2::undo_full_path(const char *full_path, std::string &path)
{
  string norm_full_path;

  normalize_path(full_path, norm_full_path);

  norm_full_path += "/";

  if (strncmp(norm_full_path.c_str(), root.c_str(), root.size()) != 0) return false;

  path = norm_full_path.c_str() + root.size();

  /* remove trailing '/' */
  while (path.size() > 1 && *(path.end() - 1) == '/') path.erase(path.size() - 1, 1);

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %rax
movq %rdi, %r15
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1cb66
leaq 0x24b26(%rip), %rsi     # 0x6a36d
movq %rsp, %rdi
callq 0xba60
movq (%rsp), %r14
movq 0x68(%r15), %rsi
movq 0x70(%r15), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0xb240
movl %eax, %ebp
testl %eax, %eax
jne 0x458b8
addq %r15, %r14
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0xb200
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0xb870
movq 0x8(%rbx), %rsi
cmpq $0x2, %rsi
jb 0x458b4
movq (%rbx), %rax
cmpb $0x2f, -0x1(%rax,%rsi)
jne 0x458b4
decq %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0xb0e0
jmp 0x4588e
movq (%rsp), %r14
cmpq %r12, %r14
je 0x458cd
movq 0x10(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0xb510
testl %ebp, %ebp
sete %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x458e1
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x458fa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: dir_count_stores(__dirstream*)
static scdcint_t dir_count_stores(DIR *dir)
{
  struct dirent *ent;
  scdcint_t c = 0;

  while ((ent = readdir(dir)) != NULL)
  {
    if (ent->d_type == DT_DIR && has_prefix(ent->d_name, DIR_STORE_PREFIX)) ++c;
  }

  return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0xb850
xorl %r14d, %r14d
testq %rax, %rax
je 0x46196
leaq 0x264a1(%rip), %r15     # 0x6c60f
cmpb $0x4, 0x12(%rax)
jne 0x46189
addq $0x13, %rax
movq %rax, %rdi
movq %r15, %rsi
callq 0x1c47e
movzbl %al, %eax
addq %rax, %r14
movq %rbx, %rdi
callq 0xb850
testq %rax, %rax
jne 0x4616e
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: scdc_dataset_fs2::open_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
FILE *open_file(const string &path, bool read, bool write)
    {
      int mode = (read?1:0) + (write?2:0);

#if SCDC_DATASET_FS_LEAVE_PWD_OPEN
      if (pwd_FILE && pwd_FILE_path == path)
      {
        if (mode == 0 || mode == pwd_FILE_mode || pwd_FILE_mode == 3) return pwd_FILE;

        mode |= pwd_FILE_mode;
      }
#endif

#if SCDC_DATASET_FS_LEAVE_PWD_OPEN
      close_pwd_file();
#endif

      const char *m = 0;

      switch (mode)
      {
        case 0: m = "r"; mode = 1; break;
        case 1: m = "r"; break;
        case 2: if (z_fs_exists(path.c_str())) { m = "r+"; mode = 3; } else m = "w"; break;
        case 3: m = (z_fs_exists(path.c_str()))?"r+":"w+"; break;
      }

      FILE *file = fopen(path.c_str(), m);

#if SCDC_DATASET_FS_LEAVE_PWD_OPEN
      if (file)
      {
        pwd_FILE = file;
        pwd_FILE_path = path;
        pwd_FILE_mode = mode;
      }
#endif

      return file;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leal (%rdx,%rcx,2), %ebp
movq 0x40(%rdi), %r15
testq %r15, %r15
je 0x4a2f0
movq 0x50(%rbx), %rdx
cmpq 0x8(%r14), %rdx
jne 0x4a2e8
testq %rdx, %rdx
je 0x4a2c8
movq (%r14), %rsi
movq 0x48(%rbx), %rdi
callq 0xb520
testl %eax, %eax
jne 0x4a2e8
testl %ebp, %ebp
je 0x4a3a8
movl 0x68(%rbx), %eax
cmpl %eax, %ebp
sete %cl
cmpl $0x3, %eax
sete %dl
orb %cl, %dl
jne 0x4a3a8
orl %eax, %ebp
movq %r15, %rdi
callq 0xb4f0
xorl %esi, %esi
movq %rsi, 0x40(%rbx)
movq %rsi, 0x50(%rbx)
movq 0x48(%rbx), %rax
movb $0x0, (%rax)
movl $0x0, 0x68(%rbx)
cmpl $0x3, %ebp
ja 0x4a380
movl %ebp, %eax
leaq 0x21faa(%rip), %rcx     # 0x6c2c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1f501(%rip), %rsi     # 0x69827
movl $0x1, %ebp
jmp 0x4a380
movq (%r14), %rdi
callq 0x35764
xorl %ebp, %ebp
testq %rax, %rax
sete %bpl
leaq 0x21370(%rip), %rax     # 0x6b6b5
leaq 0x21366(%rip), %rsi     # 0x6b6b2
cmoveq %rax, %rsi
xorl $0x3, %ebp
jmp 0x4a380
movq (%r14), %rdi
callq 0x35764
testq %rax, %rax
leaq 0x2212d(%rip), %rax     # 0x6c494
leaq 0x21344(%rip), %rsi     # 0x6b6b2
cmoveq %rax, %rsi
movl $0x3, %ebp
jmp 0x4a380
leaq 0x1f4a7(%rip), %rsi     # 0x69827
movq (%r14), %rdi
callq 0xb640
testq %rax, %rax
je 0x4a3a5
movq %rax, %r15
leaq 0x48(%rbx), %rdi
movq %rax, 0x40(%rbx)
movq %r14, %rsi
callq 0xb2c0
movl %ebp, 0x68(%rbx)
jmp 0x4a3a8
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_hook.cc
// Function: scdc_dataprov_hook::close(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_hook::close(scdc_result &result)
{
  SCDC_TRACE("close:");

  bool ret = true;

  if (hook_arg.hook.close)
  {
    if (hook_arg.hook.close(dataprov) != SCDC_SUCCESS)
    {
      SCDC_FAIL("close: closing data provider with hook");
      ret = false;
    }
  }

  open_args_release();

  ret = scdc_dataprov::close(result);

  SCDC_TRACE("close: return: " << ret);

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x70(%rdi), %rax
testq %rax, %rax
je 0x4b57d
movq 0xb8(%r14), %rdi
callq *%rax
cmpq $0x1, %rax
je 0x4b57d
leaq 0x41083(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4b57d
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x1ec94(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x2136a(%rip), %rsi     # 0x6c892
movl $0xf, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x213b2(%rip), %rsi     # 0x6c8ee
movl $0x26, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
movq %r14, %rdi
callq 0x2675c
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x35f70
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_hook.cc
// Function: scdc_dataprov_hook::dataset_open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
scdc_dataset *scdc_dataprov_hook::dataset_open(std::string &path, scdc_result &result)
{
  SCDC_TRACE("dataset_open: path: '" << path << "'");

  scdc_dataset_hook *dataset_hook = 0;
  void *dataset_hook_dataset = 0;

  if (hook_arg.hook.dataset_open)
  {
    scdc_result_t res = SCDC_RESULT_INIT_EMPTY;
    dataset_hook_dataset = hook_arg.hook.dataset_open(dataprov, path.c_str(), &res);
    result = SCDC_RESULT_STR(&res);

    if (!dataset_hook_dataset)
    {
      SCDC_FAIL(__func__ << ": opening dataset with hook failed: " << result);
      goto do_return;
    }
  }

  /* unset path to prevent a further cd command */
  path.clear();

  dataset_hook = new scdc_dataset_hook(this, dataset_hook_dataset);

do_return:
  SCDC_TRACE("dataset_open: return: " << dataset_hook);

  return dataset_hook;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r15
movq %rdi, %r14
movq 0x80(%rdi), %r12
testq %r12, %r12
je 0x4b6db
movq %rdx, %rbx
leaq 0x8(%rsp), %r13
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
xorl %esi, %esi
callq 0xb2d0
movq $0x200, -0x8(%r13)      # imm = 0x200
movq 0xb8(%r14), %rdi
movq (%r15), %rsi
movq %rsp, %rdx
callq *%r12
movq %rax, %r12
movq 0x8(%rbx), %rbp
movq %r13, %rdi
callq 0xb200
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0xb870
testq %r12, %r12
jne 0x4b6de
leaq 0x40f4c(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4b6d7
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1eb5f(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x21235(%rip), %rsi     # 0x6c892
movl $0xf, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1ee98(%rip), %rsi     # 0x6a509
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x21290(%rip), %rsi     # 0x6c915
movl $0x24, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
jmp 0x4b717
xorl %r12d, %r12d
xorl %ebx, %ebx
movq %rbx, 0x8(%r15)
movq (%r15), %rax
movb %bl, (%rax)
movl $0x40, %edi
callq 0xb500
movq %r14, 0x8(%rax)
movb %bl, 0x10(%rax)
leaq 0x28(%rax), %rcx
movq %rcx, 0x18(%rax)
movq %rbx, 0x20(%rax)
movb %bl, 0x28(%rax)
leaq 0x3f7b8(%rip), %rcx     # 0x8aec8
movq %rcx, (%rax)
movq %r12, 0x38(%rax)
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_hook.cc
// Function: scdc_dataprov_hook::dataset_close(scdc_dataset*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_hook::dataset_close(scdc_dataset *dataset, scdc_result &result)
{
  SCDC_TRACE("dataset_close: dataset: " << dataset);

  bool ret = false;

  scdc_dataset_hook *dataset_hook = static_cast<scdc_dataset_hook *>(dataset);

  if (hook_arg.hook.dataset_close)
  {
    scdc_result_t res = SCDC_RESULT_INIT_EMPTY;
    scdcint_t r = hook_arg.hook.dataset_close(dataprov, dataset_hook->dataset, &res);
    result = SCDC_RESULT_STR(&res);

    if (r != SCDC_SUCCESS)
    {
      SCDC_FAIL(__func__ << ": closing dataset with hook failed: " << result);
      goto do_return;
    }
  }

  delete dataset_hook;
  ret = true;

do_return:
  SCDC_TRACE("dataset_close: return: " << ret);

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r14
movq 0x88(%rdi), %r13
testq %r13, %r13
je 0x4b86d
movq %rdx, %rbx
movq %rdi, %r12
leaq 0x10(%rsp), %r15
movl $0x200, %edx            # imm = 0x200
movq %r15, %rdi
xorl %esi, %esi
callq 0xb2d0
movq $0x200, -0x8(%r15)      # imm = 0x200
movq 0xb8(%r12), %rdi
movq 0x38(%r14), %rsi
leaq 0x8(%rsp), %rdx
callq *%r13
movq %rax, %r12
movq 0x8(%rbx), %r13
movq %r15, %rdi
callq 0xb200
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0xb870
cmpq $0x1, %r12
je 0x4b872
leaq 0x40dba(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4b869
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1e9cd(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x210a3(%rip), %rsi     # 0x6c892
movl $0xf, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1e9d9(%rip), %rsi     # 0x6a1dc
movl $0xd, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x21123(%rip), %rsi     # 0x6c93a
movl $0x24, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
jmp 0x4b87d
testq %r14, %r14
je 0x4b87b
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movb $0x1, %al
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_hook.cc
// Function: scdc_dataset_hook::do_cmd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, _scdc_dataset_inout_t*, _scdc_dataset_inout_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool do_cmd(const string &cmd, const string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
    {
      SCDC_TRACE("dataset_hook: do_cmd: cmd: '" << cmd << "'");

      scdc_dataprov_hook *dataprov_hook = static_cast<scdc_dataprov_hook *>(dataprov);

      scdc_result_t res = SCDC_RESULT_INIT_EMPTY;
      scdcint_t ret = dataprov_hook->hook_arg.hook.dataset_cmd(dataprov_hook->dataprov, dataset, cmd.c_str(), params.c_str(), input, output, &res);
      result = SCDC_RESULT_STR(&res);

      SCDC_TRACE("dataset_hook: do_cmd: return: '" << ret << "'");

      return (ret == SCDC_SUCCESS);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %r9, %rbx
movq %r8, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
movq 0x8(%rdi), %r12
leaq 0x28(%rsp), %r14
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0xb2d0
movq $0x200, -0x8(%r14)      # imm = 0x200
movq 0xb8(%r12), %rdi
movq 0x38(%r15), %rsi
movq (%rbp), %rdx
movq (%r13), %rcx
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
callq *0xa0(%r12)
movq %rax, %r15
movq 0x8(%rbx), %r12
movq %r14, %rdi
callq 0xb200
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0xb870
cmpq $0x1, %r15
sete %al
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::add_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_dataprov_jobrun_node_t&)
bool scdc_dataprov_jobrun::add_node(const std::string &nodeid, scdc_dataprov_jobrun_node_t &node)
{
  SCDC_TRACE(__func__ << ": nodeid: '" << nodeid << "', cores: " << node.cores << ", max_parallel_jobs: " << node.max_parallel_jobs << ", performance: " << node.performance);

  pair<nodes_t::iterator, bool> r = nodes.insert(nodes_t::value_type(nodeid, node));

  if (!r.second)
  {
    SCDC_FAIL("add_node: adding node failed");
    return false;
  }

  total_cores += node.cores;
  max_parallel_jobs += node.max_parallel_jobs;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rdi, %r14
leaq 0x88(%rdi), %rbx
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x1d0a0
movq 0x10(%r15), %rax
movq %rax, 0x30(%r12)
movdqu (%r15), %xmm0
movdqu %xmm0, 0x20(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x55bba
movl %edx, %ebx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c76c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
testb $0x1, %bl
je 0x4c791
movdqu (%r15), %xmm0
movdqu 0xb8(%r14), %xmm1
paddq %xmm0, %xmm1
movdqu %xmm1, 0xb8(%r14)
jmp 0x4c821
leaq 0x3fdd8(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4c821
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1d9ef(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x2030f(%rip), %rsi     # 0x6cadc
movl $0x11, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x204cc(%rip), %rsi     # 0x6ccad
movl $0x1c, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
andb $0x1, %bl
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c84e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::open_config_conf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_args*, bool&)
bool scdc_dataprov_jobrun::open_config_conf(const std::string &conf, scdc_args *args, bool &done)
{
  done = true;
  bool ret = true;

  if (conf == "cmd" || conf == "jobcmd")
  {
    const char *s;

    if (args->get<const char *>(SCDC_ARGS_TYPE_CSTR, &s) == SCDC_ARG_REF_NULL)
    {
      SCDC_ERROR(__func__ << ": getting parameter for job command");
      ret = false;

    } else
    {
      jobcmd = s;
    }

  } else if (conf == "nonode")
  {
    del_node("local");

  } else
  {
    done = false;
    ret = scdc_dataprov::open_config_conf(conf, args, done);
  }

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movb $0x1, (%rcx)
leaq 0x1cebc(%rip), %rsi     # 0x69733
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x4c8cd
leaq 0x2024b(%rip), %rsi     # 0x6cad5
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x4c8cd
leaq 0x20262(%rip), %rsi     # 0x6caff
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x4c9c3
movb $0x0, (%r15)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x35a84
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x4c917
movq (%r14), %rdi
leaq 0x8(%rsp), %rdx
movl $0x4, %esi
callq *%rax
testq %rax, %rax
je 0x4c917
movq 0x8(%rsp), %r14
movq 0x70(%rbx), %r15
addq $0x68, %rbx
movq %r14, %rdi
callq 0xb200
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0xb870
jmp 0x4ca09
leaq 0x3fc52(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x4c9bf
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x18(%rax), %rbx
leaq 0x1db65(%rip), %rsi     # 0x6a4a8
movl $0xc, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x20185(%rip), %rsi     # 0x6cadc
movl $0x11, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x20183(%rip), %rsi     # 0x6caee
movl $0x10, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x204fa(%rip), %rsi     # 0x6ce79
movl $0x23, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
jmp 0x4ca0b
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x200fc(%rip), %rsi     # 0x6cacf
leaq 0x200fa(%rip), %rdx     # 0x6cad4
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1be38
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4ca3a
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ca09
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ca31
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::del_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool scdc_dataprov_jobrun::del_node(const std::string &nodeid)
{
  SCDC_TRACE(__func__ << ": nodeid: '" << nodeid << "'");

  nodes_t::iterator i = nodes.find(nodeid);

  scdc_dataprov_jobrun_node_t node;

  if (i != nodes.end()) node = i->second;
  else node.cores = node.max_parallel_jobs = 0;

  scdcint_t r = nodes.erase(nodeid);

  if (r <= 0)
  {
    SCDC_FAIL("del_node: deleting node failed");
    return false;
  }

  total_cores -= node.cores;
  max_parallel_jobs -= node.max_parallel_jobs;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x55d7e
leaq 0x90(%rbx), %rcx
cmpq %rcx, %rax
je 0x4ca6b
movdqu 0x40(%rax), %xmm0
jmp 0x4ca6f
pxor %xmm0, %xmm0
movdqa %xmm0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x55e08
movq 0xb0(%rbx), %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x55ebc
subq 0xb0(%rbx), %r15
testq %r15, %r15
jle 0x4cab7
movdqu 0xb8(%rbx), %xmm0
psubq (%rsp), %xmm0
movdqu %xmm0, 0xb8(%rbx)
jmp 0x4cb47
leaq 0x3fab2(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4cb47
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x1d6c9(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x1ffe9(%rip), %rsi     # 0x6cadc
movl $0x11, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x201c3(%rip), %rsi     # 0x6ccca
movl $0x1e, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3b0
testq %r15, %r15
setg %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::sched_init()
void scdc_dataprov_jobrun::sched_init()
{
  SCDC_TRACE(__func__ << ":");

  sched = new scdc_dataprov_jobrun_sched();
  sched->dataprov_jobrun = this;

  sched_run = true;

  pthread_mutex_init(&sched_lock, NULL);
  pthread_cond_init(&sched_cond, NULL);
  pthread_cond_init(&sched_cond_finished, NULL);

  pthread_create(&sched_run_thread, NULL, sched_run_routine, this);

  SCDC_TRACE(__func__ << ": return");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x40, %edi
callq 0xb500
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rcx, 0x38(%rax)
movq %rax, 0x180(%rbx)
movq %rbx, 0x30(%rax)
movb $0x1, 0x188(%rbx)
leaq 0x190(%rbx), %rdi
xorl %esi, %esi
callq 0xb7e0
leaq 0x1b8(%rbx), %rdi
xorl %esi, %esi
callq 0xb660
leaq 0x1e8(%rbx), %rdi
xorl %esi, %esi
callq 0xb660
leaq 0x220(%rbx), %rdi
leaq 0x29f2(%rip), %rdx      # 0x4f88f
xorl %esi, %esi
movq %rbx, %rcx
popq %rbx
jmp 0xba00
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::sched_release()
void scdc_dataprov_jobrun::sched_release()
{
  SCDC_TRACE(__func__ << ":");

  pthread_mutex_lock(&sched_lock);
  sched_run = false;
  pthread_mutex_unlock(&sched_lock);

#if SCHED_RUN_THREAD_CANCEL
  pthread_cancel(sched_thread);
#else
  pthread_cond_signal(&sched_cond);
#endif
  pthread_join(sched_run_thread, NULL);

  pthread_mutex_lock(&sched_lock);
  while (sched_jobs_run.size() > 0)
  {
    pthread_t thread = sched_jobs_run.begin()->second;
    pthread_mutex_unlock(&sched_lock);
    pthread_join(thread, NULL);
    pthread_mutex_lock(&sched_lock);
  }
  pthread_mutex_unlock(&sched_lock);

  pthread_cond_broadcast(&sched_cond_finished);

  pthread_cond_destroy(&sched_cond);
  pthread_cond_destroy(&sched_cond_finished);
  pthread_mutex_destroy(&sched_lock);

  delete sched;

  SCDC_TRACE(__func__ << ": return");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x190(%rdi), %r14
movq %r14, %rdi
callq 0xb7d0
movb $0x0, 0x188(%rbx)
movq %r14, %rdi
callq 0xb3b0
leaq 0x1b8(%rbx), %r15
movq %r15, %rdi
callq 0xb030
movq 0x220(%rbx), %rdi
xorl %esi, %esi
callq 0xb460
movq %r14, %rdi
callq 0xb7d0
cmpq $0x0, 0x268(%rbx)
je 0x4cf3a
movq 0x258(%rbx), %rax
movq 0x40(%rax), %r12
movq %r14, %rdi
callq 0xb3b0
movq %r12, %rdi
jmp 0x4cf09
movq %r14, %rdi
callq 0xb3b0
leaq 0x1e8(%rbx), %r12
movq %r12, %rdi
callq 0xb1a0
movq %r15, %rdi
callq 0xba70
movq %r12, %rdi
callq 0xba70
movq %r14, %rdi
callq 0xb620
movq 0x180(%rbx), %rbx
testq %rbx, %rbx
je 0x4cf8c
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x4cf8c
movq (%rax), %rsi
incq %rsi
callq 0xb510
movl $0x40, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb510
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::get_job_state(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool)
bool scdc_dataprov_jobrun::get_job_state(const std::string &jobid, std::string &state, bool sched_locked)
{
  if (!is_job(jobid)) state = "unknown";
  else
  {
    /* waiting | running | done */

    if (!sched_locked) pthread_mutex_lock(&sched_lock);

    if (find(sched_jobs_wait.begin(), sched_jobs_wait.end(), jobid) != sched_jobs_wait.end()) state = "waiting";
    else if (sched_jobs_run.find(jobid) != sched_jobs_run.end()) state = "running";
    else state = "done";

    if (!sched_locked) pthread_mutex_unlock(&sched_lock);
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
addq $0x128, %rdi            # imm = 0x128
callq 0x56418
leaq 0x130(%rbx), %rcx
cmpq %rcx, %rax
je 0x4e491
movl %ebp, 0xc(%rsp)
testb %bpl, %bpl
jne 0x4e45a
leaq 0x190(%rbx), %rdi
callq 0xb7d0
leaq 0x228(%rbx), %rbp
movq 0x228(%rbx), %r12
movq %r15, 0x10(%rsp)
cmpq %rbp, %r12
je 0x4e4d7
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x5645e
testb %al, %al
jne 0x4e4b1
movq (%r12), %r12
cmpq %rbp, %r12
jne 0x4e477
jmp 0x4e4d7
movq 0x8(%r14), %rdx
leaq 0x1b5bd(%rip), %rcx     # 0x69a59
movl $0x7, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
jmp 0x4e534
cmpq %rbp, %r12
je 0x4e4d7
movq 0x8(%r14), %rdx
leaq 0x1e89e(%rip), %rcx     # 0x6cd5f
movl $0x7, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
movl 0xc(%rsp), %ebp
jmp 0x4e520
leaq 0x240(%rbx), %rdi
movq %r15, %rsi
callq 0x56490
leaq 0x248(%rbx), %rcx
movq 0x8(%r14), %rdx
cmpq %rcx, %rax
movl 0xc(%rsp), %ebp
je 0x4e509
leaq 0x1f600(%rip), %rcx     # 0x6db01
movl $0x7, %r8d
jmp 0x4e516
leaq 0x1e857(%rip), %rcx     # 0x6cd67
movl $0x4, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
testb %bpl, %bpl
jne 0x4e534
addq $0x190, %rbx            # imm = 0x190
movq %rbx, %rdi
callq 0xb3b0
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::do_cmd_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, _scdc_dataset_inout_t*, _scdc_dataset_inout_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_jobrun::do_cmd_info(const std::string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
{
  stringstream ss;

  pthread_mutex_lock(&sched_lock);
  ss << jobs.size() << ":" << sched_jobs_wait.size() << ":" << sched_jobs_run.size();
  pthread_mutex_unlock(&sched_lock);

  result = ss.str();

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %r8, %rbx
movq %rdi, %r15
leaq 0x20(%rsp), %rdi
callq 0xb360
leaq 0x190(%r15), %r14
movq %r14, %rdi
callq 0xb7d0
leaq 0x30(%rsp), %rdi
movq 0x150(%r15), %rsi
callq 0xb330
movq %rax, %r12
leaq 0x1bdd6(%rip), %rsi     # 0x6a364
movl $0x1, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x238(%r15), %rsi
movq %r12, %rdi
callq 0xb330
movq %rax, %r12
leaq 0x1bdb0(%rip), %rsi     # 0x6a364
movl $0x1, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x268(%r15), %rsi
movq %r12, %rdi
callq 0xb330
movq %r14, %rdi
callq 0xb3b0
leaq 0x38(%rsp), %rsi
movq %rsp, %rdi
callq 0xb8c0
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb670
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e60d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x3d99c(%rip), %rsi     # 0x8bfb0
leaq 0x20(%rsp), %rdi
callq 0xb390
leaq 0xa0(%rsp), %rdi
callq 0xb180
movb $0x1, %al
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x4e63e
movq %rax, %rbx
movq 0x3d968(%rip), %rsi     # 0x8bfb0
leaq 0x20(%rsp), %rdi
callq 0xb390
leaq 0xa0(%rsp), %rdi
callq 0xb180
movq %rbx, %rdi
callq 0xb9c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::get_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_dataprov_jobrun_node_t&)
bool scdc_dataprov_jobrun::get_node(const std::string &nodeid, scdc_dataprov_jobrun_node_t &node)
{
  SCDC_TRACE(__func__ << ": nodeid: '" << nodeid << "'");

  nodes_t::iterator i = nodes.find(nodeid);

  if (i == nodes.end())
  {
    SCDC_FAIL("get_node: getting node failed");
    return false;
  }

  node = i->second;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
addq $0x88, %rdi
callq 0x55d7e
movq %rax, %r14
addq $0x90, %rbx
cmpq %rbx, %rax
je 0x4e6b3
movq 0x50(%r14), %rax
movq %rax, 0x10(%r15)
movups 0x40(%r14), %xmm0
movups %xmm0, (%r15)
jmp 0x4e74a
leaq 0x3deb6(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4e74a
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x1bac7(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1e3e7(%rip), %rsi     # 0x6cadc
movl $0x11, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1e5e0(%rip), %rsi     # 0x6cce9
movl $0x1d, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
cmpq %rbx, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::set_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long long, long long, double)
bool scdc_dataprov_jobrun::set_node(const std::string &nodeid, scdcint_t cores, scdcint_t max_parallel_jobs, double performance)
{
  SCDC_TRACE(__func__ << ": nodeid: '" << nodeid << "', cores: '" << cores << "', max_parallel_jobs: '" << max_parallel_jobs << "', performance: '" << performance << "'");

  nodes_t::iterator i = nodes.find(nodeid);

  if (i == nodes.end())
  {
    SCDC_FAIL("set_node: setting node failed");
    return false;
  }

  if (cores >= 0) i->second.cores = cores;

  if (max_parallel_jobs >= 0) i->second.max_parallel_jobs = max_parallel_jobs;

  if (performance >= 0) i->second.performance = performance;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
addq $0x88, %rdi
callq 0x55d7e
movq %rax, %r14
addq $0x90, %rbx
cmpq %rbx, %rax
je 0x4e7bd
testq %r12, %r12
js 0x4e796
movq %r12, 0x40(%r14)
testq %r15, %r15
js 0x4e79f
movq %r15, 0x48(%r14)
xorpd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x4e854
movsd %xmm1, 0x50(%r14)
jmp 0x4e854
leaq 0x3ddac(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4e854
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x1b9bd(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1e2dd(%rip), %rsi     # 0x6cadc
movl $0x11, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1e4f4(%rip), %rsi     # 0x6cd07
movl $0x1d, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
cmpq %rbx, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::set_job_params(scdc_dataprov_jobrun_job_t&, scdc_dataprov_jobrun_job_params_proc_t&)
bool scdc_dataprov_jobrun::set_job_params(scdc_dataprov_jobrun_job_t &job, scdc_dataprov_jobrun_job_params_t &job_params)
{
  job.params = job_params;

  if (job.params.nt_max <= 0) job.params.nt_max = 1;
  if (job.params.nt_min <= 0) job.params.nt_min = job.params.nt_max;

  if (job.params.np_max <= 0) job.params.np_max = 1;
  if (job.params.np_min <= 0) job.params.np_min = job.params.np_max;

  return true;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
leaq 0x20(%rsi), %rdi
leaq 0x20(%rdx), %rsi
callq 0xb2c0
movq 0x8(%rbx), %rax
testq %rax, %rax
jg 0x4ed61
movq $0x1, 0x8(%rbx)
movl $0x1, %eax
cmpq $0x0, (%rbx)
jg 0x4ed6a
movq %rax, (%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
jg 0x4ed80
movq $0x1, 0x18(%rbx)
movl $0x1, %eax
cmpq $0x0, 0x10(%rbx)
jg 0x4ed8b
movq %rax, 0x10(%rbx)
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::set_job_params(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_dataprov_jobrun_job_params_proc_t&)
bool scdc_dataprov_jobrun::set_job_params(const std::string &jobid, scdc_dataprov_jobrun_job_params_t &job_params)
{
  jobs_t::iterator i = jobs.find(jobid);

  if (i == jobs.end()) return false;

  if (!set_job_params(i->second, job_params)) return false;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
addq $0x128, %rdi            # imm = 0x128
callq 0x56418
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x4edc2
leaq 0x40(%r15), %rsi
movq %r14, %rdx
callq 0x4ed2c
cmpq %rbx, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::get_job(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_dataprov_jobrun_job_t&)
bool scdc_dataprov_jobrun::get_job(const std::string &jobid, scdc_dataprov_jobrun_job_t &job)
{
  jobs_t::iterator i = jobs.find(jobid);

  if (i == jobs.end()) return false;

  job = i->second;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
addq $0x128, %rdi            # imm = 0x128
callq 0x56418
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x4ee2f
movups 0x40(%r15), %xmm0
movups 0x50(%r15), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
leaq 0x20(%r14), %rdi
leaq 0x60(%r15), %rsi
callq 0xb2c0
leaq 0x40(%r14), %rdi
leaq 0x80(%r15), %rsi
callq 0xb2c0
movb 0xa0(%r15), %al
movb %al, 0x60(%r14)
cmpq %rbx, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
nop