LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %r15
movq %rdi, %r14
movq 0x80(%rdi), %r12
testq %r12, %r12
je 0x3b25b
movq %rdx, %rbx
leaq 0x10(%rsp), %r13
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
xorl %esi, %esi
callq 0xb2f0
movq $0x200, -0x8(%r13)      # imm = 0x200
movq 0xb8(%r14), %rdi
movq (%r15), %rsi
leaq 0x8(%rsp), %rdx
callq *%r12
movq %rax, %r12
movq %rbx, %rdi
movq %r13, %rsi
callq 0xba40
testq %r12, %r12
jne 0x3b25e
leaq 0x3a39b(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3b257
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x15f82(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x18610(%rip), %rsi     # 0x53822
movq %rax, %rdi
callq 0xb520
leaq 0x162c8(%rip), %rsi     # 0x514e9
movq %rax, %rdi
callq 0xb520
leaq 0x18675(%rip), %rsi     # 0x538a5
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %eax, %eax
jmp 0x3b297
xorl %r12d, %r12d
andq $0x0, 0x8(%r15)
movq (%r15), %rax
xorl %ebx, %ebx
movb %bl, (%rax)
pushq $0x40
popq %rdi
callq 0xb540
movq %r14, 0x8(%rax)
movb %bl, 0x10(%rax)
leaq 0x28(%rax), %rcx
movq %rcx, 0x18(%rax)
andq $0x0, 0x20(%rax)
movb %bl, 0x28(%rax)
leaq 0x38c50(%rip), %rcx     # 0x73ee0
movq %rcx, (%rax)
movq %r12, 0x38(%rax)
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3b396
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x10(%rsp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0xb2f0
movq $0x200, -0x8(%r12)      # imm = 0x200
movq 0xb8(%r15), %rdi
movq 0x38(%r14), %rsi
leaq 0x8(%rsp), %rdx
callq *%r13
movq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0xba40
cmpq $0x1, %r15
je 0x3b39b
leaq 0x3a260(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3b392
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x15e47(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x184d5(%rip), %rsi     # 0x53822
movq %rax, %rdi
callq 0xb520
leaq 0x15e60(%rip), %rsi     # 0x511bc
movq %rax, %rdi
callq 0xb520
leaq 0x1855f(%rip), %rsi     # 0x538ca
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %eax, %eax
jmp 0x3b3a6
testq %r14, %r14
je 0x3b3a4
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
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq 0x8(%rdi), %rbx
leaq 0x28(%rsp), %r14
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0xb2f0
movq $0x200, -0x8(%r14)      # imm = 0x200
movq 0xb8(%rbx), %rdi
movq 0x38(%rbp), %rsi
movq (%r13), %rdx
movq (%r12), %rcx
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %r8
movq 0x10(%rsp), %r9
callq *0xa0(%rbx)
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xba40
cmpq $0x1, %r14
sete %al
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::scdc_dataprov_jobrun(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
scdc_dataprov_jobrun::scdc_dataprov_jobrun(const std::string &type_)
  :scdc_dataprov(type_),
  total_cores(0),
  max_parallel_jobs(0),
  runjobs(true),
  sched_mode("online"), sched_method("default local"),
  sched_run(false)
{
  scdc_dataprov_jobrun_node_t node(1, 1, 1.0);
  add_node("local", node);

  scdc_dataprov_jobrun_res_proc_t local_proc;
  local_proc.node = "local";
  local_proc.np = 1;
  local_proc.nt = 1;

  local_res.push_back(local_proc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
callq 0x1cb38
leaq 0x38313(%rip), %rax     # 0x73f38
movq %rax, (%rbx)
leaq 0x78(%rbx), %rax
movq %rax, 0x68(%rbx)
andq $0x0, 0x70(%rbx)
movb $0x0, 0x78(%rbx)
leaq 0x90(%rbx), %rax
andl $0x0, 0x90(%rbx)
andq $0x0, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rax, 0xa8(%rbx)
andq $0x0, 0xc0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%rbx)
movb $0x1, 0xc8(%rbx)
leaq 0xd0(%rbx), %r14
leaq 0x17dcc(%rip), %rsi     # 0x53a50
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x1a132
leaq 0xf0(%rbx), %r15
leaq 0x17db8(%rip), %rsi     # 0x53a57
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x1a132
xorps %xmm0, %xmm0
movups %xmm0, 0x110(%rbx)
andq $0x0, 0x120(%rbx)
leaq 0x130(%rbx), %rax
andl $0x0, 0x130(%rbx)
andq $0x0, 0x138(%rbx)
movq %rax, 0x140(%rbx)
movq %rax, 0x148(%rbx)
andq $0x0, 0x150(%rbx)
movb $0x0, 0x188(%rbx)
leaq 0x228(%rbx), %r13
movq %r13, 0x230(%rbx)
movq %r13, 0x228(%rbx)
andq $0x0, 0x238(%rbx)
andl $0x0, 0x248(%rbx)
andq $0x0, 0x250(%rbx)
leaq 0x110(%rbx), %r12
leaq 0x248(%rbx), %rax
movq %rax, 0x258(%rbx)
movq %rax, 0x260(%rbx)
andq $0x0, 0x268(%rbx)
pushq $0x1
popq %rbp
movq %rbp, 0x40(%rsp)
movq %rbp, 0x48(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x50(%rsp)
leaq 0x17cfb(%rip), %rsi     # 0x53a5f
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1a132
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x3be6a
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x17cb8(%rip), %rsi     # 0x53a5f
leaq 0x10(%rsp), %rdi
callq 0xba40
leaq 0x10(%rsp), %rsi
movq %rbp, 0x20(%rsi)
movq %rbp, 0x28(%rsi)
movq %r12, %rdi
callq 0x4039e
leaq 0x10(%rsp), %rdi
callq 0xb230
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3bdf6
movq %rax, 0x8(%rsp)
jmp 0x3be05
movq %rax, 0x8(%rsp)
jmp 0x3be38
movq %rax, 0x8(%rsp)
jmp 0x3be40
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x128(%rbx), %rbp
leaq 0x240(%rbx), %rdi
callq 0x41312
movq %r13, %rdi
callq 0x41376
movq %rbp, %rdi
callq 0x413b6
movq %r12, %rdi
callq 0x403ca
movq %r15, %rdi
callq 0xb230
movq %r14, %rdi
callq 0xb230
leaq 0x68(%rbx), %r14
leaq 0x88(%rbx), %rdi
callq 0x4141c
movq %r14, %rdi
callq 0xb230
movq %rbx, %rdi
callq 0x1cc1e
movq 0x8(%rsp), %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rdi, %r14
leaq 0x88(%rdi), %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0xb750
movq 0x10(%r15), %rax
movq %rax, 0x30(%r12)
movdqu (%r15), %xmm0
movdqu %xmm0, 0x20(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x42950
movl %edx, %ebx
movq %rsp, %rdi
callq 0xb230
testb $0x1, %bl
je 0x3bed9
movdqu (%r15), %xmm0
movdqu 0xb8(%r14), %xmm1
paddq %xmm0, %xmm1
movdqu %xmm1, 0xb8(%r14)
jmp 0x3bf38
leaq 0x396a0(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3bf38
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x15287(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x17b5f(%rip), %rsi     # 0x53a6c
movq %rax, %rdi
callq 0xb520
leaq 0x17d21(%rip), %rsi     # 0x53c3d
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
andb $0x1, %bl
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x14796(%rip), %rsi     # 0x50713
movq %r12, %rdi
callq 0x19be0
testb %al, %al
jne 0x3bfa0
leaq 0x17ad5(%rip), %rsi     # 0x53a65
movq %r12, %rdi
callq 0x19be0
testb %al, %al
je 0x3c043
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3bfd1
movq (%r14), %rdi
pushq $0x4
popq %rsi
leaq 0x8(%rsp), %rdx
callq *%rax
testq %rax, %rax
je 0x3bfd1
movq 0x8(%rsp), %rsi
addq $0x68, %rbx
movq %rbx, %rdi
callq 0xba40
jmp 0x3c084
leaq 0x395a8(%rip), %rbx     # 0x75580
movq (%rbx), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x3c03f
addq $0x20, %rdi
callq 0xb800
movq (%rbx), %rax
movq 0x18(%rax), %rdi
leaq 0x1548f(%rip), %rsi     # 0x51488
callq 0xb520
leaq 0x17a67(%rip), %rsi     # 0x53a6c
movq %rax, %rdi
callq 0xb520
leaq 0x17a6a(%rip), %rsi     # 0x53a7e
movq %rax, %rdi
callq 0xb520
leaq 0x17de6(%rip), %rsi     # 0x53e09
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%rbx), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %eax, %eax
jmp 0x3c086
leaq 0x17a45(%rip), %rsi     # 0x53a8f
movq %r12, %rdi
callq 0x19be0
testb %al, %al
je 0x3c092
leaq 0x17a02(%rip), %rsi     # 0x53a5f
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x1a132
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c0c8
leaq 0x8(%rsp), %rdi
callq 0xb230
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
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 0x2dc24
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rdi, %r14
leaq 0x88(%rdi), %r15
movq %r15, %rdi
callq 0x42b62
leaq 0x90(%r14), %rcx
cmpq %rcx, %rax
je 0x3c0f9
movdqu 0x40(%rax), %xmm0
jmp 0x3c0fd
pxor %xmm0, %xmm0
movdqa %xmm0, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42bd8
movq %rax, %rbx
testq %rax, %rax
jle 0x3c12e
movdqu 0xb8(%r14), %xmm0
psubq (%rsp), %xmm0
movdqu %xmm0, 0xb8(%r14)
jmp 0x3c18d
leaq 0x3944b(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3c18d
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x15032(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x1790a(%rip), %rsi     # 0x53a6c
movq %rax, %rdi
callq 0xb520
leaq 0x17ae9(%rip), %rsi     # 0x53c5a
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
testq %rbx, %rbx
setg %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x40
popq %rdi
callq 0xb540
leaq 0x10(%rax), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
andq $0x0, 0x38(%rax)
movq %rax, 0x180(%rbx)
movq %rbx, 0x30(%rax)
movb $0x1, 0x188(%rbx)
leaq 0x190(%rbx), %rdi
xorl %esi, %esi
callq 0xb810
leaq 0x1b8(%rbx), %rdi
xorl %esi, %esi
callq 0xb680
leaq 0x1e8(%rbx), %rdi
xorl %esi, %esi
callq 0xb680
leaq 0x220(%rbx), %rdi
leaq 0x1f91(%rip), %rdx      # 0x3e3c6
xorl %esi, %esi
movq %rbx, %rcx
popq %rbx
jmp 0xb9f0
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb800
movb $0x0, 0x188(%rbx)
movq %r14, %rdi
callq 0xb3e0
leaq 0x1b8(%rbx), %r15
movq %r15, %rdi
callq 0xb030
movq 0x220(%rbx), %rdi
xorl %esi, %esi
callq 0xb4a0
movq %r14, %rdi
callq 0xb800
cmpq $0x0, 0x268(%rbx)
je 0x3c4d2
movq 0x258(%rbx), %rax
movq 0x40(%rax), %r12
movq %r14, %rdi
callq 0xb3e0
movq %r12, %rdi
jmp 0x3c4a1
movq %r14, %rdi
callq 0xb3e0
leaq 0x1e8(%rbx), %r12
movq %r12, %rdi
callq 0xb190
movq %r15, %rdi
callq 0xba60
movq %r12, %rdi
callq 0xba60
movq %r14, %rdi
callq 0xb640
movq 0x180(%rbx), %rbx
testq %rbx, %rbx
je 0x3c515
movq %rbx, %rdi
callq 0xb230
pushq $0x40
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb550
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::do_cmd_ls(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_ls(const std::string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
{
  stringstream ss;

  pthread_mutex_lock(&sched_lock);
  for (jobs_t::iterator i = jobs.begin(); i != jobs.end(); ++i)
  {
    string state;

    get_job_state(i->first, state, true);

    ss << i->first << ":" << i->second.params.nt_min << "-" << i->second.params.nt_max << ":" << i->second.params.np_min << "-" << i->second.params.np_max << ":" << state << ",";
  }
  pthread_mutex_unlock(&sched_lock);

  string s = ss.str();

  if (s.size() > 0) s.resize(s.size() - 1);

  result = s;

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %r8, 0x20(%rsp)
movq %rdi, %r14
leaq 0x30(%rsp), %rdi
callq 0xb390
leaq 0x190(%r14), %rdi
movq %rdi, 0x28(%rsp)
callq 0xb800
movq 0x140(%r14), %r13
leaq 0x130(%r14), %r12
movq %rsp, %rbp
leaq 0x13efa(%rip), %r15     # 0x51344
cmpq %r12, %r13
je 0x3d52a
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x20(%r13), %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
pushq $0x1
popq %rcx
callq 0x3d5ae
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
movq %r15, %rsi
callq 0xb520
movq 0x40(%r13), %rsi
movq %rax, %rdi
callq 0xb1d0
movq %rax, %rdi
leaq 0x16791(%rip), %rsi     # 0x53c3b
callq 0xb520
movq 0x48(%r13), %rsi
movq %rax, %rdi
callq 0xb1d0
movq %rax, %rdi
movq %r15, %rsi
callq 0xb520
movq 0x50(%r13), %rsi
movq %rax, %rdi
callq 0xb1d0
movq %rax, %rdi
leaq 0x1675f(%rip), %rsi     # 0x53c3b
callq 0xb520
movq 0x58(%r13), %rsi
movq %rax, %rdi
callq 0xb1d0
movq %rax, %rdi
movq %r15, %rsi
callq 0xb520
movq %rax, %rdi
movq %rbp, %rsi
callq 0xb490
movq %rax, %rdi
leaq 0x14339(%rip), %rsi     # 0x51846
callq 0xb520
movq %rbp, %rdi
callq 0xb230
movq %r13, %rdi
callq 0xb380
movq %rax, %r13
jmp 0x3d44a
movq 0x28(%rsp), %rdi
callq 0xb3e0
leaq 0x48(%rsp), %rsi
movq %rsp, %rdi
callq 0xb8d0
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x3d556
decq %rsi
movq %rsp, %rdi
callq 0xb760
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0xb2e0
movq %rsp, %rdi
callq 0xb230
leaq 0x30(%rsp), %rdi
callq 0xb3d0
movb $0x1, %al
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3d59b
jmp 0x3d590
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb230
leaq 0x30(%rsp), %rdi
callq 0xb3d0
movq %rbx, %rdi
callq 0xb9a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3db40
testb %al, %al
je 0x3d602
testb %bpl, %bpl
jne 0x3d5db
leaq 0x190(%rbx), %rdi
callq 0xb800
leaq 0x228(%rbx), %r12
movq 0x228(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x43242
cmpq %r12, %rax
je 0x3d613
leaq 0x166ef(%rip), %rsi     # 0x53cef
jmp 0x3d63e
leaq 0x13430(%rip), %rsi     # 0x50a39
movq %r14, %rdi
callq 0xba40
jmp 0x3d65a
leaq 0x240(%rbx), %rdi
movq %r15, %rsi
callq 0x43274
leaq 0x248(%rbx), %rcx
cmpq %rcx, %rax
leaq 0x166c4(%rip), %rax     # 0x53cf7
leaq 0x17457(%rip), %rsi     # 0x54a91
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0xba40
testb %bpl, %bpl
jne 0x3d65a
addq $0x190, %rbx            # imm = 0x190
movq %rbx, %rdi
callq 0xb3e0
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %r8, %rbx
movq %rdi, %r15
leaq 0x28(%rsp), %rdi
callq 0xb390
leaq 0x190(%r15), %r14
movq %r14, %rdi
callq 0xb800
leaq 0x38(%rsp), %rdi
movq 0x150(%r15), %rsi
callq 0xb360
leaq 0x13c9b(%rip), %rsi     # 0x51344
movq %rax, %rdi
callq 0xb520
movq 0x238(%r15), %rsi
movq %rax, %rdi
callq 0xb360
leaq 0x13c7d(%rip), %rsi     # 0x51344
movq %rax, %rdi
callq 0xb520
movq 0x268(%r15), %rsi
movq %rax, %rdi
callq 0xb360
movq %r14, %rdi
callq 0xb3e0
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0xb8d0
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x28(%rsp), %rdi
callq 0xb3d0
movb $0x1, %al
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3d728
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xb3d0
movq %rbx, %rdi
callq 0xb9a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdx, %r15
movq %rdi, %rbx
addq $0x88, %rdi
callq 0x42b62
movq %rax, %r14
addq $0x90, %rbx
cmpq %rbx, %rax
je 0x3d783
movq 0x50(%r14), %rax
movq %rax, 0x10(%r15)
movups 0x40(%r14), %xmm0
movups %xmm0, (%r15)
jmp 0x3d7e2
leaq 0x37df6(%rip), %r15     # 0x75580
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3d7e2
addq $0x20, %rdi
callq 0xb800
movq (%r15), %rax
movq 0x8(%rax), %rdi
leaq 0x139dd(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x162b5(%rip), %rsi     # 0x53a6c
movq %rax, %rdi
callq 0xb520
leaq 0x164b3(%rip), %rsi     # 0x53c79
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3e0
cmpq %rbx, %r14
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x42b62
movq %rax, %r14
addq $0x90, %rbx
cmpq %rbx, %rax
je 0x3d848
testq %r12, %r12
js 0x3d828
movq %r12, 0x40(%r14)
testq %r15, %r15
js 0x3d831
movq %r15, 0x48(%r14)
xorpd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x3d8a7
movsd %xmm1, 0x50(%r14)
jmp 0x3d8a7
leaq 0x37d31(%rip), %r15     # 0x75580
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3d8a7
addq $0x20, %rdi
callq 0xb800
movq (%r15), %rax
movq 0x8(%rax), %rdi
leaq 0x13918(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x161f0(%rip), %rsi     # 0x53a6c
movq %rax, %rdi
callq 0xb520
leaq 0x1640c(%rip), %rsi     # 0x53c97
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3e0
cmpq %rbx, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::set_job(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_dataprov_jobrun_job_t&)
bool scdc_dataprov_jobrun::set_job(const std::string &jobid, scdc_dataprov_jobrun_job_t &job)
{
  jobs_t::iterator i = jobs.find(jobid);

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

  i->second = job;

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
addq $0x128, %rdi            # imm = 0x128
callq 0x43204
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x3db92
leaq 0x40(%r15), %rdi
movq %r14, %rsi
callq 0x410e8
cmpq %rbx, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x41116
movq 0x8(%rbx), %rax
testq %rax, %rax
jg 0x3dbc1
movq $0x1, 0x8(%rbx)
pushq $0x1
popq %rax
cmpq $0x0, (%rbx)
jg 0x3dbca
movq %rax, (%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
jg 0x3dbde
pushq $0x1
popq %rax
movq $0x1, 0x18(%rbx)
cmpq $0x0, 0x10(%rbx)
jg 0x3dbe9
movq %rax, 0x10(%rbx)
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43204
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x3dc20
leaq 0x40(%r15), %rsi
movq %r14, %rdx
callq 0x3db9e
cmpq %rbx, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x43204
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x3dc5e
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x410e8
cmpq %rbx, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::job_destroy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool scdc_dataprov_jobrun::job_destroy(const std::string &jobid)
{
  pthread_mutex_lock(&sched_lock);
  bool ret = del_job(jobid);
  pthread_mutex_unlock(&sched_lock);

  if (!ret)
  {
    SCDC_FAIL("job_destroy: deleting job failed");
    return false;
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x190(%rdi), %r15
movq %r15, %rdi
callq 0xb800
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3da52
movl %eax, %ebx
movq %r15, %rdi
callq 0xb3e0
testb %bl, %bl
jne 0x3ddf6
leaq 0x377e2(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3ddf6
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x133c9(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x15ca1(%rip), %rsi     # 0x53a6c
movq %rax, %rdi
callq 0xb520
leaq 0x15f40(%rip), %rsi     # 0x53d1a
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::job_update(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_dataprov_jobrun_job_params_proc_t&)
bool scdc_dataprov_jobrun::job_update(const std::string &jobid, scdc_dataprov_jobrun_job_params_t &job_params)
{
  pthread_mutex_lock(&sched_lock);
  bool ret = set_job_params(jobid, job_params);
  pthread_mutex_unlock(&sched_lock);

  if (!ret)
  {
    SCDC_FAIL("job_update: updating job failed");
    return false;
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x190(%rdi), %r12
movq %r12, %rdi
callq 0xb800
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3dbee
movl %eax, %ebx
movq %r12, %rdi
callq 0xb3e0
testb %bl, %bl
jne 0x3de99
leaq 0x3773f(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3de99
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x13326(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x15bfe(%rip), %rsi     # 0x53a6c
movq %rax, %rdi
callq 0xb520
leaq 0x15ebe(%rip), %rsi     # 0x53d3b
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::job_schedule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool scdc_dataprov_jobrun::job_schedule(const std::string &jobid)
{
  pthread_mutex_lock(&sched_lock);
  sched_jobs_wait.push_back(jobid);
  pthread_mutex_unlock(&sched_lock);

  pthread_cond_signal(&sched_cond);

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x190(%rdi), %r15
movq %r15, %rdi
callq 0xb800
leaq 0x228(%r14), %rdi
movq %rbx, %rsi
callq 0x41154
movq %r15, %rdi
callq 0xb3e0
addq $0x1b8, %r14            # imm = 0x1B8
movq %r14, %rdi
callq 0xb030
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::job_wait_running(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool scdc_dataprov_jobrun::job_wait_running(const std::string &jobid)
{
  SCDC_TRACE(__func__ << ": jobid: '" << jobid << "'");

  bool wait = false;
  pthread_t thread;

  pthread_mutex_lock(&sched_lock);
  sched_jobs_run_t::iterator i = sched_jobs_run.find(jobid);
  if (i != sched_jobs_run.end())
  {
    wait = true;
    thread = i->second;
  }
  pthread_mutex_unlock(&sched_lock);

  SCDC_TRACE(__func__ << ": wait: '" << wait << "'");

  if (!wait) return false;

  pthread_join(thread, NULL);

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x190(%rdi), %r15
movq %r15, %rdi
callq 0xb800
leaq 0x240(%rbx), %rdi
movq %r14, %rsi
callq 0x43274
movq %rax, %r14
addq $0x248, %rbx            # imm = 0x248
cmpq %rbx, %rax
je 0x3e39d
movq 0x40(%r14), %r12
jmp 0x3e39d
movq %r15, %rdi
callq 0xb3e0
cmpq %rbx, %r14
je 0x3e3b4
movq %r12, %rdi
xorl %esi, %esi
callq 0xb4a0
cmpq %rbx, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun_system::open_config_conf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, scdc_args*, bool&)
bool scdc_dataprov_jobrun_system::open_config_conf(const std::string &conf, scdc_args *args, bool &done)
{
  done = true;
  bool ret = true;

  if (conf == "workdir")
  {
    const char *s;

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

    } else
    {
      if (!z_fs_is_directory(s))
      {
        SCDC_ERROR(__func__ << ": given work directory '" << s << "' is not a directory");
        ret = false;

      } else
      {
        workdir = s;

        if (*(workdir.end() - 1) != '/') workdir += '/';
      }
    }

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

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movb $0x1, (%rcx)
leaq 0x1560c(%rip), %rsi     # 0x53da4
movq %r12, %rdi
callq 0x19be0
testb %al, %al
je 0x3e811
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3e831
movq (%r14), %rdi
pushq $0x4
popq %rsi
movq %rsp, %rdx
callq *%rax
testq %rax, %rax
je 0x3e831
movq (%rsp), %rdi
callq 0x2d93f
testq %rax, %rax
je 0x3e8af
movq (%rsp), %rsi
leaq 0x270(%rbx), %r14
movq %r14, %rdi
callq 0xba40
movq 0x270(%rbx), %rax
movq 0x278(%rbx), %rcx
movb $0x1, %bl
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x3e8a1
pushq $0x2f
popq %rsi
movq %r14, %rdi
callq 0xb450
jmp 0x3e8a1
movb $0x0, (%r15)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3bf5c
leaq 0x36d48(%rip), %rbx     # 0x75580
movq (%rbx), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x3e89f
addq $0x20, %rdi
callq 0xb800
movq (%rbx), %rax
movq 0x18(%rax), %rdi
leaq 0x12c2f(%rip), %rsi     # 0x51488
callq 0xb520
leaq 0x15547(%rip), %rsi     # 0x53dac
movq %rax, %rdi
callq 0xb520
leaq 0x1520a(%rip), %rsi     # 0x53a7e
movq %rax, %rdi
callq 0xb520
leaq 0x15542(%rip), %rsi     # 0x53dc5
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%rbx), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x36cca(%rip), %rbx     # 0x75580
movq (%rbx), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x3e89f
addq $0x20, %rdi
callq 0xb800
movq (%rbx), %rax
movq 0x18(%rax), %rdi
leaq 0x12bb1(%rip), %rsi     # 0x51488
callq 0xb520
leaq 0x154c9(%rip), %rsi     # 0x53dac
movq %rax, %rdi
callq 0xb520
leaq 0x1518c(%rip), %rsi     # 0x53a7e
movq %rax, %rdi
callq 0xb520
leaq 0x154eb(%rip), %rsi     # 0x53dec
movq %rax, %rdi
callq 0xb520
movq (%rsp), %rsi
movq %rax, %rdi
callq 0xb520
leaq 0x1498c(%rip), %rsi     # 0x532a8
jmp 0x3e883
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun_handler::open(char const*, scdc_args*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_jobrun_handler::open(const char *conf, scdc_args *args, scdc_result &result)
{
  SCDC_TRACE(__func__ << ": '" << conf << "'");

  bool ret = true;

  args = open_args_init(args);

  if (args->get<scdc_dataprov_jobrun_handler_args_t>(SCDC_ARGS_TYPE_DATAPROV_JOBRUN_HANDLER, &handler_args, true) == SCDC_ARG_REF_NULL)
  {
    SCDC_ERROR("open: getting parameter for jobrun handler");
    ret = false;
    goto do_quit;
  }

  if (!scdc_dataprov_jobrun::open(conf, args, result))
  {
    SCDC_FAIL("open: opening base");
    ret = false;
  }

  SCDC_TRACE(__func__ << ": handler: '" << handler_args.handler << "', handler_data: '" << handler_args.data << "'");

  open_args_clear();

do_quit:
  if (!ret) open_args_release();

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x20a4e
movq %rax, %r12
leaq 0x270(%rbx), %rdx
pushq $0x10
popq %rsi
pushq $0x1
popq %rcx
movq %rax, %rdi
callq 0x411ae
testq %rax, %rax
je 0x3fc18
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x3c19e
testb %al, %al
je 0x3fc7d
movq 0x58(%rbx), %rax
andq $0x0, (%rax)
movb $0x1, %al
jmp 0x3fcee
leaq 0x35961(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x3fce4
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x18(%rax), %rdi
leaq 0x11844(%rip), %rsi     # 0x51488
callq 0xb520
leaq 0x14486(%rip), %rsi     # 0x540d6
movq %rax, %rdi
callq 0xb520
leaq 0x14491(%rip), %rsi     # 0x540f0
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x3fce4
leaq 0x358fc(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3fcdc
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x114e3(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x14425(%rip), %rsi     # 0x540d6
movq %rax, %rdi
callq 0xb520
leaq 0x12e1d(%rip), %rsi     # 0x52add
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
movq 0x58(%rbx), %rax
andq $0x0, (%rax)
movq %rbx, %rdi
callq 0x21786
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun_handler::job_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&, 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_handler::job_do_cmd(const std::string &jobid, const std::string &cmd, const std::string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
{
  bool ret = true;

  if (handler_args.handler)
  {
    scdc_result_t res = SCDC_RESULT_INIT_EMPTY;

    if (handler_args.handler(handler_args.data, jobid.c_str(), cmd.c_str(), params.c_str(), input, output, &res) != SCDC_SUCCESS)
    {
      result = string("jobrun handler failed: ") + SCDC_RESULT_STR(&res);
      SCDC_FAIL("job_do_cmd: " << result);
      ret = false;
    }
  }

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq 0x270(%rdi), %rbx
testq %rbx, %rbx
je 0x4024a
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x68(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
movq %r9, 0x18(%rsp)
movq %r8, %r14
callq 0xb2f0
leaq 0x68(%rsp), %rax
movq $0x200, -0x8(%rax)      # imm = 0x200
movq 0x278(%rbp), %rdi
movq (%r13), %rsi
movq (%r12), %rdx
movq (%r15), %rcx
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %r8
movq 0x18(%rsp), %r9
callq *%rbx
cmpq $0x1, %rax
sete %bl
je 0x4024c
leaq 0x13f97(%rip), %rsi     # 0x54127
leaq 0x20(%rsp), %r14
leaq 0x17(%rsp), %rdx
movq %r14, %rdi
callq 0x1a132
leaq 0x68(%rsp), %rdx
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x1cb18
movq 0x2a0(%rsp), %r14
leaq 0x40(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xb690
movq %r15, %rdi
callq 0xb230
leaq 0x20(%rsp), %rdi
callq 0xb230
leaq 0x3539b(%rip), %r15     # 0x75580
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4024c
addq $0x20, %rdi
callq 0xb800
movq (%r15), %rax
movq 0x8(%rax), %rdi
leaq 0x10f82(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x13ec4(%rip), %rsi     # 0x540d6
movq %rax, %rdi
callq 0xb520
leaq 0x13f1e(%rip), %rsi     # 0x5413f
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r14, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x4024c
movb $0x1, %bl
movl %ebx, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: sched_job_routine(void*)
static void *sched_job_routine(void *arg)
{
  sched_job_arg_t *sched_job_arg = static_cast<sched_job_arg_t *>(arg);

  SCDC_TRACE(__func__ << ": jobid: '" << sched_job_arg->jobid << "'");

  sched_job_arg->dataprov_jobrun->job_run(sched_job_arg->jobid, sched_job_arg->jobcmds.c_str(), sched_job_arg->jobres);

  pthread_mutex_lock(&sched_job_arg->dataprov_jobrun->sched_lock);
  sched_job_arg->dataprov_jobrun->sched_jobs_run.erase(sched_job_arg->jobid);
  sched_job_arg->dataprov_jobrun->sched->job_stopped(sched_job_arg->m, sched_job_arg->jobid, sched_job_arg->jobres);
  pthread_mutex_unlock(&sched_job_arg->dataprov_jobrun->sched_lock);

  pthread_cond_signal(&sched_job_arg->dataprov_jobrun->sched_cond);

  SCDC_TRACE(__func__ << ": return: jobid: '" << sched_job_arg->jobid << "'");

  delete sched_job_arg;

  pthread_exit(NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq (%rdi), %r12
leaq 0x8(%rdi), %r14
movq 0x28(%rdi), %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x1a132
leaq 0x48(%rbx), %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x3dea8
leaq 0x10(%rsp), %rdi
callq 0xb230
movl $0x190, %r12d           # imm = 0x190
movq (%rbx), %rdi
addq %r12, %rdi
callq 0xb800
movl $0x240, %edi            # imm = 0x240
addq (%rbx), %rdi
movq %r14, %rsi
callq 0x421f6
movq (%rbx), %rax
movq 0x60(%rbx), %rsi
movq 0x180(%rax), %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0x421fc
addq (%rbx), %r12
movq %r12, %rdi
callq 0xb3e0
movl $0x1b8, %edi            # imm = 0x1B8
addq (%rbx), %rdi
callq 0xb030
movq %rbx, %rdi
callq 0x4220e
pushq $0x68
popq %rsi
movq %rbx, %rdi
callq 0xb550
xorl %edi, %edi
callq 0xb9b0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: string_replace_all(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, 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&)
static void string_replace_all(string &str, const std::string &from, const std::string &to)
{
  size_t pos = 0;
  size_t from_n = from.size();
  size_t to_n = to.size();

  while ((pos = str.find(from, pos)) != string::npos)
  {
    str.replace(pos, from_n, to);
    pos += to_n;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rsi), %r12
movq 0x8(%rdx), %rbp
xorl %r13d, %r13d
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xbac0
cmpq $-0x1, %rax
je 0x4038e
movq %rax, %r13
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0xb1c0
addq %rbp, %r13
jmp 0x40361
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop