// File: /workspace/github_cpp_makefile_star2_O1/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, 0x90(%rsp)
movq %rdx, %r12
movq %rdi, %r14
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1d19a
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x1d19a
movq 0x38(%r14), %rbp
cmpq $0x0, 0x78(%rsp)
je 0x5ab13
cmpq $0x0, 0x38(%r14)
je 0x5acb9
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x12c0d(%rip), %rsi     # 0x6d5c7
leaq 0x12c09(%rip), %rdx     # 0x6d5ca
leaq 0x48(%rsp), %rdi
callq 0x1bee6
testq %rbp, %rbp
jne 0x5aa2c
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x1d19a
leaq 0x12609(%rip), %rsi     # 0x6d000
leaq 0x8(%rsp), %rdi
callq 0xba60
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0xb150
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5aa2c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0xb150
movq 0x38(%r14), %rdi
movq 0x48(%rsp), %rsi
movq %r12, %rdx
movq 0x90(%rsp), %rcx
xorl %eax, %eax
callq 0x1aba8
cmpq $0x1, %rax
jne 0x5ad95
testq %rbp, %rbp
jne 0x5aa80
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x5aa80
callq 0x1a09c
movq $0x0, 0x38(%r14)
movq 0x8(%r14), %r12
leaq 0xf8(%r12), %r15
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x22af8
movq 0x120(%r12), %r13
movq %r15, %rdi
movq %rax, %rsi
callq 0x22ba0
subq 0x120(%r12), %r13
cmpq $0x1, %r13
jne 0x5ae79
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x10a3f(%rip), %rdx     # 0x6b50d
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x1bee6
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
leaq 0x38(%rsp), %r13
callq *0x20(%rax)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x5ab0c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %bl
jmp 0x5af69
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x1d19a
leaq 0x48(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
movl $0x20, %esi
callq 0x37d96
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5ab6d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xd8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1b92c
movq 0xd8(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1bdd6
leaq 0x8(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x59468
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
callq 0xb670
movq (%r13), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5abd8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5abf9
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ac1a
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x68(%rsp), %rax
movq -0x20(%rax), %rcx
addq $0x30, %rcx
cmpq $0x0, -0x10(%rax)
cmoveq %rax, %rcx
movsbl (%rcx), %esi
leaq 0x28(%rsp), %rdi
callq 0xb420
movq 0x78(%rsp), %r13
testq %r13, %r13
je 0x5ae63
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x70(%rsp), %rsi
leaq (%rsi,%r13), %rdx
leaq 0x98(%rsp), %rdi
callq 0x1d19a
leaq 0x98(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x5b252
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x5ac9c
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x48(%rsp), %rdi
callq 0x1bb7e
testq %r13, %r13
leaq 0x38(%rsp), %r13
jne 0x5a99f
jmp 0x5ad8e
movq 0x8(%rbx), %rdx
leaq 0x127ad(%rip), %rcx     # 0x6d471
movl $0x1b, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x31895(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5ad8e
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0xf488(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x12779(%rip), %rsi     # 0x6d48d
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x11788(%rip), %rsi     # 0x6c4b0
movl $0x9, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x12868(%rip), %rsi     # 0x6d5a4
movl $0x22, %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 %ebx, %ebx
jmp 0x5af85
movq 0x8(%rbx), %rdx
leaq 0x1272a(%rip), %rcx     # 0x6d4ca
movl $0x15, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x317b9(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5af62
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0xf3ac(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1269d(%rip), %rsi     # 0x6d48d
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x116ac(%rip), %rsi     # 0x6c4b0
movl $0x9, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1278c(%rip), %rsi     # 0x6d5a4
movl $0x22, %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
jmp 0x5af56
leaq 0x48(%rsp), %rdi
callq 0x1bb7e
xorl %ebx, %ebx
leaq 0x38(%rsp), %r13
jmp 0x5af85
leaq 0x1274b(%rip), %rsi     # 0x6d5cb
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x1b85e
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb670
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
leaq 0x38(%rsp), %r13
je 0x5aebc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x316ad(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5afd2
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0xf2a0(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x12591(%rip), %rsi     # 0x6d48d
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x12278(%rip), %rsi     # 0x6d188
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
xorl %ebx, %ebx
leaq 0x38(%rsp), %r13
leaq 0x58(%rsp), %rax
movq 0x48(%rsp), %rdi
cmpq %rax, %rdi
je 0x5af85
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x5afa7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5afbe
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x5af69
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x5b005
jmp 0x5b0be
jmp 0x5b0bb
jmp 0x5b0bb
jmp 0x5aff4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5b0be
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x5b0be
jmp 0x5b0bb
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x5b0a5
movq 0xa8(%rsp), %rsi
jmp 0x5b078
movq %rax, %rbx
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b05f
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x5b05f
movq %rax, %rbx
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b0a5
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x5b0a5
jmp 0x5b0a2
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5b0da
movq 0xc8(%rsp), %rsi
jmp 0x5b0d2
jmp 0x5b0b6
jmp 0x5b0b6
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x1bb7e
jmp 0x5b0da
movq %rax, %rbx
jmp 0x5b0fc
movq %rax, %rbx
jmp 0x5b0da
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5b0da
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x5b0fc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5b118
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0