// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun_relay.cc
// Function: scdc_dataset_jobrun_relay::do_cmd_rm(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_rm(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_rm(p, input, output, result);

        remote_dataset_open(jobid, false);
      }

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

      string cmd = "rm ";
      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__ << ": removing remote dataset failed: " << result);
        return false;
      }

      if (!have_remote) remote_dataset_close();

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

      do_cmd_cd("", 0, 0, result);

      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, %r15
movq %rdx, %r12
movq %rdi, %r14
leaq 0x78(%rsp), %rdi
callq 0xb750
leaq 0x18(%r14), %rsi
leaq 0x58(%rsp), %rdi
callq 0xb750
movq 0x38(%r14), %rbp
cmpq $0x0, 0x60(%rsp)
movq %rbp, %rax
jne 0x45e1c
leaq 0xf8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xb750
leaq 0x30(%rsp), %rdi
pushq $0x20
popq %rsi
leaq 0xf8(%rsp), %rdx
callq 0x2f05c
leaq 0xf8(%rsp), %rdi
callq 0xb230
leaq 0xd8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x19ba0
movq 0xd8(%rsp), %rsi
leaq 0x98(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1a132
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x44fd5
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %r13
movq %r13, %rsi
callq 0xb690
movq %r13, %rdi
callq 0xb230
leaq 0x98(%rsp), %rdi
callq 0xb230
leaq 0xd8(%rsp), %rdi
callq 0xb230
leaq 0x50(%rsp), %rax
movq -0x20(%rax), %rcx
addq $0x30, %rcx
cmpq $0x0, -0x10(%rax)
cmoveq %rax, %rcx
movsbl (%rcx), %esi
leaq 0x78(%rsp), %rdi
callq 0xb450
cmpq $0x0, 0x60(%rsp)
je 0x4601d
leaq 0xb8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xb750
leaq 0xb8(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x46228
leaq 0xb8(%rsp), %rdi
callq 0xb230
leaq 0x30(%rsp), %rdi
callq 0x19ef4
movq 0x38(%r14), %rax
testq %rax, %rax
je 0x45f07
leaq 0xe79b(%rip), %rsi      # 0x545c7
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1a132
testq %rbp, %rbp
jne 0x45e6f
leaq 0xe1b9(%rip), %rdx      # 0x54000
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1d867
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xba90
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x30(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xba90
movq 0x38(%r14), %rdi
movq 0x30(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1909c
cmpq $0x1, %rax
jne 0x45f98
testq %rbp, %rbp
jne 0x45eab
movq %r14, %rdi
callq 0x463c6
movl $0xf8, %edi
addq 0x8(%r14), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1f426
cmpq $0x1, %rax
jne 0x4602e
leaq 0xc5ee(%rip), %rsi      # 0x524bd
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x1a132
movq (%r14), %rax
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq *0x20(%rax)
leaq 0x10(%rsp), %rdi
callq 0xb230
movb $0x1, %bl
jmp 0x460c6
leaq 0xe563(%rip), %rsi      # 0x54471
movq %rbx, %rdi
callq 0xba40
leaq 0x2f663(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x46027
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0xb246(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xe53f(%rip), %rsi      # 0x5448d
movq %rax, %rdi
callq 0xb520
leaq 0xd55b(%rip), %rsi      # 0x534b8
movq %rax, %rdi
callq 0xb520
leaq 0xe638(%rip), %rsi      # 0x545a4
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x46027
leaq 0xe52b(%rip), %rsi      # 0x544ca
movq %rbx, %rdi
callq 0xba40
leaq 0x2f5d2(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x460c4
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0xb1b5(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xe4ae(%rip), %rsi      # 0x5448d
movq %rax, %rdi
callq 0xb520
leaq 0xd4ca(%rip), %rsi      # 0x534b8
movq %rax, %rdi
callq 0xb520
leaq 0xe5a7(%rip), %rsi      # 0x545a4
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
jmp 0x460b8
leaq 0x30(%rsp), %rdi
callq 0x19ef4
xorl %ebx, %ebx
jmp 0x460d0
leaq 0xe596(%rip), %rsi      # 0x545cb
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
callq 0x19ae2
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x2f51f(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x460c4
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0xb106(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xe3ff(%rip), %rsi      # 0x5448d
movq %rax, %rdi
callq 0xb520
leaq 0xe0eb(%rip), %rsi      # 0x54188
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %ebx, %ebx
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x58(%rsp), %rdi
callq 0xb230
leaq 0x78(%rsp), %rdi
callq 0xb230
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x460fe
jmp 0x4616c
jmp 0x4616c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb230
jmp 0x4616f
jmp 0x4616c
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x46139
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0xb230
jmp 0x46131
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0xb230
jmp 0x46156
jmp 0x46153
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
jmp 0x46174
jmp 0x46167
jmp 0x46167
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x19ef4
jmp 0x46179
movq %rax, %rbx
jmp 0x46183
movq %rax, %rbx
jmp 0x46179
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x58(%rsp), %rdi
callq 0xb230
leaq 0x78(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0
nop