// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/lib/scdc/scdc.cc
// Function: scdc_dataset_open_intern
scdc_dataset_t scdc_dataset_open_intern(const char *uri, scdc_args_t *args)
{
  SCDC_TRACE(__func__ << ": uri: '" << uri << "'");

  scdc_dataset_t dataset = new _scdc_dataset_t;

  string sscheme, sauthority, spath;
  split_uri(uri, -1, &sscheme, &sauthority, &spath);

  scdc_args xargs(args);

  dataset->nodeconn = scdc_main_context.data->nodeconns.open(sscheme.c_str(), sauthority.c_str(), &xargs);

  if (!dataset->nodeconn)
  {
    SCDC_TRACE(__func__ << ": failed: open connection failed");
    delete dataset;
    return SCDC_DATASET_NULL;
  }

  scdc_result result;
  dataset->dataset = dataset->nodeconn->dataset_open(spath, result);
  SCDC_RESULT_SET_STR(scdc_main_context.data->result, result.c_str());

  SCDC_TRACE(__func__ << ": result: '" << result << "'");

  if (!dataset->dataset)
  {
    SCDC_FAIL(__func__ << ": failed");
    scdc_main_context.data->nodeconns.close(dataset->nodeconn);
    delete dataset;
    return SCDC_DATASET_NULL;
  }

#if SCDC_DEBUG
  scdc_main_context.data->datasets.insert(dataset);
#endif

  SCDC_TRACE(__func__ << ": return '" << dataset << "'");

/*  SCDC_INFO("opening dataset " << dataset << " with uri '" << uri << "'");*/

  return dataset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %r15
pushq $0x20
popq %rdi
callq 0xb540
movq %rax, %rbx
movq %rax, %rdi
callq 0x19ab2
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rbx, 0x8(%rsp)
movb %cl, (%rax)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
pushq $-0x1
popq %rsi
leaq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rcx
leaq 0x30(%rsp), %r8
movq %r15, %rdi
callq 0x1ac7a
leaq 0xb0(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movl $0x98, %edi
addq 0x5d006(%rip), %rdi     # 0x75600
movq 0x70(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x2aff2
movq %rax, (%rbx)
testq %rax, %rax
je 0x18686
leaq 0x20(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
movq 0x60(%rax), %rdi
movq (%rdi), %rax
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq *0x10(%rax)
movq %rax, 0x8(%rbx)
movq 0x5cfb7(%rip), %rax     # 0x75600
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
movq (%rdi), %rdx
addq $0x8, %rdi
decq %rdx
callq 0xb2c0
cmpq $0x0, 0x8(%rbx)
je 0x186a0
movq 0x5cf92(%rip), %rdi     # 0x75600
addq $0x8, %rdi
leaq 0x8(%rsp), %rsi
callq 0x1a5da
movq 0x8(%rsp), %rbx
jmp 0x1873c
movq %rbx, %rdi
callq 0x19ad4
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xb550
xorl %ebx, %ebx
jmp 0x18746
movq 0x5ced9(%rip), %rdi     # 0x75580
cmpq $0x0, 0x8(%rdi)
je 0x18713
addq $0x20, %rdi
callq 0xb800
movq 0x5cec2(%rip), %rax     # 0x75580
movq 0x8(%rax), %rdi
leaq 0x38abf(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x38abf(%rip), %rsi     # 0x51194
movq %rax, %rdi
callq 0xb520
leaq 0x38aba(%rip), %rsi     # 0x5119e
movq %rax, %rdi
callq 0xb520
leaq 0x3ccf3(%rip), %rsi     # 0x553e6
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq 0x5ce76(%rip), %rdi     # 0x75580
addq $0x20, %rdi
callq 0xb3e0
movl $0x98, %edi
addq 0x5cee1(%rip), %rdi     # 0x75600
movq (%rbx), %rsi
callq 0x2b2da
movq %rbx, %rdi
callq 0x19ad4
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xb550
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x90(%rsp), %rdi
callq 0x19a94
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x50(%rsp), %rdi
callq 0xb230
leaq 0x70(%rsp), %rdi
callq 0xb230
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x187a8
movq %rax, %r14
jmp 0x187b5
movq %rax, %r14
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xb550
jmp 0x187d3
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x90(%rsp), %rdi
callq 0x19a94
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x50(%rsp), %rdi
callq 0xb230
leaq 0x70(%rsp), %rdi
callq 0xb230
movq %r14, %rdi
callq 0xb9a0