// File: /workspace/github_cpp_makefile_star2_O3/mh0fm4[P]SCDC/src/components/dataset/dataset_inout.cc
// Function: scdc_dataset_input_produce_create(_scdc_dataset_inout_t*, char const*, _scdc_args_t*)
static scdc_dataset_inout_t *scdc_dataset_input_produce_create(scdc_dataset_input_t *input, const char *conf, scdc_args_t *args)
{
  scdc_args xargs(args);

  scdcint_t total_size = 0;

  xargs.get<scdcint_t>(SCDC_ARGS_TYPE_SCDCINT, &total_size);

  scdcint_t size = DEFAULT_DATASET_INOUT_BUF_SIZE;

  stringlist confs(':', conf);

  if (confs.front() == "size")
  {
    xargs.get<scdcint_t>(SCDC_ARGS_TYPE_SCDCINT, &size);
    confs.front_pop();
  }

  if (!input) return 0;

  if (!scdc_dataset_inout_alloc(input, size, sizeof(input_produce_data_t))) return 0;

  input->intern->type = SCDC_DATASET_INOUT_TYPE_PRODUCE;
  input->intern->destroy = scdc_dataset_input_produce_destroy;

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

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

  static_cast<input_produce_data_t *>(input->data)->total_size_left = total_size;

  input->next = input_produce_next;

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

  return input;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%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, 0x10(%rsp)
movq -0x18(%rax), %rax
testq %rax, %rax
je 0x2c49b
movq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movl $0x2, %esi
callq *%rax
movq $0x4000, 0x8(%rsp)      # imm = 0x4000
leaq 0x38(%rsp), %rdi
movl $0x3a, %esi
movq %r14, %rdx
movq $-0x1, %rcx
callq 0x1b83e
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x1bb82
leaq 0x3f0e4(%rip), %rsi     # 0x6b5b7
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xb110
movl %eax, %ebp
movq (%r14), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2c4fc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb510
testl %ebp, %ebp
jne 0x2c54e
movq 0x68(%rsp), %rax
testq %rax, %rax
je 0x2c51b
movq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x2, %esi
callq *%rax
leaq 0xa0(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x1b878
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c54e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0xb510
testq %rbx, %rbx
je 0x2c5da
movq 0x8(%rsp), %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2e36a
testb %al, %al
je 0x2c5da
movq 0x48(%rbx), %rax
movq $0xd, 0x8(%rax)
leaq 0x3651(%rip), %rcx      # 0x2fbd1
movq %rcx, 0x20(%rax)
movb $0x0, 0x4(%rbx)
movl $0x61746164, (%rbx)     # imm = 0x61746164
movq 0x10(%rsp), %rdx
movq %rdx, 0x28(%rbx)
movb $0x78, 0x30(%rbx)
movq 0x40(%rbx), %r14
movq %rdx, (%r14)
leaq 0x364b(%rip), %rax      # 0x2fbf4
movq %rax, 0x38(%rbx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rax
cmpq %rdx, %rax
cmovlq %rax, %rdx
movq %rdx, 0x20(%rbx)
xorl %esi, %esi
callq 0xb2d0
movq 0x20(%rbx), %rax
subq %rax, (%r14)
jg 0x2c5dc
movq $0x0, 0x38(%rbx)
jmp 0x2c5dc
xorl %ebx, %ebx
leaq 0x38(%rsp), %rdi
callq 0x1bad0
leaq 0x60(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2c603
jmp 0x2c612
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x1bad0
jmp 0x2c615
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x1b76c
movq %rbx, %rdi
callq 0xb9c0