// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataprov/dataprov_bench.cc
// Function: scdc_dataset_bench::do_cmd_put(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_put(const string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
    {
      SCDC_TRACE("dataset_bench: do_cmd_put: '" << params << "'");

      string p = trim(params);

      scdcint_t total_size = (p.size() > 0)?atoll(p.c_str()):-1;

      FILE *file = 0;

      if (mode == "file") file = fopen("/dev/null", "w");

      bool ret = true;

      while (ret)
      {
        /* min of data left and current size */
        scdcint_t size = min(total_size, SCDC_DATASET_INOUT_BUF_CURRENT(input));

        SCDC_TRACE("do_cmd_put: put data of size = " << size);

        if (file) size = fwrite(SCDC_DATASET_INOUT_BUF_PTR(input), 1, size, file);

        total_size -= size;

        if (!input->next || total_size == 0) break;

        ret = input->next(input, 0);
      }

      if (file) fclose(file);

      return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x1d0a0
leaq 0x3092d(%rip), %rsi     # 0x6b52b
movl $0x2, %ecx
movq %r15, %rdi
movq $-0x1, %rdx
callq 0xb920
cmpq $-0x1, %rax
je 0x3ac35
leaq 0x1(%rax), %rdx
movq 0x8(%rsp), %rcx
cmpq %rax, %rcx
jbe 0x3ad68
movq %rdx, 0x8(%rsp)
addq (%rsp), %rdx
jmp 0x3ac42
movq $0x0, 0x8(%rsp)
movq (%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x308df(%rip), %rsi     # 0x6b52b
movq %rsp, %r15
movl $0x2, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0xb980
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xb0e0
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x1d0a0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3aca0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
cmpq $0x0, 0x28(%rsp)
je 0x3acb7
movq 0x20(%rsp), %rdi
callq 0xb3e0
movq %rax, %r15
jmp 0x3acbe
movq $-0x1, %r15
addq $0x78, %r14
leaq 0x309b5(%rip), %rsi     # 0x6b67e
movq %r14, %rdi
callq 0xb110
testl %eax, %eax
je 0x3acda
xorl %r14d, %r14d
jmp 0x3acf0
leaq 0x307a2(%rip), %rdi     # 0x6b483
leaq 0x309cd(%rip), %rsi     # 0x6b6b5
callq 0xb640
movq %rax, %r14
movq 0x20(%rbx), %r12
cmpq %r15, %r12
cmovgeq %r15, %r12
testq %r14, %r14
je 0x3ad17
movq 0x10(%rbx), %rdi
movl $0x1, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0xba90
movq %rax, %r12
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x3ad34
cmpq %r12, %r15
je 0x3ad34
movq %rbx, %rdi
xorl %esi, %esi
callq *%rax
subq %r12, %r15
testq %rax, %rax
jne 0x3acf0
testq %r14, %r14
je 0x3ad41
movq %r14, %rdi
callq 0xb4f0
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ad58
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2f847(%rip), %rdi     # 0x6a5b6
leaq 0x2f82c(%rip), %rsi     # 0x6a5a2
xorl %eax, %eax
callq 0xb820
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3adaa
movq 0x10(%rsp), %rsi
jmp 0x3ada2
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x3adaa
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0