// File: /workspace/github_cpp_makefile_star2_O1/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 $0x398, %rsp            # imm = 0x398
movq %rcx, 0x8(%rsp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
leaq 0x1271d(%rip), %rsi     # 0x6b07d
leaq 0x340(%rsp), %rdi
xorl %eax, %eax
callq 0x2d6d3
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
callq 0x1d19a
leaq 0x149cc(%rip), %rsi     # 0x6d366
movq %rbp, %rdi
callq 0xba60
movq 0x38(%rsp), %rsi
xorl %edi, %edi
xorl %edx, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1aba8
testq %rax, %rax
movq %rbx, 0x78(%rsp)
je 0x589f3
leaq 0x28(%rsp), %rax
testq %rbx, %rbx
je 0x58a5b
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x58a78
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
callq 0x1bee6
jmp 0x58a8f
leaq 0x14a17(%rip), %rsi     # 0x6d411
leaq 0xb0(%rsp), %rdi
movq %r13, %rdx
callq 0x1b85e
leaq 0x14a1a(%rip), %rsi     # 0x6d42b
leaq 0xb0(%rsp), %rdi
callq 0xba60
movq 0x8(%rsp), %rdi
leaq 0x1c8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x58f92
movq %rdx, 0x1b8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1c8(%rsp)
jmp 0x58f9a
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x1491f(%rip), %rsi     # 0x6d389
leaq 0x1491e(%rip), %rdx     # 0x6d38f
callq 0x1bee6
jmp 0x58a8f
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x12a86(%rip), %rdx     # 0x6b50d
movq %rdx, %rsi
callq 0x1bee6
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
leaq 0x80(%rsp), %rdi
movl $0x2c, %esi
callq 0x1b8f2
leaq 0x1b8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x1b92c
leaq 0x11968(%rip), %rsi     # 0x6a42f
leaq 0x1b8(%rsp), %r14
movq %r14, %rdi
callq 0xb110
movl %eax, %ebp
movq (%r14), %rdi
leaq 0x1c8(%rsp), %rbx
cmpq %rbx, %rdi
je 0x58af9
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0xb510
testl %ebp, %ebp
je 0x58b60
leaq 0x11e1b(%rip), %rsi     # 0x6a91f
leaq 0xb0(%rsp), %rdi
movq %r13, %rdx
callq 0x1b85e
leaq 0x14875(%rip), %rsi     # 0x6d390
leaq 0xb0(%rsp), %rdi
callq 0xba60
movq 0x8(%rsp), %r15
movq %rbx, 0x1b8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x58e4c
movq %rdx, 0x1b8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1c8(%rsp)
jmp 0x58e52
movq %r12, %rdi
movq %r15, %rbx
movq %r15, %rsi
movq %r13, %rdx
movq 0x8(%rsp), %rcx
callq 0x21c56
movl %eax, %ebp
testb %al, %al
je 0x58f60
leaq 0xb0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x1b92c
leaq 0x1b8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl $0x18, %edx
callq 0xb8d0
leaq 0xc0(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x58bd0
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x1b8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xb750
movq 0x10(%rsp), %r15
leaq 0xb0(%rsp), %rdi
movq %r14, (%rdi)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
callq 0x1d19a
leaq 0xb0(%rsp), %rsi
movq %r15, 0x20(%rsi)
leaq 0xc8(%r12), %rdi
callq 0x5bd80
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x58c37
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x10(%rsp), %rax
addq %rax, 0x128(%r12)
leaq 0x33925(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x58e26
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %r15
leaq 0x122c8(%rip), %rsi     # 0x6af38
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
xorl %edi, %edi
callq 0xb4a0
leaq 0xa8(%rsp), %rdi
movq %rax, (%rdi)
callq 0xb3a0
movl 0xc(%rax), %edx
movl 0x10(%rax), %ecx
movl $0x76c, %r8d            # imm = 0x76C
addl 0x14(%rax), %r8d
incl %ecx
movl 0x8(%rax), %r9d
movl (%rax), %r10d
movl 0x4(%rax), %r11d
leaq 0x122b3(%rip), %rsi     # 0x6af6b
leaq 0xb0(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0xb0d0
addq $0x10, %rsp
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r14, %rdi
callq 0xb200
leaq (%rsp,%rax), %rdx
addq $0xb0, %rdx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x1bee6
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r15
leaq 0x145f5(%rip), %rsi     # 0x6d30c
movl $0x17, %edx
movq %rax, %rdi
callq 0xb5f0
leaq 0x1468f(%rip), %rsi     # 0x6d3ba
movl $0x11, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r15
leaq 0x1467a(%rip), %rsi     # 0x6d3cc
movl $0xc, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r15
leaq 0x14661(%rip), %rsi     # 0x6d3d9
movl $0x7, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0xb1d0
movq %rax, %r15
leaq 0x14645(%rip), %rsi     # 0x6d3e1
movl $0x2f, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x128(%r12), %rsi
movq %r15, %rdi
callq 0xb1d0
movq %rax, %r14
leaq 0x12b7c(%rip), %rsi     # 0x6b93f
movl $0x1, %edx
movq %rax, %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 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x58e13
movq 0x68(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x33756(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
movq 0x33183(%rip), %rsi     # 0x8bfb0
leaq 0x1b8(%rsp), %rdi
callq 0xb390
leaq 0x238(%rsp), %rdi
callq 0xb180
jmp 0x58f60
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x1b8(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0xb670
movq (%r14), %rdi
cmpq %rbx, %rdi
je 0x58e94
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x58eb5
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x336b4(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x58f5e
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r14
leaq 0x112a5(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x14415(%rip), %rsi     # 0x6d30c
movl $0x17, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x144a3(%rip), %rsi     # 0x6d3ae
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
movq (%rax), %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 (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
leaq 0x80(%rsp), %rdi
callq 0x1bb7e
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x590aa
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x590aa
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x1b8(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rsi
callq 0xb670
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x58fd9
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x58ffa
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x3356f(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x590a8
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r14
leaq 0x11160(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x142d0(%rip), %rsi     # 0x6d30c
movl $0x17, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1435e(%rip), %rsi     # 0x6d3ae
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
movq (%rax), %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 (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
movq 0x78(%rsp), %rdi
callq 0x2d7c3
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x590d0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebp, %eax
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x59115
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
cmpq %r14, %rdi
je 0x591a1
movq 0xc0(%rsp), %rsi
jmp 0x59199
jmp 0x59115
jmp 0x59151
jmp 0x591c4
jmp 0x591f2
movq %rax, %rbx
jmp 0x591a1
jmp 0x591f2
jmp 0x591f2
movq %rax, %rbx
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x591f5
movq 0xc0(%rsp), %rsi
jmp 0x591e8
jmp 0x591f2
movq %rax, %rbx
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x591c7
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x591c7
jmp 0x591c4
jmp 0x591c4
movq %rax, %rbx
jmp 0x591d4
jmp 0x591f2
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x591a1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x32e08(%rip), %rsi     # 0x8bfb0
leaq 0x1b8(%rsp), %rdi
callq 0xb390
leaq 0x238(%rsp), %rdi
callq 0xb180
jmp 0x591c7
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x1bb7e
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x591f5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x591f5
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x59211
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
nop