// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun_relay.cc
// Function: scdc_dataprov_jobrun_relay::relay_put(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>>&)
bool scdc_dataprov_jobrun_relay::relay_put(const std::string &path, const std::string &url, std::string &result)
{
  SCDC_TRACE("relay_put: path: '" << path << "', url: '" << url << "'");

  scdc_dataset_input_t *input = NULL;
  scdc_dataset_output_t output_, *output = &output_;

  output = scdc_dataset_output_create(output, "alloc");

  string cmd = url + "/CONFIG get type,max_parallel_jobs";

  bool ret = scdc_dataset_cmd(SCDC_DATASET_NULL, cmd.c_str(), input, output);

  if (ret)
  {
    string s = SCDC_DATASET_OUTPUT_STR_(output);
    stringlist sl(',', s.c_str(), s.size());

    if (sl.front_pop() != "jobrun")
    {
      result = "url '" + url + "' is not a jobrun datprovider";
      SCDC_FAIL("relay_put: " << result);
      ret = false;

    } else
    {
      ret = scdc_dataprov_relay::relay_put(path, url, result);

      if (ret)
      {
        stringstream ss(sl.front_pop());

        scdcint_t p;

        ss >> p;

        sched.insert(sched_t::value_type(path, scdc_dataprov_jobrun_relay_sched_t(p)));
        max_parallel_jobs += p;

        SCDC_TRACE("relay_put: schedule " << p << " jobs for path '" << path << "'");
        SCDC_TRACE("relay_put: max_parallel_jobs: " << max_parallel_jobs);
        SCDC_INFO("adding relay to '" << url << "' for path '" << path << "' with " << p << " max. parallel jobs (total max. parallel jobs: " << max_parallel_jobs << ")");
      }
    }

  } else
  {
    result = "accessing data provider '" + url + "' failed: ???";
    SCDC_FAIL("relay_put: " << result);
  }

  scdc_dataset_output_destroy(output);

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r12
leaq 0xd72b(%rip), %rsi      # 0x5202d
leaq 0x230(%rsp), %rdi
xorl %eax, %eax
callq 0x26bec
movq %rax, %r14
leaq 0xfa4b(%rip), %rdx      # 0x54366
leaq 0x88(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1d867
movq (%rbp), %rsi
movq %r14, %rbp
xorl %edi, %edi
xorl %edx, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1909c
testq %rax, %rax
movq %rbp, 0x38(%rsp)
je 0x44982
testq %rbp, %rbp
je 0x44a45
movq 0x10(%rbp), %rsi
testq %rsi, %rsi
je 0x44a60
leaq 0x50(%rsp), %rax
movq 0x20(%rbp), %rdx
addq %rsi, %rdx
movq %rax, -0x10(%rax)
leaq 0x40(%rsp), %rdi
callq 0x1a1f2
jmp 0x44a79
leaq 0xfa88(%rip), %rsi      # 0x54411
leaq 0x60(%rsp), %rdi
movq %r13, %rdx
callq 0x19ae2
leaq 0xfa8e(%rip), %rdx      # 0x5442b
leaq 0xa8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x1cb18
leaq 0xa8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x60(%rsp), %rdi
callq 0xb230
leaq 0x30ba5(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x44a3e
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0xc78c(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xf904(%rip), %rsi      # 0x5430c
movq %rax, %rdi
callq 0xb520
leaq 0xf997(%rip), %rsi      # 0x543ae
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r15, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %ebp, %ebp
jmp 0x44d48
leaq 0xf93d(%rip), %rsi      # 0x54389
leaq 0x40(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x1a132
jmp 0x44a79
leaq 0xda56(%rip), %rsi      # 0x524bd
leaq 0x40(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x1a132
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x60(%rsp), %rdi
pushq $0x2c
popq %rsi
callq 0x19b64
leaq 0xa8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x19ba0
leaq 0xc986(%rip), %rsi      # 0x5142f
leaq 0xa8(%rsp), %rbp
movq %rbp, %rdi
callq 0x1b1d7
movl %eax, %r14d
movq %rbp, %rdi
callq 0xb230
testb %r14b, %r14b
je 0x44b92
leaq 0xce00(%rip), %rsi      # 0x518d4
leaq 0x10(%rsp), %rdi
movq %r13, %rdx
callq 0x19ae2
leaq 0xf8a8(%rip), %rdx      # 0x54390
leaq 0xa8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1cb18
leaq 0xa8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x30a5a(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x44d32
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0xc63d(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xf7b5(%rip), %rsi      # 0x5430c
movq %rax, %rdi
callq 0xb520
leaq 0xf848(%rip), %rsi      # 0x543ae
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r15, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x44d32
movq %r12, %rbp
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x1e978
testb %al, %al
je 0x44d32
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x19ba0
leaq 0xa8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0xb8e0
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0xa8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xb780
movq 0x8(%rsp), %r14
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xb750
leaq 0x10(%rsp), %rsi
movq %r14, 0x20(%rsi)
leaq 0xc8(%rbp), %rdi
callq 0x46946
leaq 0x10(%rsp), %rdi
callq 0xb230
movq 0x8(%rsp), %rax
addq %rax, 0x128(%rbp)
leaq 0x3094e(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x44d20
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0xd291(%rip), %rsi      # 0x51ee8
callq 0xb520
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x44df9
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0xb490
leaq 0xf68f(%rip), %rsi      # 0x5430c
movq %rax, %rdi
callq 0xb520
leaq 0xf72e(%rip), %rsi      # 0x543ba
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r13, %rsi
callq 0xb490
leaq 0xf726(%rip), %rsi      # 0x543cc
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
leaq 0xf719(%rip), %rsi      # 0x543d9
movq %rax, %rdi
callq 0xb520
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0xb1d0
leaq 0xf705(%rip), %rsi      # 0x543e1
movq %rax, %rdi
callq 0xb520
movq 0x128(%rbp), %rsi
movq %rax, %rdi
callq 0xb1d0
leaq 0xdbf5(%rip), %rsi      # 0x528ef
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
leaq 0x10(%rsp), %rdi
callq 0xb230
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
leaq 0xa8(%rsp), %rdi
callq 0xb3d0
movb $0x1, %bpl
jmp 0x44d34
xorl %ebp, %ebp
leaq 0x60(%rsp), %rdi
callq 0x19ef4
leaq 0x40(%rsp), %rdi
callq 0xb230
movq 0x38(%rsp), %rdi
callq 0x26caa
leaq 0x88(%rsp), %rdi
callq 0xb230
movl %ebp, %eax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x44d83
jmp 0x44de1
jmp 0x44dac
jmp 0x44d83
jmp 0x44d88
jmp 0x44dc8
jmp 0x44de1
jmp 0x44de1
movq %rax, %rbx
jmp 0x44db9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb230
jmp 0x44dcb
jmp 0x44dc8
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x44dda
jmp 0x44de1
jmp 0x44dc8
movq %rax, %rbx
jmp 0x44dd5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0xa8(%rsp), %rdi
callq 0xb3d0
jmp 0x44dcb
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x19ef4
leaq 0x40(%rsp), %rdi
callq 0xb230
jmp 0x44de4
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0