// File: /workspace/github_cpp_makefile_star2_O1/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, 0xd0(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x148(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x138(%rsp), %rdi
callq 0x1d19a
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rdx
movl $0x3b, %esi
callq 0x37d96
movq 0x138(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4f635
movq 0x148(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x128(%rsp), %rbx
movq 0x10(%rsp), %rax
addq $0x190, %rax            # imm = 0x190
movq %rax, 0xc8(%rsp)
movb $0x1, 0xf(%rsp)
leaq 0x118(%rsp), %r13
leaq 0x180(%rsp), %rbp
leaq 0xf8(%rsp), %r14
xorl %r12d, %r12d
leaq 0x158(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1bbc4
testb %al, %al
je 0x4f975
movq %rbx, 0x118(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x1d19a
movq %rbp, %rdi
movl $0x20, %esi
movq %r13, %rdx
callq 0x37d96
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4f6e8
movq 0x128(%rsp), %rsi
incq %rsi
callq 0xb510
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1b92c
movl 0x198(%rsp), %edx
leaq 0xd8(%rsp), %rdi
movq %rbp, %rsi
callq 0x1f196
movq %r14, %rdi
leaq 0x1d647(%rip), %rsi     # 0x6cd5b
callq 0xb110
testl %eax, %eax
je 0x4f7ae
movq %r14, %rdi
leaq 0x1d639(%rip), %rsi     # 0x6cd64
callq 0xb110
testl %eax, %eax
je 0x4f7c4
testb $0x1, %r12b
je 0x4f8d3
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x1d19a
movq %r15, %rdi
leaq 0x1d5fb(%rip), %rsi     # 0x6cd6b
callq 0xba60
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0xb150
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x4f91e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x4f91e
testb $0x1, %r12b
movzbl %r12b, %r12d
movl $0x1, %eax
cmovel %eax, %r12d
jmp 0x4f91e
testb $0x1, %r12b
je 0x4f91e
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x88(%rsp)
movb %cl, 0x90(%rsp)
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq %rcx, 0xa8(%rsp)
movb %cl, 0xb0(%rsp)
movb $0x1, 0xc0(%rsp)
movq 0xc8(%rsp), %r12
movq %r12, %rdi
callq 0xb7d0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x4f21e
leaq 0xa0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xb2c0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x4f114
movq %r12, %rdi
callq 0xb3b0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x4fb12
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x4f8a9
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x4f8ce
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xb510
xorl %r12d, %r12d
jmp 0x4f91e
movq %r14, %rdi
leaq 0x1d490(%rip), %rsi     # 0x6cd6d
callq 0xb110
testl %eax, %eax
je 0x4f90f
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq 0x18(%rsp), %rsi
movq %r14, %rdx
leaq 0xd8(%rsp), %rcx
movq 0xd0(%rsp), %r8
callq *0x70(%rax)
movb %al, 0xf(%rsp)
jmp 0x4f91e
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x4fb78
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x4f943
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x4f968
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbp, %rdi
callq 0x1bb7e
jmp 0x4f684
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4f991
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x158(%rsp), %rdi
callq 0x1bb7e
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x4f9ba
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
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, %r14
movq 0x138(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4faf2
movq 0x148(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x4faf2
movq %rax, %r14
jmp 0x4faf2
jmp 0x4fa0c
jmp 0x4fa07
movq %rax, %r14
jmp 0x4fa3a
movq %rax, %r14
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x4fa3a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x4fa3a
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x5445e
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x4fa8d
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x4fa8d
jmp 0x4fac1
movq %rax, %r14
jmp 0x4fab2
movq %rax, %r14
movq 0x118(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4fac4
movq 0x128(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x4fac4
movq %rax, %r14
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x4fab2
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x180(%rsp), %rdi
callq 0x1bb7e
jmp 0x4fac4
movq %rax, %r14
leaq 0x50(%rsp), %r12
leaq 0x30(%rsp), %rax
movq 0x20(%rsp), %rdi
cmpq %rax, %rdi
je 0x4fae5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x158(%rsp), %rdi
callq 0x1bb7e
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x4fb09
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
movq %r14, %rdi
callq 0xb9c0
nop