// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/dataprov_jobrun_relay.cc
// Function: scdc_dataset_jobrun_relay::remote_dataset_open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
bool remote_dataset_open(string jobid, bool cd)
    {
      string remote;

      if (!dataprov_jobrun_relay()->sched_job_get_relay(jobid, remote))
      {
        SCDC_ERROR("remote_dataset_open: getting relay address of job '" << jobid << "' failed");
        return false;
      }

      if (cd) remote += "/" + jobid;

      remote_dataset = scdc_dataset_open(remote.c_str());

      if (remote_dataset == SCDC_DATASET_NULL)
      {
        SCDC_FAIL("remote_dataset_open: opening remote dataset '" << remote << "' failed");
        return false;
      }

      return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x8(%rdi), %r13
leaq 0xf8(%r13), %rdi
callq 0x2286e
movq %rax, %r15
addq $0x100, %r13            # imm = 0x100
cmpq %r13, %rax
je 0x5b3c0
leaq 0x40(%r15), %rsi
leaq 0x8(%rsp), %rdi
callq 0xb2c0
cmpq %r13, %r15
je 0x5b3c0
testb %bpl, %bpl
je 0x5b302
leaq 0xf087(%rip), %rsi      # 0x6a34d
leaq 0x28(%rsp), %rdi
movq %rbx, %rdx
callq 0x1b85e
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0xb150
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b302
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x19faa
movq %rax, 0x38(%r14)
movb $0x1, %bl
testq %rax, %rax
jne 0x5b483
leaq 0x3124c(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5b481
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0xee3f(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x12130(%rip), %rsi     # 0x6d48d
movl $0x16, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x121a3(%rip), %rsi     # 0x6d514
movl $0x2d, %edx
movq %rbx, %rdi
callq 0xb5f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0xb5f0
movq %rax, %rbx
leaq 0x10aee(%rip), %rsi     # 0x6be88
movl $0x8, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
jmp 0x5b45b
leaq 0x311a9(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x5b481
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x18(%rax), %r14
leaq 0xf09c(%rip), %rsi      # 0x6a488
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x1208d(%rip), %rsi     # 0x6d48d
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x120cc(%rip), %rsi     # 0x6d4e0
movl $0x33, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
leaq 0x10a4e(%rip), %rsi     # 0x6be88
movl $0x8, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %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
leaq 0x310fb(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5b49a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b4d0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x5b4d0
jmp 0x5b4cd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5b4e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
nop