// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun_relay.cc
// Function: scdc_dataset_jobrun_relay::do_cmd_put(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 do_cmd_put(const std::string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
    {
      string p = params;
      string jobid = pwd;
      bool have_remote = (remote_dataset != SCDC_DATASET_NULL);

      if (jobid.empty())
      {
        stringlist plist(' ', p);

        jobid = safe_jobid(plist.front_pop().c_str());

        p += plist.offset();

        if (jobid.empty()) return dataprov_jobrun_relay()->do_cmd_put(p, input, output, result);

        if (!dataprov_jobrun_relay()->sched_job_add(jobid, result))
        {
          result = "adding job failed: " + result;
          SCDC_FAIL("do_cmd_put: " << result);
          return false;
        }

        remote_dataset_open(jobid, false);
      }

      if (remote_dataset == SCDC_DATASET_NULL)
      {
        result = "no remote dataset available";
        SCDC_FAIL(__func__ << ": putting remote dataset failed: " << result);
        return false;
      }

      string cmd = "put ";
      if (!have_remote) cmd += jobid + " ";
      cmd += p;

      if (scdc_dataset_cmd(remote_dataset, cmd.c_str(), input, output) != SCDC_SUCCESS)
      {
        result = "remote command failed";
        SCDC_FAIL(__func__ << ": putting remote dataset failed: " << result);
        return false;
      }

      if (!have_remote) remote_dataset_close();

      return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r8, %rbx
movq %rcx, %rbp
movq %rdx, %r12
movq %rdi, %r14
leaq 0x60(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x1d0a0
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x1d0a0
movq 0x38(%r14), %r15
cmpq $0x0, 0x18(%rsp)
movq %r15, %rax
je 0x5987f
testq %rax, %rax
je 0x59a43
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x13e40(%rip), %rsi     # 0x6d5e8
leaq 0x13e3d(%rip), %rdx     # 0x6d5ec
leaq 0x70(%rsp), %rdi
callq 0x1be38
testq %r15, %r15
jne 0x5981f
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x1d0a0
leaq 0x1388b(%rip), %rsi     # 0x6d070
leaq 0x30(%rsp), %rdi
callq 0xba60
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0xb150
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x5981a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x60(%rsp), %r13
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0xb150
movq 0x38(%r14), %rdi
movq 0x70(%rsp), %rsi
movq %r12, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x1ab07
cmpq $0x1, %rax
sete %bpl
jne 0x59b1f
testq %r15, %r15
jne 0x59bf4
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x59bf4
callq 0x19ffb
movq $0x0, 0x38(%r14)
jmp 0x59bf4
leaq 0xe8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0x1d0a0
leaq 0x70(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
movl $0x20, %esi
callq 0x37a30
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0x598d9
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xf8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x1b878
movq 0xf8(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1bd28
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x59038
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %r13
movq %r13, %rsi
callq 0xb670
movq (%r13), %rdi
leaq 0x40(%rsp), %r13
cmpq %r13, %rdi
je 0x5994c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5996d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5998e
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x90(%rsp), %rax
movq -0x20(%rax), %rcx
addq $0x30, %rcx
cmpq $0x0, -0x10(%rax)
cmoveq %rax, %rcx
movsbl (%rcx), %esi
leaq 0x50(%rsp), %rdi
callq 0xb420
cmpq $0x0, 0x18(%rsp)
je 0x59cfe
movq 0x8(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5831a
testb %al, %al
je 0x59c1f
leaq 0xa8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x1d0a0
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x5ae12
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x59a2b
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x70(%rsp), %rdi
callq 0x1bad0
movq 0x38(%r14), %rax
leaq 0x60(%rsp), %r13
jmp 0x5978c
movq 0x8(%rbx), %rdx
leaq 0x13a93(%rip), %rcx     # 0x6d4e1
movl $0x1b, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x32b0b(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x59b18
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x1071e(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x13a5f(%rip), %rsi     # 0x6d4fd
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x11052(%rip), %rsi     # 0x6ab04
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x13b00(%rip), %rsi     # 0x6d5c6
movl $0x21, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
jmp 0x59d0f
movq 0x8(%rbx), %rdx
leaq 0x13a10(%rip), %rcx     # 0x6d53a
movl $0x15, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x32a2f(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x59bf4
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x10642(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x13983(%rip), %rsi     # 0x6d4fd
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x10f76(%rip), %rsi     # 0x6ab04
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x13a24(%rip), %rsi     # 0x6d5c6
movl $0x21, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x59d0f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x59d0f
leaq 0x1398c(%rip), %rsi     # 0x6d5b2
leaq 0x30(%rsp), %rdi
movq %rbx, %rdx
callq 0x1b7aa
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb670
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x59c58
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x32911(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x59cfe
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x10524(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x13865(%rip), %rsi     # 0x6d4fd
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1354c(%rip), %rsi     # 0x6d1f8
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
leaq 0x70(%rsp), %rdi
callq 0x1bad0
xorl %ebp, %ebp
leaq 0x60(%rsp), %r13
leaq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
cmpq %rax, %rdi
je 0x59d2b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x59d42
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebp, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x59e17
movq 0xa8(%rsp), %rsi
jmp 0x59de5
jmp 0x59e14
jmp 0x59d7b
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x59e2b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x59e2b
jmp 0x59e28
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59dcc
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x59dcc
movq %rax, %rbx
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59e17
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x59e17
jmp 0x59e14
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0x59e4d
movq 0xe8(%rsp), %rsi
jmp 0x59e45
jmp 0x59e23
jmp 0x59e23
movq %rax, %rbx
jmp 0x59e69
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x1bad0
jmp 0x59e4d
movq %rax, %rbx
jmp 0x59e4d
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x59e4d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x59e69
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x59e85
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
nop