LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movq %rdi, %rbx
movq 0x80(%rdi), %r13
testq %r13, %r13
je 0x4bc34
movq %rdx, %r12
movq %rsp, %r15
movl $0x208, %edx            # imm = 0x208
movq %r15, %rdi
xorl %esi, %esi
callq 0xb2d0
movq $0x200, (%r15)          # imm = 0x200
movq 0xb8(%rbx), %rdi
movq (%r14), %rsi
movq %r15, %rdx
callq *%r13
movq %rax, %r15
leaq 0x8(%rsp), %r13
movq 0x8(%r12), %rbp
movq %r13, %rdi
callq 0xb200
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0xb870
testq %r15, %r15
jne 0x4bc37
leaq 0x409fd(%rip), %rbp     # 0x8c570
movq (%rbp), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4bc2b
addq $0x20, %rdi
callq 0xb7d0
movq (%rbp), %rax
movq 0x8(%rax), %r13
leaq 0x1e5ee(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r13, %rdi
callq 0xb5f0
leaq 0x20c6c(%rip), %rsi     # 0x6c81a
movl $0xf, %edx
movq %r13, %rdi
callq 0xb5f0
leaq 0x1e927(%rip), %rsi     # 0x6a4e9
movl $0xc, %edx
movq %r13, %rdi
callq 0xb5f0
leaq 0x20cc7(%rip), %rsi     # 0x6c89d
movl $0x24, %edx
movq %r13, %rdi
callq 0xb5f0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r13, %rdi
callq 0xb5f0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r12, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%rbp), %rdi
addq $0x20, %rdi
callq 0xb3b0
testq %r15, %r15
jne 0x4bc37
xorl %eax, %eax
jmp 0x4bc74
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %r12, 0x8(%r14)
movq (%r14), %rax
movb %r12b, (%rax)
movl $0x40, %edi
callq 0xb500
movq %rbx, 0x8(%rax)
movb %r12b, 0x10(%rax)
leaq 0x28(%rax), %rcx
movq %rcx, 0x18(%rax)
movq %r12, 0x20(%rax)
movb %r12b, 0x28(%rax)
leaq 0x3f25b(%rip), %rcx     # 0x8aec8
movq %rcx, (%rax)
movq %r15, 0x38(%rax)
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movq 0x88(%rdi), %r13
testq %r13, %r13
je 0x4bdcf
movq %rdx, %r15
movq %rdi, %r14
movq %rsp, %r12
movl $0x208, %edx            # imm = 0x208
movq %r12, %rdi
xorl %esi, %esi
callq 0xb2d0
movq $0x200, (%r12)          # imm = 0x200
movq 0xb8(%r14), %rdi
movq 0x38(%rbx), %rsi
movq %r12, %rdx
callq *%r13
movq %rax, %r14
leaq 0x8(%rsp), %r12
movq 0x8(%r15), %r13
movq %r12, %rdi
callq 0xb200
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0xb870
cmpq $0x1, %r14
je 0x4bdcf
leaq 0x4085d(%rip), %r13     # 0x8c570
movq (%r13), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4bdc9
addq $0x20, %rdi
callq 0xb7d0
movq (%r13), %rax
movq 0x8(%rax), %r12
leaq 0x1e44e(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r12, %rdi
callq 0xb5f0
leaq 0x20acc(%rip), %rsi     # 0x6c81a
movl $0xf, %edx
movq %r12, %rdi
callq 0xb5f0
leaq 0x1e45a(%rip), %rsi     # 0x6a1bc
movl $0xd, %edx
movq %r12, %rdi
callq 0xb5f0
leaq 0x20b4c(%rip), %rsi     # 0x6c8c2
movl $0x24, %edx
movq %r12, %rdi
callq 0xb5f0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0xb5f0
movq %rax, %r15
movq (%rax), %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 $0x1, %r14
jne 0x4bde2
movb $0x1, %bpl
testq %rbx, %rbx
je 0x4bde4
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x4bde4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq 0x8(%rdi), %r15
leaq 0x20(%rsp), %r14
movl $0x208, %edx            # imm = 0x208
movq %r14, %rdi
xorl %esi, %esi
callq 0xb2d0
movq $0x200, (%r14)          # imm = 0x200
movq 0xb8(%r15), %rdi
movq 0x38(%rbp), %rsi
movq (%r13), %rdx
movq (%r12), %rcx
movq %r14, (%rsp)
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
callq *0xa0(%r15)
movq %rax, %r14
leaq 0x28(%rsp), %r15
movq 0x8(%rbx), %r12
movq %r15, %rdi
callq 0xb200
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0xb870
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_O1/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, %r14
movq %rdi, %r15
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 0x1d19a
movq 0x10(%r14), %rax
movq %rax, 0x30(%r12)
movups (%r14), %xmm0
movups %xmm0, 0x20(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x56014
movl %edx, %ebx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4cc5a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
testb $0x1, %bl
je 0x4cc79
movq (%r14), %rax
addq %rax, 0xb8(%r15)
movq 0x8(%r14), %rax
addq %rax, 0xc0(%r15)
jmp 0x4cd09
leaq 0x3f8f0(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4cd09
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1d4e7(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1fdb7(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1ff74(%rip), %rsi     # 0x6cc3d
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 0x4cd36
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movq %rsi, %r12
movq %rdi, %r14
movb $0x1, (%rcx)
leaq 0x1c9b4(%rip), %rsi     # 0x69713
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x4cdb5
leaq 0x1fcf3(%rip), %rsi     # 0x6ca65
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x4cdb5
leaq 0x1fd0a(%rip), %rsi     # 0x6ca8f
movq %r12, %rdi
callq 0xb110
testl %eax, %eax
je 0x4ceb2
movb $0x0, (%r15)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r15, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x35dc0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x4cdd5
movq (%rbx), %rdi
leaq 0x8(%rsp), %rdx
movl $0x4, %esi
callq *%rax
testq %rax, %rax
setne %bl
jmp 0x4cdd7
xorl %ebx, %ebx
testb %bl, %bl
je 0x4ce08
movq 0x8(%rsp), %r15
movq 0x70(%r14), %r12
addq $0x68, %r14
movq %r15, %rdi
callq 0xb200
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0xb870
jmp 0x4cefa
leaq 0x3f761(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x4cefa
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0x1d654(%rip), %rsi     # 0x6a488
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1fc24(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1fc22(%rip), %rsi     # 0x6ca7e
movl $0x10, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1ff99(%rip), %rsi     # 0x6ce09
movl $0x23, %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
jmp 0x4cefa
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1fb9d(%rip), %rsi     # 0x6ca5f
leaq 0x1fb9b(%rip), %rdx     # 0x6ca64
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1bee6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4cf2a
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4cef8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %bl
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4cf22
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x561d8
leaq 0x90(%rbx), %rcx
cmpq %rcx, %rax
je 0x4cf5e
movq 0x40(%rax), %r12
movq 0x48(%rax), %r13
jmp 0x4cf64
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movq %r15, %rsi
callq 0x56262
movq 0xb0(%rbx), %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x5630a
subq 0xb0(%rbx), %r15
testq %r15, %r15
jle 0x4cfa0
subq %r12, 0xb8(%rbx)
subq %r13, 0xc0(%rbx)
jmp 0x4d030
leaq 0x3f5c9(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4d030
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x1d1c0(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x1fa90(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x1fc6a(%rip), %rsi     # 0x6cc5a
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
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2957(%rip), %rdx      # 0x4fcdc
xorl %esi, %esi
movq %rbx, %rcx
popq %rbx
jmp 0xba00
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4d422
movq 0x258(%rbx), %rax
movq 0x40(%rax), %r12
movq %r14, %rdi
callq 0xb3b0
movq %r12, %rdi
jmp 0x4d3f1
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 0x4d48c
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x4d474
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
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5685a
leaq 0x130(%rbx), %rcx
cmpq %rcx, %rax
je 0x4e911
movl %ebp, 0xc(%rsp)
testb %bpl, %bpl
jne 0x4e8b6
leaq 0x190(%rbx), %rdi
callq 0xb7d0
leaq 0x228(%rbx), %rbp
movq 0x228(%rbx), %r12
movq %r15, 0x10(%rsp)
cmpq %rbp, %r12
je 0x4e8eb
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x568a0
testb %al, %al
jne 0x4e8eb
movq (%r12), %r12
cmpq %rbp, %r12
jne 0x4e8d3
cmpq %rbp, %r12
je 0x4e92e
movq 0x8(%r14), %rdx
leaq 0x1e3f4(%rip), %rcx     # 0x6ccef
movl $0x7, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
movl 0xc(%rsp), %ebp
jmp 0x4e977
movq 0x8(%r14), %rdx
leaq 0x1b11d(%rip), %rcx     # 0x69a39
movl $0x7, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
jmp 0x4e98b
leaq 0x240(%rbx), %rdi
movq %r15, %rsi
callq 0x568d2
leaq 0x248(%rbx), %rcx
movq 0x8(%r14), %rdx
cmpq %rcx, %rax
movl 0xc(%rsp), %ebp
je 0x4e960
leaq 0x1f139(%rip), %rcx     # 0x6da91
movl $0x7, %r8d
jmp 0x4e96d
leaq 0x1e390(%rip), %rcx     # 0x6ccf7
movl $0x4, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
testb %bpl, %bpl
jne 0x4e98b
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
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1b960(%rip), %rsi     # 0x6a344
movl $0x1, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x238(%r15), %rsi
movq %r12, %rdi
callq 0xb330
movq %rax, %r12
leaq 0x1b93a(%rip), %rsi     # 0x6a344
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 0x4ea63
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x3d546(%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 0x4ea94
movq %rax, %rbx
movq 0x3d512(%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_O1/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 0x561d8
movq %rax, %r14
addq $0x90, %rbx
cmpq %rbx, %rax
je 0x4eb09
movq 0x50(%r14), %rax
movq %rax, 0x10(%r15)
movups 0x40(%r14), %xmm0
movups %xmm0, (%r15)
jmp 0x4eba0
leaq 0x3da60(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4eba0
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x1b651(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1df21(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1e11a(%rip), %rsi     # 0x6cc79
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_O1/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 0x561d8
movq %rax, %r14
addq $0x90, %rbx
cmpq %rbx, %rax
je 0x4ec13
testq %r12, %r12
js 0x4ebec
movq %r12, 0x40(%r14)
testq %r15, %r15
js 0x4ebf5
movq %r15, 0x48(%r14)
xorpd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x4ecaa
movsd %xmm1, 0x50(%r14)
jmp 0x4ecaa
leaq 0x3d956(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4ecaa
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x1b547(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1de17(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x1e02e(%rip), %rsi     # 0x6cc97
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_O1/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 0x5685a
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x4f175
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x50(%r15)
movups %xmm0, 0x40(%r15)
leaq 0x60(%r15), %rdi
leaq 0x20(%r14), %rsi
callq 0xb2c0
leaq 0x80(%r15), %rdi
leaq 0x40(%r14), %rsi
callq 0xb2c0
movb 0x60(%r14), %al
movb %al, 0xa0(%r15)
cmpq %rbx, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq $0x0, 0x8(%rbx)
jg 0x4f1b0
movq $0x1, 0x8(%rbx)
cmpq $0x0, (%rbx)
jg 0x4f1bd
movq 0x8(%rbx), %rax
movq %rax, (%rbx)
cmpq $0x0, 0x18(%rbx)
jg 0x4f1cc
movq $0x1, 0x18(%rbx)
cmpq $0x0, 0x10(%rbx)
jg 0x4f1db
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rbx)
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5685a
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x4f212
leaq 0x40(%r15), %rsi
movq %r14, %rdx
callq 0x4f182
cmpq %rbx, %r15
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5685a
movq %rax, %r15
addq $0x130, %rbx            # imm = 0x130
cmpq %rbx, %rax
je 0x4f27f
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
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::job_create(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_create(const std::string &jobid, scdc_dataprov_jobrun_job_params_t &job_params)
{
  scdc_dataprov_jobrun_job_t job;

  bool ret = set_job_params(job, job_params);

  if (ret)
  {
    pthread_mutex_lock(&sched_lock);
    ret = add_job(jobid, job);
    pthread_mutex_unlock(&sched_lock);
  }

  if (!ret)
  {
    SCDC_FAIL("job_create: adding job failed");
    return false;
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%r12)
movaps %xmm0, -0x30(%r12)
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
movb $0x1, 0x10(%r13)
movq %rsp, %rsi
callq 0x4f182
leaq 0x190(%r14), %r15
movq %r15, %rdi
callq 0xb7d0
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4ecbc
movl %eax, %ebx
movq %r15, %rdi
callq 0xb3b0
testb %bl, %bl
jne 0x4f3a0
leaq 0x3d259(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4f3a0
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1ae50(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1d720(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1d99c(%rip), %rsi     # 0x6ccfc
movl $0x1d, %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
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x4f3b7
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x4f3ce
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5445e
movq %rbx, %rdi
callq 0xb9c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xb7d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4ef12
movl %eax, %ebx
movq %r15, %rdi
callq 0xb3b0
testb %bl, %bl
jne 0x4f4b9
leaq 0x3d140(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4f4b9
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1ad37(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1d607(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1d8a1(%rip), %rsi     # 0x6cd1a
movl $0x20, %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
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xb7d0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4f1e0
movl %eax, %ebx
movq %r12, %rdi
callq 0xb3b0
testb %bl, %bl
jne 0x4f592
leaq 0x3d067(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4f592
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1ac5e(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1d52e(%rip), %rsi     # 0x6ca6c
movl $0x11, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1d7e9(%rip), %rsi     # 0x6cd3b
movl $0x1f, %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
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x190(%rdi), %r15
movq %r15, %rdi
callq 0xb7d0
leaq 0x228(%r14), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x56918
movq %rax, %rdi
movq %r12, %rsi
callq 0xb090
incq 0x238(%r14)
movq %r15, %rdi
callq 0xb3b0
addq $0x1b8, %r14            # imm = 0x1B8
movq %r14, %rdi
callq 0xb030
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::job_wait_finished(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool scdc_dataprov_jobrun::job_wait_finished(const std::string &jobid)
{
  SCDC_TRACE(__func__ << ": jobid: '" << jobid << "'");

  scdc_dataprov_jobrun_job_t job;

  pthread_mutex_lock(&sched_lock);
  get_job(jobid, job);
  while (job.waiting)
  {
    pthread_cond_wait(&sched_cond_finished, &sched_lock);
    get_job(jobid, job);
  }
  pthread_mutex_unlock(&sched_lock);

  job_wait_running(jobid);

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rsp), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rcx)
movaps %xmm0, -0x30(%rcx)
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
movb $0x1, 0x10(%rbp)
leaq 0x190(%rdi), %r15
movq %r15, %rdi
callq 0xb7d0
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4f21e
leaq 0x1e8(%r14), %r12
movq %rsp, %r13
cmpb $0x1, 0x60(%rsp)
jne 0x4fc05
movq %r12, %rdi
movq %r15, %rsi
callq 0xb840
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x4f21e
jmp 0x4fbe3
movq %r15, %rdi
callq 0xb3b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4fc72
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4fc2f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4fc4b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fc5e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5445e
movq %rbx, %rdi
callq 0xb9c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xb7d0
leaq 0x240(%rbx), %rdi
movq %r14, %rsi
callq 0x568d2
movq %rax, %r14
addq $0x248, %rbx            # imm = 0x248
cmpq %rbx, %rax
je 0x4fcb3
movq 0x40(%r14), %r12
jmp 0x4fcb3
movq %r15, %rdi
callq 0xb3b0
cmpq %rbx, %r14
je 0x4fcca
movq %r12, %rdi
xorl %esi, %esi
callq 0xb460
cmpq %rbx, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x25258
movq %rax, %r12
leaq 0x270(%rbx), %rdx
movl $0x10, %esi
movq %rax, %rdi
movl $0x1, %ecx
callq 0x54496
testq %rax, %rax
je 0x520c3
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4d040
movl %eax, %ebp
testb %al, %al
jne 0x520b3
leaq 0x3a546(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x520b3
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1813d(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1b077(%rip), %rsi     # 0x6d0d6
movl $0x19, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x19aba(%rip), %rsi     # 0x6bb2d
movl $0x12, %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
movq 0x58(%rbx), %rax
movq $0x0, (%rax)
jmp 0x52155
leaq 0x3a4a6(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x52153
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0x1839d(%rip), %rsi     # 0x6a488
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1afd7(%rip), %rsi     # 0x6d0d6
movl $0x19, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1afdd(%rip), %rsi     # 0x6d0f0
movl $0x2a, %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
xorl %ebp, %ebp
testb %bpl, %bpl
jne 0x52162
movq %rbx, %rdi
callq 0x268bc
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun_handler::close(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_dataprov_jobrun_handler::close(scdc_result &result)
{
  SCDC_TRACE(__func__ << ":");

  bool ret = scdc_dataprov_jobrun::close(result);

  open_args_release();

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

  return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4d3b2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x362ac
movl %eax, %ebx
movq %r14, %rdi
callq 0x268bc
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1bdd6
leaq 0x48(%rbx), %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x4f5a0
leaq 0x10(%rsp), %rdi
callq 0xb210
movl $0x190, %r12d           # imm = 0x190
movq (%rbx), %rdi
addq %r12, %rdi
callq 0xb7d0
movl $0x240, %edi            # imm = 0x240
addq (%rbx), %rdi
movq %r14, %rsi
callq 0x557ea
movq (%rbx), %rax
movq 0x60(%rbx), %rsi
movq 0x180(%rax), %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0x55814
addq (%rbx), %r12
movq %r12, %rdi
callq 0xb3b0
movl $0x1b8, %edi            # imm = 0x1B8
addq (%rbx), %rdi
callq 0xb030
movq %rbx, %rdi
callq 0x55844
movl $0x68, %esi
movq %rbx, %rdi
callq 0xb510
xorl %edi, %edi
callq 0xb9d0
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52b42
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/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 (%rsi), %rsi
movq 0x8(%r14), %r12
movq 0x8(%rdx), %rbp
xorl %edx, %edx
movq %r12, %rcx
callq 0xb9b0
cmpq $-0x1, %rax
je 0x52baf
movq %rax, %r13
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xb5d0
addq %rbp, %r13
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
movq %r13, %rdx
callq 0xb9b0
movq %rax, %r13
cmpq $-0x1, %rax
jne 0x52b7c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq