// File: 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 %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x64919
movq -0x10(%rbp), %rsi
leaq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x64340
leaq -0x48(%rbp), %rdi
callq 0xc460
cmpq $0x0, %rax
jbe 0x64950
leaq -0x48(%rbp), %rdi
callq 0xc260
movq %rax, %rdi
callq 0xc500
movq %rax, -0x80(%rbp)
jmp 0x6495d
movq $-0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x6495d
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
addq $0x78, %rdi
leaq 0x42cbf(%rip), %rsi     # 0xa763b
callq 0x25b80
movb %al, -0x81(%rbp)
jmp 0x64989
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x64995
jmp 0x649d8
leaq 0x42a9e(%rip), %rdi     # 0xa743a
leaq 0x42ccf(%rip), %rsi     # 0xa7672
callq 0xc810
movq %rax, -0x90(%rbp)
jmp 0x649b1
movq -0x90(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x649d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xc3e0
jmp 0x64ac3
movb $0x1, -0x65(%rbp)
testb $0x1, -0x65(%rbp)
je 0x64a99
movq -0x18(%rbp), %rsi
addq $0x20, %rsi
leaq -0x50(%rbp), %rdi
callq 0x2b080
movq %rax, -0x98(%rbp)
jmp 0x64a00
movq -0x98(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x64a10
jmp 0x64a12
cmpq $0x0, -0x58(%rbp)
je 0x64a47
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x70(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl $0x1, %esi
callq 0xccb0
movq %rax, -0xa0(%rbp)
jmp 0x64a3c
movq -0xa0(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movq -0x50(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x64a68
cmpq $0x0, -0x50(%rbp)
jne 0x64a6a
jmp 0x64a99
movq -0x18(%rbp), %rdi
movq 0x38(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq %rax, -0xa8(%rbp)
jmp 0x64a81
movq -0xa8(%rbp), %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movb %al, -0x65(%rbp)
jmp 0x649dc
cmpq $0x0, -0x58(%rbp)
je 0x64aad
movq -0x58(%rbp), %rdi
callq 0xc680
jmp 0x64aab
jmp 0x64aad
leaq -0x48(%rbp), %rdi
callq 0xc3e0
movb $0x1, %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0xcba0
nopl (%rax)