// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun.cc
// Function: scdc_dataprov_jobrun::job_run(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::vector<scdc_dataprov_jobrun_res_proc_t, std::allocator<scdc_dataprov_jobrun_res_proc_t>> const&)
bool scdc_dataprov_jobrun::job_run(const std::string &jobid, const std::string &jobcmds, const scdc_dataprov_jobrun_res_t &res)
{
  SCDC_TRACE(__func__ << ": jobid: '" << jobid << "', jobcmds: '" << jobcmds << "', res: " << res.size());

  bool ret = true;

  bool record = false;
  string record_jobcmds;

  stringlist cmds(';', jobcmds);
  string s;
  while (cmds.front_pop(s))
  {
    SCDC_TRACE(__func__ << ": cmd: '" << s << "'");

    stringlist cmd(' ', s);
    string c = cmd.front_pop();
    string p = cmd.conflate();

    if (c == "jobbegin")
    {
      SCDC_TRACE(__func__ << ": begin");

      if (!record) record = true;

    } else if (c == "jobend")
    {
      SCDC_TRACE(__func__ << ": end");

      if (record)
      {
        record = false;

        scdc_dataprov_jobrun_job_t job;

        pthread_mutex_lock(&sched_lock);
        get_job(jobid, job);
        job.jobcmds = record_jobcmds;
        set_job(jobid, job);
        pthread_mutex_unlock(&sched_lock);

        job_schedule(jobid);
      }

    } else if (record)
    {
      SCDC_TRACE(__func__ << ": record: '" << s << "'");

      record_jobcmds += s + ";";

    } else if (c == "jobwait")
    {
      SCDC_TRACE(__func__ << ": wait");

      job_wait_finished(jobid);

    } else
    {
      SCDC_TRACE(__func__ << ": run:");

      ret = job_do_run(jobid, c, p, res);

      SCDC_TRACE(__func__ << ": run: " << ret);
    }
  }

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rcx, 0x28(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xf8(%rsp), %rdi
movq %rdx, %rsi
callq 0xb750
leaq 0x118(%rsp), %rdi
pushq $0x3b
popq %rsi
leaq 0xf8(%rsp), %rdx
callq 0x2f05c
leaq 0xf8(%rsp), %rdi
callq 0xb230
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rbx, 0x18(%rsp)
leaq 0x190(%rbx), %rax
movq %rax, 0x20(%rsp)
movb $0x1, 0xf(%rsp)
leaq 0xd8(%rsp), %rbx
leaq 0x160(%rsp), %r13
leaq 0x180(%rsp), %rbp
leaq 0x140(%rsp), %r14
xorl %r15d, %r15d
leaq 0x118(%rsp), %rdi
movq %rbx, %rsi
callq 0x19f34
testb %al, %al
je 0x3e14e
movq %r13, %rdi
movq %rbx, %rsi
callq 0xb750
movq %rbp, %rdi
pushq $0x20
popq %rsi
movq %r13, %rdx
callq 0x2f05c
movq %r13, %rdi
callq 0xb230
movq %r14, %rdi
movq %rbp, %rsi
callq 0x19ba0
leaq 0xb8(%rsp), %rdi
movq %rbp, %rsi
callq 0x1ca32
movq %r14, %rdi
leaq 0x15da1(%rip), %rsi     # 0x53d5b
callq 0x19be0
testb %al, %al
je 0x3dff4
testb $0x1, %r15b
movzbl %r15b, %r15d
pushq $0x1
popq %rax
cmovel %eax, %r15d
leaq 0xb8(%rsp), %rdi
callq 0xb230
movq %r14, %rdi
callq 0xb230
movq %rbp, %rdi
callq 0x19ef4
jmp 0x3df5c
movq %r14, %rdi
leaq 0x15d66(%rip), %rsi     # 0x53d64
callq 0x19be0
testb %al, %al
je 0x3e0c4
testb $0x1, %r15b
je 0x3dfd2
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
andq $0x0, 0x58(%rsp)
xorl %ecx, %ecx
movb %cl, 0x60(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
andq $0x0, 0x78(%rsp)
movb %cl, 0x80(%rsp)
movb $0x1, 0x90(%rsp)
movq 0x20(%rsp), %rdi
callq 0xb800
movq 0x18(%rsp), %r15
movq %r15, %rdi
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x3dc2c
leaq 0x70(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xb2e0
movq %r15, %rdi
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x3db60
movq 0x20(%rsp), %rdi
callq 0xb3e0
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x3e246
leaq 0x30(%rsp), %rdi
callq 0x4113a
xorl %r15d, %r15d
jmp 0x3dfd2
testb $0x1, %r15b
je 0x3e0fe
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
leaq 0x15c8f(%rip), %rdx     # 0x53d6b
callq 0x1d867
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0xba90
movq %r12, %rdi
callq 0xb230
jmp 0x3dfd2
movq %r14, %rdi
leaq 0x15c65(%rip), %rsi     # 0x53d6d
callq 0x19be0
testb %al, %al
je 0x3e125
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3e28e
jmp 0x3dfd2
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rsp), %rsi
movq %r14, %rdx
leaq 0xb8(%rsp), %rcx
movq 0x28(%rsp), %r8
callq *0x70(%rax)
movb %al, 0xf(%rsp)
jmp 0x3dfd2
leaq 0xd8(%rsp), %rdi
callq 0xb230
leaq 0x118(%rsp), %rdi
callq 0x19ef4
leaq 0x98(%rsp), %rdi
callq 0xb230
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0xb230
jmp 0x3e231
movq %rax, %rbx
jmp 0x3e231
jmp 0x3e1ac
movq %rax, %rbx
jmp 0x3e1cd
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb230
jmp 0x3e1cd
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4113a
leaq 0xb8(%rsp), %rdi
callq 0xb230
jmp 0x3e1e1
jmp 0x3e214
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0xb230
jmp 0x3e1f3
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x19ef4
jmp 0x3e217
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0xb230
jmp 0x3e217
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0xb230
leaq 0x118(%rsp), %rdi
callq 0x19ef4
leaq 0x98(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0