LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::find_store(char const*)
scdc_dataprov_store_mem_handler::store_t scdc_dataprov_store_mem_handler::find_store(const char *path)
{
  SCDC_TRACE_F("path: '" << path << "'");

  store_t ret = store_null;

  if (!path || path[0] == '\0') goto do_return;

  for (stores_t::const_iterator i = stores.begin(); ret == store_null && i != stores.end(); ++i)
  {
    if ((*i)->name == path) ret = *i;
  }

do_return:
  SCDC_TRACE_F("return: " << ret);

  return ret;
}

// Assembly:
testq %rsi, %rsi
je 0x23535
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, (%rsi)
je 0x2352d
movq %rdi, %r14
movq %rdi, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0x2352d
movq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0xb110
testl %eax, %eax
je 0x23522
xorl %eax, %eax
jmp 0x23526
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x23506
jmp 0x2352f
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::mk_store(char const*)
bool scdc_dataprov_store_mem_handler::mk_store(const char *path)
{
  SCDC_TRACE_F("path: '" << path << "'");

  bool ret = false;
  store_t store = store_null;

  if (!path || path[0] == '\0') goto do_return;

  if (find_store(path) != store_null) goto do_return;

  store = add_store(path);

  if (store == store_null)
  {
    SCDC_FAIL_F("adding store '" << path << "' failed");
    goto do_return;
  } 

  stores.push_back(store);

  ret = true;

do_return:
  SCDC_TRACE_F("return: " << ret);

  return ret;
}

// Assembly:
testq %rsi, %rsi
je 0x2355d
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x23559
movq %rdi, %rbx
movq %r14, %rsi
callq 0x234ee
testq %rax, %rax
je 0x23560
xorl %eax, %eax
jmp 0x2358a
xorl %eax, %eax
retq
movq %r14, %rsi
callq 0x23592
movq %rax, %r14
movl $0x18, %edi
callq 0xb500
movq %r14, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb090
incq 0x10(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::rm_store(char const*)
bool scdc_dataprov_store_mem_handler::rm_store(const char *path)
{
  SCDC_TRACE_F("path: '" << path << "'");

  bool ret = false;

  if (!path || path[0] == '\0') goto do_return;

  for (stores_t::iterator i = stores.begin(); i != stores.end(); ++i)
  {
    if ((*i)->name != path) continue;

    del_store(*i);

    stores.erase(i);

    ret = true;
  }

  if (!ret)
  {
    SCDC_FAIL_F("removing store '" << path << "' failed");
  }

do_return:
  SCDC_TRACE_F("return: " << ret);

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2374e
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x2374e
movq %rdi, %r15
movq (%rdi), %r12
xorl %ebx, %ebx
cmpq %rdi, %r12
je 0x23663
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0xb110
testl %eax, %eax
jne 0x23651
movq 0x10(%r12), %rsi
movq %r15, %rdi
callq 0x23762
decq 0x10(%r15)
movq %r12, %rdi
callq 0xb940
movl $0x18, %esi
movq %r12, %rdi
callq 0xb510
movb $0x1, %bl
movq (%r12), %r12
cmpq %r15, %r12
jne 0x23618
testb $0x1, %bl
jne 0x23750
leaq 0x68f06(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x23750
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x46b17(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x473d8(%rip), %rsi     # 0x6aa7d
movl $0x1c, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x473f9(%rip), %rsi     # 0x6aab2
movl $0x8, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x4a446(%rip), %rsi     # 0x6db13
movl $0x2, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x49080(%rip), %rsi     # 0x6c761
movl $0x10, %edx
movq %r15, %rdi
callq 0xb5f0
movq %r14, %rdi
callq 0xb200
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xb5f0
leaq 0x487f5(%rip), %rsi     # 0x6bf00
movl $0x8, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
jmp 0x23750
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::del_store(scdc_dataprov_store_mem_handler::store_data_t*)
void scdc_dataprov_store_mem_handler::del_store(store_t store)
{
  SCDC_TRACE_F("store: '" << store << "'");

  clear_entries(store);

  delete store;

  SCDC_TRACE_F("return:");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x2486a
testq %rbx, %rbx
je 0x237ad
leaq 0x20(%rbx), %r14
movq 0x20(%rbx), %rdi
cmpq %r14, %rdi
je 0x23796
movq (%rdi), %r15
movl $0x18, %esi
callq 0xb510
movq %r15, %rdi
cmpq %r14, %r15
jne 0x23781
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x237ad
movq (%rax), %rsi
incq %rsi
callq 0xb510
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb510
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::find_entry(scdc_dataprov_store_mem_handler::store_data_t*, char const*)
scdc_dataprov_store_mem_handler::entry_t scdc_dataprov_store_mem_handler::find_entry(store_t store, const char *path)
{
  SCDC_TRACE_F("store: '" << store << "', path: '" << path << "'");

  entry_t ret = entry_null;

  if (!path || path[0] == '\0') goto do_return;

  for (entries_t::const_iterator i = store->entries.begin(); ret == entry_null && i != store->entries.end(); ++i)
  {
    if ((*i)->name == path) ret = *i;
  }

do_return:
  SCDC_TRACE_F("return: " << ret);

  return ret;
}

// Assembly:
testq %rdx, %rdx
je 0x24395
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
cmpb $0x0, (%rdx)
je 0x2438d
movq %rsi, %r14
addq $0x20, %r14
movq %r14, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0x2438d
movq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0xb110
testl %eax, %eax
je 0x24382
xorl %eax, %eax
jmp 0x24386
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x24366
jmp 0x2438f
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::rm_entry(scdc_dataprov_store_mem_handler::store_data_t*, char const*)
bool scdc_dataprov_store_mem_handler::rm_entry(store_t store, const char *path)
{
  SCDC_TRACE_F("store: '" << store << "', path: '" << path << "'");

  bool ret = false;

  if (!path || path[0] == '\0') goto do_return;

  for (entries_t::iterator i = store->entries.begin(); i != store->entries.end(); ++i)
  {
    if ((*i)->name != path) continue;

    del_entry(store, *i);

    store->entries.erase(i);

    ret = true;
  }

  if (!ret)
  {
    SCDC_FAIL_F("removing entry '" << path << "' failed");
  }

do_return:
  SCDC_TRACE_F("return: " << ret);

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x244fb
movq %rdx, %r14
cmpb $0x0, (%rdx)
je 0x244fb
movq %rsi, %r15
leaq 0x20(%rsi), %r13
movq 0x20(%rsi), %r12
xorl %ebx, %ebx
cmpq %r13, %r12
je 0x24410
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0xb110
testl %eax, %eax
jne 0x243fe
movq 0x10(%r12), %rdx
callq 0x2450c
decq 0x30(%r15)
movq %r12, %rdi
callq 0xb940
movl $0x18, %esi
movq %r12, %rdi
callq 0xb510
movb $0x1, %bl
movq (%r12), %r12
cmpq %r13, %r12
jne 0x243c8
testb $0x1, %bl
jne 0x244fd
leaq 0x68159(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x244fd
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r15
leaq 0x45d6a(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x4662b(%rip), %rsi     # 0x6aa7d
movl $0x1c, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x4666a(%rip), %rsi     # 0x6aad0
movl $0x8, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x49699(%rip), %rsi     # 0x6db13
movl $0x2, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x482ff(%rip), %rsi     # 0x6c78d
movl $0x10, %edx
movq %r15, %rdi
callq 0xb5f0
movq %r14, %rdi
callq 0xb200
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xb5f0
leaq 0x47a48(%rip), %rsi     # 0x6bf00
movl $0x8, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
jmp 0x244fd
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::del_entry(scdc_dataprov_store_mem_handler::store_data_t*, scdc_dataprov_store_mem_handler::entry_data_t*)
void scdc_dataprov_store_mem_handler::del_entry(store_t store, entry_t entry)
{
  SCDC_TRACE_F("store: '" << store << "', entry: '" << entry << "'");

  if (entry->buf.ptr) free(entry->buf.ptr);

  delete entry;

  SCDC_TRACE_F("return:");
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq 0x20(%rdx), %rdi
testq %rdi, %rdi
je 0x2451e
callq 0xb650
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x24535
movq (%rax), %rsi
incq %rsi
callq 0xb510
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xb510
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::entry_open(scdc_dataprov_store_mem_handler::store_data_t*, char const*, bool, bool, bool)
scdc_dataprov_store_mem_handler::entry_t scdc_dataprov_store_mem_handler::entry_open(store_t store, const char *path, bool read, bool write, bool create)
{
  SCDC_TRACE_F("path: '" << path << "', read: " << read << ", write: " << write << ", create: " << create);

  entry_t entry = entry_null;

  if (!path || path[0] == '\0') goto do_return;

  entry = find_entry(store, path);

  if (entry == entry_null)
  {
    if (!create)
    {
      SCDC_FAIL_F("opening entry '" << path << "' failed");
      goto do_return;
    }

    entry = add_entry(store, path);

    store->entries.push_back(entry);
  }

do_return:
  SCDC_TRACE_F("return: " << entry);

  return entry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x24696
movq %rdx, %rbx
cmpb $0x0, (%rdx)
je 0x24696
movl %r9d, %ebp
movq %rsi, %r14
movq %rbx, %rdx
callq 0x2434a
movq %rax, %r15
testq %rax, %rax
jne 0x24699
testb %bpl, %bpl
je 0x245b0
movq %rbx, %rdx
callq 0x246a8
movq %rax, %r15
leaq 0x20(%r14), %rbx
movl $0x18, %edi
callq 0xb500
movq %r15, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb090
incq 0x30(%r14)
jmp 0x24699
leaq 0x67fb9(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x24696
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x45bcc(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x4648d(%rip), %rsi     # 0x6aa7d
movl $0x1c, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x464d5(%rip), %rsi     # 0x6aad9
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x494fb(%rip), %rsi     # 0x6db13
movl $0x2, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x464b8(%rip), %rsi     # 0x6aae4
movl $0xf, %edx
movq %r14, %rdi
callq 0xb5f0
movq %rbx, %rdi
callq 0xb200
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xb5f0
leaq 0x478aa(%rip), %rsi     # 0x6bf00
movl $0x8, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::entry_reopen(scdc_dataprov_store_mem_handler::store_data_t*, char const*, bool, bool, bool, scdc_dataprov_store_mem_handler::entry_data_t*)
scdc_dataprov_store_mem_handler::entry_t scdc_dataprov_store_mem_handler::entry_reopen(store_t store, const char *path, bool read, bool write, bool create, entry_t entry)
{
  SCDC_TRACE_F("path: '" << path << "', read: " << read << ", write: " << write << ", create: " << create << ", entry: " << entry);

  if (entry->name == path) goto do_return;

  entry_close(store, entry);

  entry = entry_open(store, path, read, write, create);

do_return:
  SCDC_TRACE_F("return: " << entry);

  return entry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xb110
testl %eax, %eax
je 0x24747
movzbl %bpl, %r9d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x24544
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::entry_read_at(scdc_dataprov_store_mem_handler::store_data_t*, scdc_dataprov_store_mem_handler::entry_data_t*, void*, long long, long long)
scdcint_t scdc_dataprov_store_mem_handler::entry_read_at(store_t store, entry_t entry, void *ptr, scdcint_t size, scdcint_t pos)
{
  SCDC_TRACE_F("store: '" << store << "', entry: '" << entry << "', ptr: " << ptr << ", size: " << size << ", pos: " << pos);

  scdcint_t n = -1;

  if (!entry->buf.ptr) goto do_return;

  if (pos < 0) pos = 0;

  if (pos > entry->buf.size) goto do_return;

  if (size < 0 || size > entry->buf.size - pos) size = entry->buf.size - pos;

  memcpy(ptr, static_cast<char *>(entry->buf.ptr) + pos, size);
  n = size;

do_return:
  SCDC_TRACE_F("return: " << n);

  return n;
}

// Assembly:
pushq %rbx
movq 0x20(%rdx), %rsi
movq $-0x1, %rbx
testq %rsi, %rsi
je 0x247ea
xorl %eax, %eax
testq %r9, %r9
cmovgq %r9, %rax
movq 0x28(%rdx), %rdx
subq %rax, %rdx
jl 0x247ea
cmpq %r8, %rdx
movq %r8, %rbx
cmovlq %rdx, %rbx
testq %r8, %r8
cmovsq %rdx, %rbx
addq %rax, %rsi
movq %rcx, %rdi
movq %rbx, %rdx
callq 0xb3f0
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::entry_write_at(scdc_dataprov_store_mem_handler::store_data_t*, scdc_dataprov_store_mem_handler::entry_data_t*, void const*, long long, long long)
scdcint_t scdc_dataprov_store_mem_handler::entry_write_at(store_t store, entry_t entry, const void *ptr, scdcint_t size, scdcint_t pos)
{
  SCDC_TRACE_F("store: '" << store << "', entry: '" << entry << "', ptr: " << ptr << ", size: " << size << ", pos: " << pos);

  scdcint_t n = -1;

  if (size < 0) goto do_return;

  if (pos < 0) pos = entry->buf.current;

  if (pos + size > entry->buf.size)
  {
    scdcint_t new_size = pos + size;
    void *new_ptr = realloc(entry->buf.ptr, new_size);

    if (!new_ptr) goto do_return;

    entry->buf.ptr = new_ptr;
    entry->buf.size = new_size;
  }

  memcpy(static_cast<char *>(entry->buf.ptr) + pos, ptr, size);
  entry->buf.current = pos + size;
  n = size;

do_return:
  SCDC_TRACE_F("return: " << n);

  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq $-0x1, %r13
testq %r8, %r8
js 0x24857
movq %r9, %r12
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
testq %r9, %r9
jns 0x2481c
movq 0x30(%r14), %r12
leaq (%r12,%rbx), %rbp
movq 0x20(%r14), %rdi
cmpq 0x28(%r14), %rbp
jle 0x24842
movq %rbp, %rsi
callq 0xb960
testq %rax, %rax
je 0x24857
movq %rax, %rdi
movq %rax, 0x20(%r14)
movq %rbp, 0x28(%r14)
addq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xb3f0
movq %rbp, 0x30(%r14)
movq %rbx, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_store_mem.cc
// Function: scdc_dataprov_store_mem_handler::clear_entries(scdc_dataprov_store_mem_handler::store_data_t*)
void scdc_dataprov_store_mem_handler::clear_entries(store_t store)
{
  SCDC_TRACE_F("store: '" << store << "'");

  for (entries_t::iterator i = store->entries.begin(); i != store->entries.end(); ++i) del_entry(store, *i);

  store->entries.clear();

  SCDC_TRACE_F("return:");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x20(%rsi), %r14
addq $0x20, %rbx
cmpq %rbx, %r14
je 0x2488c
movq 0x10(%r14), %rdx
callq 0x2450c
movq (%r14), %r14
jmp 0x24879
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x26870
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_printf
void scdc_dataset_output_printf(int append, scdc_dataset_output_t *output, const char *fmt, ...)
{
  if (!output || !SCDC_DATASET_INOUT_BUF_PTR(output)) return;

  strncpy(output->format, "text", SCDC_FORMAT_MAX_SIZE);

  if (!append)
  {
    SCDC_DATASET_INOUT_BUF_CURRENT(output) = 0;
    output->total_size = 0;
  }

  char *buf = static_cast<char *>(SCDC_DATASET_INOUT_BUF_PTR(output));
  buf += SCDC_DATASET_INOUT_BUF_CURRENT(output);

  scdcint_t buf_size = SCDC_DATASET_INOUT_BUF_SIZE(output) - SCDC_DATASET_INOUT_BUF_CURRENT(output);

  va_list argptr;
  va_start(argptr, fmt);
  scdcint_t n = vsnprintf(buf, buf_size, fmt, argptr);
  va_end(argptr);

  n = min(buf_size, n);

  SCDC_DATASET_INOUT_BUF_CURRENT(output) += n;
  output->total_size += n;

  output->total_size_given = SCDC_DATASET_INOUT_TOTAL_SIZE_GIVEN_EXACT;

  output->next = 0;
  output->data = 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2a8b7
movdqa %xmm0, 0x50(%rsp)
movdqa %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rsi, %rsi
je 0x2a953
movl %edi, %esi
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2a953
movups 0x40792(%rip), %xmm0    # 0x6b068
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rax
testl %esi, %esi
je 0x2a8e6
movq (%rax), %rax
jmp 0x2a8ee
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %eax, %eax
addq %rax, %rdi
movq 0x18(%rbx), %r14
subq %rax, %r14
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
movq %r14, %rsi
callq 0xb300
cltq
cmpq %rax, %r14
cmovgeq %rax, %r14
movdqu 0x20(%rbx), %xmm0
movq %r14, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x20(%rbx)
movb $0x78, 0x30(%rbx)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x38(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: inout_FX_data_t<_IO_FILE*>::get_size_left()
scdcint_t inout_FX_data_t<FILE *>::get_size_left()
{
  scdcint_t pos = ftello(fx);

  if (pos < 0 || fseeko(fx, 0, SEEK_END) < 0) return -1;

  scdcint_t size = ftello(fx);

  if (size < 0) return -1;

  size -= pos;

  fseeko(fx, pos, SEEK_SET);

  return size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xb680
movq $-0x1, %r14
testq %rax, %rax
js 0x2b01e
movq %rax, %r15
movq (%rbx), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0xb2e0
testl %eax, %eax
js 0x2b01e
movq (%rbx), %rdi
callq 0xb680
testq %rax, %rax
js 0x2b01e
movq %rax, %r12
subq %r15, %r12
movq (%rbx), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xb2e0
movq %r12, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_buffer_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_input_t *scdc_dataset_input_buffer_create(scdc_dataset_input_t *input, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  scdc_args_buf_t buffer;
  xargs.get<scdc_args_buf_t>(SCDC_ARGS_TYPE_BUF, &buffer);

  if (!scdc_dataset_inout_alloc(input, 0, 0)) return 0;

  input->intern->type = SCDC_DATASET_INOUT_TYPE_BUFFER;
  input->intern->destroy = scdc_dataset_input_buffer_destroy;

  SCDC_DATASET_INOUT_BUF_PTR(input) = buffer.buf;
  SCDC_DATASET_INOUT_BUF_SIZE(input) = buffer.buf_size;

  strcpy(input->format, "data");

  SCDC_DATASET_INOUT_BUF_CURRENT(input) = SCDC_DATASET_INOUT_BUF_SIZE(input);
  input->total_size = SCDC_DATASET_INOUT_BUF_SIZE(input);
  input->total_size_given = SCDC_DATASET_INOUT_TOTAL_SIZE_GIVEN_EXACT;

  return input;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2b52b
movq 0x10(%rsp), %rdi
movq %rsp, %rdx
movl $0x8, %esi
callq *%rax
testq %rbx, %rbx
je 0x2b594
movq 0x48(%rbx), %rax
testq %rax, %rax
jne 0x2b558
movl $0x28, %edi
movl $0x1, %esi
callq 0xb320
testq %rax, %rax
je 0x2b594
movq %rax, 0x48(%rbx)
movq $0x28, (%rax)
movq $0x3, 0x8(%rax)
leaq 0x2e97(%rip), %rcx      # 0x2e3fe
movq %rcx, 0x20(%rax)
movq (%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rbx)
movl $0x61746164, (%rbx)     # imm = 0x61746164
movb $0x0, 0x4(%rbx)
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rbx)
movb $0x78, 0x30(%rbx)
jmp 0x2b596
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_fd_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_inout_t *scdc_dataset_input_fd_create(scdc_dataset_input_t *input, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  int fd;
  xargs.get<int>(SCDC_ARGS_TYPE_INT, &fd);

  if (!input) return 0;

  input = scdc_dataset_input_FX_create<int>(input, conf, args, fd);

  if (!input) return 0;

  input->intern->type = SCDC_DATASET_INOUT_TYPE_FD;
  input->intern->destroy = scdc_dataset_input_fd_destroy;

#if INPUT_CREATE_NEXT
  input->next(input, 0);
#endif

  return input;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2b60d
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
callq *%rax
testq %r15, %r15
je 0x2b64d
movl 0xc(%rsp), %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2e421
movq %rax, %rbx
testq %rax, %rax
je 0x2b64d
movq 0x48(%rbx), %rax
movq $0x4, 0x8(%rax)
leaq 0x3666(%rip), %rcx      # 0x2eca5
movq %rcx, 0x20(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq *0x38(%rbx)
jmp 0x2b64f
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_fddup_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_inout_t *scdc_dataset_input_fddup_create(scdc_dataset_input_t *input, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  int fd;
  xargs.get<int>(SCDC_ARGS_TYPE_INT, &fd);

  if (!input) return 0;

  int fddup = dup(fd);

  input = scdc_dataset_input_FX_create<int>(input, conf, args, fddup);

  if (!input) return 0;

  input->intern->type = SCDC_DATASET_INOUT_TYPE_FDDUP;
  input->intern->destroy = scdc_dataset_input_fddup_destroy;

#if INPUT_CREATE_NEXT
  input->next(input, 0);
#endif

  return input;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2b6ca
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
callq *%rax
testq %r15, %r15
je 0x2b711
movl 0xc(%rsp), %edi
callq 0xb830
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %eax, %ecx
callq 0x2e421
movq %rax, %rbx
testq %rax, %rax
je 0x2b711
movq 0x48(%rbx), %rax
movq $0x5, 0x8(%rax)
leaq 0x3651(%rip), %rcx      # 0x2ed54
movq %rcx, 0x20(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq *0x38(%rbx)
jmp 0x2b713
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2b72c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_stream_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_inout_t *scdc_dataset_input_stream_create(scdc_dataset_input_t *input, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  FILE *stream = 0;
  xargs.get<FILE *>(SCDC_ARGS_TYPE_IN_STREAM, &stream);

  if (!stream) stream = stdin;

  if (!input) return 0;

  input = scdc_dataset_input_FX_create<FILE *>(input, conf, args, stream);

  if (!input) return 0;

  input->intern->type = SCDC_DATASET_INOUT_TYPE_STREAM;
  input->intern->destroy = scdc_dataset_input_stream_destroy;

#if INPUT_CREATE_NEXT
  input->next(input, 0);
#endif

  return input;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq %rcx, 0x8(%rsp)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2b79d
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x6, %esi
callq *%rax
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
jne 0x2b7ac
movq 0x6082c(%rip), %rax     # 0x8bfd0
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
testq %r15, %r15
je 0x2b7e8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2ed8b
movq %rax, %rbx
testq %rax, %rax
je 0x2b7e8
movq 0x48(%rbx), %rax
movq $0x6, 0x8(%rax)
leaq 0x3e37(%rip), %rcx      # 0x2f611
movq %rcx, 0x20(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq *0x38(%rbx)
jmp 0x2b7ea
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_streamdup_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_inout_t *scdc_dataset_input_streamdup_create(scdc_dataset_input_t *input, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  FILE *stream = 0;
  xargs.get<FILE *>(SCDC_ARGS_TYPE_IN_STREAM, &stream);

  if (!stream) stream = stdin;

  if (!input) return 0;

  scdcint_t pos = ftello(stream);

  /* we use a duplicated fd, because using only a newly opened stream (with fdopen) leads to empty reads if the original stream is closed */
  int fddup = dup(fileno(stream));
  stream = fdopen(fddup, "r");

  if (!stream) return 0;

  if (pos >= 0) fseeko(stream, pos, SEEK_SET);

  input = scdc_dataset_input_FX_create<FILE *>(input, conf, args, stream);

  if (!input) return 0;

  input->intern->type = SCDC_DATASET_INOUT_TYPE_STREAMDUP;
  input->intern->destroy = scdc_dataset_input_streamdup_destroy;

#if INPUT_CREATE_NEXT
  input->next(input, 0);
#endif

  return input;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq %rcx, 0x8(%rsp)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2b874
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x6, %esi
callq *%rax
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0x2b883
movq 0x60755(%rip), %rax     # 0x8bfd0
movq (%rax), %rdi
movq %rdi, 0x8(%rsp)
testq %r15, %r15
je 0x2b90e
callq 0xb680
movq %rax, %r12
movq 0x8(%rsp), %rdi
callq 0xb560
movl %eax, %edi
callq 0xb830
leaq 0x3df7b(%rip), %rsi     # 0x69827
movl %eax, %edi
callq 0xb570
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x2b90e
testq %r12, %r12
js 0x2b8d4
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xb2e0
movq 0x8(%rsp), %rax
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2ed8b
movq %rax, %rbx
testq %rax, %rax
je 0x2b90e
movq 0x48(%rbx), %rax
movq $0x7, 0x8(%rax)
leaq 0x3dbe(%rip), %rcx      # 0x2f6be
movq %rcx, 0x20(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq *0x38(%rbx)
jmp 0x2b910
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2b92b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_create
scdc_dataset_input_t *scdc_dataset_input_create(scdc_dataset_input_t *input, const char *conf, ...)
{
  va_list ap;
  va_start(ap, conf);

  scdc_args_t args;

  scdc_args_va_init(&args, &ap);

  input = scdc_dataset_input_create_intern(input, conf, &args);

  scdc_args_va_release(&args);
  va_end(ap);

  return input;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x2c691
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movq %rsp, %r12
movq %rsi, 0x10(%r12)
leaq 0x120(%rsp), %rax
movq %rax, 0x8(%r12)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r12)
movl $0x10, %edi
callq 0xb500
movq %rax, %r15
movq $0x0, (%rax)
movq %r12, 0x8(%rax)
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x35df(%rip), %rax      # 0x2fcba
movq %rax, 0x8(%rdx)
leaq 0x3705(%rip), %rax      # 0x2fdeb
movq %rax, 0x10(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b02d
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0xb510
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_destroy
void scdc_dataset_input_destroy(scdc_dataset_input_t *input)
{
  SCDC_TRACE_DATASET_INPUT(input, "scdc_dataset_input_destroy: input: ");

  if (!input)
  {
    SCDC_FAIL("scdc_dataset_input_destroy: no input given");
    return;
  }

  if (!input->intern) return;

  INOUT_INTERN_RESTORE(input);

  if (input->intern->destroy) input->intern->destroy(input);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c753
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x2c7ee
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rdi)
movq 0x18(%rax), %rcx
movq %rcx, 0x40(%rdi)
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x2c7ee
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x5fe16(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x2c7ee
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x3da29(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3e932(%rip), %rsi     # 0x6b0c5
movl $0xf, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3e943(%rip), %rsi     # 0x6b0ea
movl $0x2a, %edx
movq %rbx, %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
movq (%r14), %rdi
addq $0x20, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb3b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_buffer_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_output_t *scdc_dataset_output_buffer_create(scdc_dataset_output_t *output, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  scdc_args_buf_t v;
  xargs.get<scdc_args_buf_t>(SCDC_ARGS_TYPE_BUF, &v);

  if (!scdc_dataset_inout_alloc(output, 0, 0)) return 0;

  output->intern->type = SCDC_DATASET_INOUT_TYPE_BUFFER;
  output->intern->destroy = scdc_dataset_output_buffer_destroy;

  SCDC_DATASET_INOUT_BUF_PTR(output) = v.buf;
  SCDC_DATASET_INOUT_BUF_SIZE(output) = v.buf_size;

  strcpy(output->format, "data");

  return output;
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2cdd4
movq 0x10(%rsp), %rdi
movq %rsp, %rdx
movl $0x8, %esi
callq *%rax
testq %rbx, %rbx
je 0x2ce31
movq 0x48(%rbx), %rax
testq %rax, %rax
jne 0x2ce01
movl $0x28, %edi
movl $0x1, %esi
callq 0xb320
testq %rax, %rax
je 0x2ce31
movq %rax, 0x48(%rbx)
movq $0x28, (%rax)
movq $0x3, 0x8(%rax)
leaq 0x3001(%rip), %rcx      # 0x2fe11
movq %rcx, 0x20(%rax)
movq (%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rbx)
movl $0x61746164, (%rbx)     # imm = 0x61746164
movb $0x0, 0x4(%rbx)
jmp 0x2ce33
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_fd_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_output_t *scdc_dataset_output_fd_create(scdc_dataset_output_t *output, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  int fd;
  xargs.get<int>(SCDC_ARGS_TYPE_INT, &fd);

  if (!output) return 0;

  output = scdc_dataset_output_FX_create<int>(output, conf, args, fd);

  if (!output) return 0;

  output->intern->type = SCDC_DATASET_INOUT_TYPE_STREAM;
  output->intern->destroy = scdc_dataset_output_fd_destroy;

  return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2ceaa
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
callq *%rax
testq %r15, %r15
je 0x2cee2
movl 0xc(%rsp), %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2fe34
movq %rax, %rbx
testq %rax, %rax
je 0x2cee2
movq 0x48(%rbx), %rax
movq $0x6, 0x8(%rax)
leaq 0x388c(%rip), %rcx      # 0x30768
movq %rcx, 0x20(%rax)
jmp 0x2cee4
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_fddup_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_output_t *scdc_dataset_output_fddup_create(scdc_dataset_output_t *output, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  int fd;
  xargs.get<int>(SCDC_ARGS_TYPE_INT, &fd);

  if (!output) return 0;

  int fddup = dup(fd);

  output = scdc_dataset_output_FX_create<int>(output, conf, args, fddup);

  if (!output) return 0;

  output->intern->type = SCDC_DATASET_INOUT_TYPE_STREAM;
  output->intern->destroy = scdc_dataset_output_fddup_destroy;

  return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2cf5f
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
movl $0x1, %esi
callq *%rax
testq %r15, %r15
je 0x2cf9e
movl 0xc(%rsp), %edi
callq 0xb830
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %eax, %ecx
callq 0x2fe34
movq %rax, %rbx
testq %rax, %rax
je 0x2cf9e
movq 0x48(%rbx), %rax
movq $0x6, 0x8(%rax)
leaq 0x3857(%rip), %rcx      # 0x307ef
movq %rcx, 0x20(%rax)
jmp 0x2cfa0
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2cfb9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_stream_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_output_t *scdc_dataset_output_stream_create(scdc_dataset_output_t *output, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  FILE *stream = 0;
  xargs.get<FILE *>(SCDC_ARGS_TYPE_OUT_STREAM, &stream);

  if (!stream) stream = stdout;

  if (!output) return 0;

  output = scdc_dataset_output_FX_create<FILE *>(output, conf, args, stream);

  if (!output) return 0;

  output->intern->type = SCDC_DATASET_INOUT_TYPE_STREAM;
  output->intern->destroy = scdc_dataset_output_stream_destroy;

  return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq %rcx, 0x8(%rsp)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2d02a
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x7, %esi
callq *%rax
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
jne 0x2d039
movq 0x5ef6f(%rip), %rax     # 0x8bfa0
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
testq %r15, %r15
je 0x2d06d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x30826
movq %rax, %rbx
testq %rax, %rax
je 0x2d06d
movq 0x48(%rbx), %rax
movq $0x6, 0x8(%rax)
leaq 0x40fd(%rip), %rcx      # 0x31164
movq %rcx, 0x20(%rax)
jmp 0x2d06f
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_streamdup_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_output_t *scdc_dataset_output_streamdup_create(scdc_dataset_output_t *output, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  FILE *stream = 0;
  xargs.get<FILE *>(SCDC_ARGS_TYPE_OUT_STREAM, &stream);

  if (!stream) stream = stdout;

  if (!output) return 0;

  scdcint_t pos = ftello(stream);

  /* we use a duplicated fd, because using only a newly opened stream (with fdopen) leads to empty reads if the original stream is closed */
  int fddup = dup(fileno(stream));
  stream = fdopen(fddup, "r+");  /* try opening an existing file */
  if (!stream) stream = fdopen(fddup, "w");  /* create a new file is necessary */

  if (!stream) return 0;

  if (pos >= 0) fseeko(stream, pos, SEEK_SET);

  output = scdc_dataset_output_FX_create<FILE *>(output, conf, args, stream);

  if (!output) return 0;

  output->intern->type = SCDC_DATASET_INOUT_TYPE_STREAM;
  output->intern->destroy = scdc_dataset_output_streamdup_destroy;

  return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq %rcx, 0x8(%rsp)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2d0fa
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x7, %esi
callq *%rax
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0x2d109
movq 0x5ee9f(%rip), %rax     # 0x8bfa0
movq (%rax), %rdi
movq %rdi, 0x8(%rsp)
testq %r15, %r15
je 0x2d1a6
callq 0xb680
movq %rax, %r12
movq 0x8(%rsp), %rdi
callq 0xb560
movl %eax, %edi
callq 0xb830
movl %eax, %ebp
leaq 0x3e57e(%rip), %rsi     # 0x6b6b2
movl %eax, %edi
callq 0xb570
movq %rax, 0x8(%rsp)
testq %rax, %rax
jne 0x2d15d
leaq 0x3e569(%rip), %rsi     # 0x6b6b5
movl %ebp, %edi
callq 0xb570
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x2d1a6
testq %r12, %r12
js 0x2d174
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xb2e0
movq 0x8(%rsp), %rax
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x30826
movq %rax, %rbx
testq %rax, %rax
je 0x2d1a6
movq 0x48(%rbx), %rax
movq $0x6, 0x8(%rax)
leaq 0x4050(%rip), %rcx      # 0x311f0
movq %rcx, 0x20(%rax)
jmp 0x2d1a8
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d1c4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_file_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_output_t *scdc_dataset_output_file_create(scdc_dataset_output_t *output, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  const char *filename;
  xargs.get<const char *>(SCDC_ARGS_TYPE_CSTR, &filename);

  SCDC_TRACE("scdc_dataset_output_file_create: filename: '" << filename << "'");

  if (!output) return 0;

  FILE *file = fopen(filename, (z_fs_exists(filename))?"r+":"w");

  if (!file)
  {
    SCDC_TRACE("scdc_dataset_output_file_create: file '" << filename << "' failed!");
    return 0;
  }

  output = scdc_dataset_output_FX_create<FILE *>(output, conf, args, file);

  if (!output)
  {
    fclose(file);
    return 0;
  }

  output->intern->type = SCDC_DATASET_INOUT_TYPE_FILE;
  output->intern->destroy = scdc_dataset_output_file_destroy;

  return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm0, -0x20(%rax)
movaps %xmm1, -0x10(%rax)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2d22a
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x4, %esi
callq *%rax
testq %r15, %r15
je 0x2d29b
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x35764
testq %rax, %rax
leaq 0x3e46f(%rip), %rax     # 0x6b6b5
leaq 0x3e465(%rip), %rsi     # 0x6b6b2
cmoveq %rax, %rsi
movq %r12, %rdi
callq 0xb640
testq %rax, %rax
je 0x2d29b
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x30826
movq %rax, %rbx
testq %rax, %rax
je 0x2d293
movq 0x48(%rbx), %rax
movq $0x8, 0x8(%rax)
leaq 0x3faf(%rip), %rcx      # 0x3123c
movq %rcx, 0x20(%rax)
jmp 0x2d29d
movq %r12, %rdi
callq 0xb4f0
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2d2b8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_destroy
void scdc_dataset_output_destroy(scdc_dataset_output_t *output)
{
  SCDC_TRACE_DATASET_OUTPUT(output, "scdc_dataset_output_destroy: ");

  if (!output)
  {
    SCDC_FAIL("scdc_dataset_output_destroy: no output given");
    return;
  }

  if (!output->intern) return;

  INOUT_INTERN_RESTORE(output);

  if (output->intern->destroy) output->intern->destroy(output);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2d59b
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x2d636
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rdi)
movq 0x18(%rax), %rcx
movq %rcx, 0x40(%rdi)
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x2d636
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x5efce(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x2d636
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x3cbe1(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3daea(%rip), %rsi     # 0x6b0c5
movl $0xf, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3db49(%rip), %rsi     # 0x6b138
movl $0x2c, %edx
movq %rbx, %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
movq (%r14), %rdi
addq $0x20, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb3b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_redirect_intern
scdcint_t scdc_dataset_input_redirect_intern(scdc_dataset_input_t *input, const char *conf, scdc_args_t *args)
{
  SCDC_TRACE("scdc_dataset_input_redirect_intern: conf: '" << conf << "'");

  if (!input)
  {
    SCDC_FAIL("scdc_dataset_input_redirect_intern: no input given");
    return SCDC_FAILURE;
  }

  return scdc_dataset_inout_redirect_intern(input, conf, args);
}

// Assembly:
testq %rdi, %rdi
jne 0x2d6ff
pushq %r14
pushq %rbx
pushq %rax
leaq 0x5ef04(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x2d6f5
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x3cb1b(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3da24(%rip), %rsi     # 0x6b0c5
movl $0xf, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3dab0(%rip), %rsi     # 0x6b165
movl $0x32, %edx
movq %rbx, %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
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_output_redirect_intern
scdcint_t scdc_dataset_output_redirect_intern(scdc_dataset_output_t *output, const char *conf, scdc_args_t *args)
{
  SCDC_TRACE("scdc_dataset_output_redirect_intern: conf: '" << conf << "'");

  if (!output)
  {
    SCDC_FAIL("scdc_dataset_output_redirect_intern: no output given");
    return SCDC_FAILURE;
  }

  return scdc_dataset_inout_redirect_intern(output, conf, args);
}

// Assembly:
testq %rdi, %rdi
jne 0x2d6ff
pushq %r14
pushq %rbx
pushq %rax
leaq 0x5e4fd(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x2e0fc
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x3c114(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3d01d(%rip), %rsi     # 0x6b0c5
movl $0xf, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x3d0dc(%rip), %rsi     # 0x6b198
movl $0x34, %edx
movq %rbx, %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
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq