// File: 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
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0xc470
movq -0x218(%rbp), %rdi
addq $0x190, %rdi            # imm = 0x190
callq 0xc9f0
movq -0x218(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x83690
movq %rax, -0x1b8(%rbp)
movq -0x218(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x836f0
movq %rax, -0x1c0(%rbp)
leaq -0x1b8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x836c0
testb $0x1, %al
jne 0x7c929
jmp 0x7cb28
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0xc960
leaq -0x1b8(%rbp), %rdi
callq 0x83720
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rdx
movq %rax, %rsi
movl $0x1, %ecx
callq 0x7cc10
jmp 0x7c965
leaq -0x1a0(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x83720
movq -0x230(%rbp), %rdi
movq %rax, %rsi
callq 0xc5b0
movq %rax, -0x228(%rbp)
jmp 0x7c997
movq -0x228(%rbp), %rdi
leaq 0x299bf(%rip), %rsi     # 0xa6364
callq 0xc670
movq %rax, -0x238(%rbp)
jmp 0x7c9b3
leaq -0x1b8(%rbp), %rdi
callq 0x83720
movq -0x238(%rbp), %rdi
movq 0x20(%rax), %rsi
callq 0xc340
movq %rax, -0x240(%rbp)
jmp 0x7c9d8
movq -0x240(%rbp), %rdi
leaq 0x2c24d(%rip), %rsi     # 0xa8c33
callq 0xc670
movq %rax, -0x248(%rbp)
jmp 0x7c9f4
leaq -0x1b8(%rbp), %rdi
callq 0x83720
movq -0x248(%rbp), %rdi
movq 0x28(%rax), %rsi
callq 0xc340
movq %rax, -0x250(%rbp)
jmp 0x7ca19
movq -0x250(%rbp), %rdi
leaq 0x2993d(%rip), %rsi     # 0xa6364
callq 0xc670
movq %rax, -0x258(%rbp)
jmp 0x7ca35
leaq -0x1b8(%rbp), %rdi
callq 0x83720
movq -0x258(%rbp), %rdi
movq 0x30(%rax), %rsi
callq 0xc340
movq %rax, -0x260(%rbp)
jmp 0x7ca5a
movq -0x260(%rbp), %rdi
leaq 0x2c1cb(%rip), %rsi     # 0xa8c33
callq 0xc670
movq %rax, -0x268(%rbp)
jmp 0x7ca76
leaq -0x1b8(%rbp), %rdi
callq 0x83720
movq -0x268(%rbp), %rdi
movq 0x38(%rax), %rsi
callq 0xc340
movq %rax, -0x270(%rbp)
jmp 0x7ca9b
movq -0x270(%rbp), %rdi
leaq 0x298bb(%rip), %rsi     # 0xa6364
callq 0xc670
movq %rax, -0x278(%rbp)
jmp 0x7cab7
movq -0x278(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x280(%rbp)
jmp 0x7cad3
movq -0x280(%rbp), %rdi
leaq 0x29d88(%rip), %rsi     # 0xa6869
callq 0xc670
jmp 0x7cae8
leaq -0x1e0(%rbp), %rdi
callq 0xc3e0
leaq -0x1b8(%rbp), %rdi
callq 0x83740
jmp 0x7c8f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0xc3e0
jmp 0x7cbf6
movq -0x218(%rbp), %rdi
addq $0x190, %rdi            # imm = 0x190
callq 0xc4c0
leaq -0x210(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xc650
jmp 0x7cb50
leaq -0x210(%rbp), %rdi
callq 0xc460
cmpq $0x0, %rax
jbe 0x7cbbf
leaq -0x210(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0xc460
movq -0x288(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0xc940
jmp 0x7cb89
jmp 0x7cbbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x7cbf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x210(%rbp), %rdi
callq 0xc3e0
jmp 0x7cbf6
movq -0x28(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0xc070
jmp 0x7cbd1
leaq -0x210(%rbp), %rdi
callq 0xc3e0
leaq -0x1b0(%rbp), %rdi
callq 0xc4b0
movb $0x1, %al
andb $0x1, %al
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
leaq -0x1b0(%rbp), %rdi
callq 0xc4b0
movq -0x1e8(%rbp), %rdi
callq 0xcba0
nop