// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dataset.c
// Function: copy_of_dataset
Datasetptr copy_of_dataset(Datasetptr d)
{
 int i, j;
 Datasetptr tmp;
 tmp = safemalloc(sizeof(Dataset), "copy_of_dataset", 2);
 tmp->traincount = d->traincount;
 tmp->storetype = d->storetype;
 tmp->sigma = d->sigma;
 tmp->separator = d->separator;
 tmp->newclassdefno = d->newclassdefno;
 tmp->name = strcopy(tmp->name, d->name);
 tmp->multifeaturecount = d->multifeaturecount;
 tmp->file = strcopy(tmp->file, d->file);
 tmp->featurecount = d->featurecount;
 tmp->datacount = d->datacount;
 tmp->classno = d->classno;
 tmp->classdefno = d->classdefno;
 tmp->baseerror = d->baseerror;
 tmp->allfeatures = d->allfeatures;
 tmp->active = d->active;
 for (i = 0; i < d->featurecount; i++)
  {
   tmp->selected[i] = d->selected[i];
   tmp->availability[i] = d->availability[i];
   tmp->features[i].max = d->features[i].max;
   tmp->features[i].min = d->features[i].min;
   tmp->features[i].oldtype = d->features[i].oldtype;
   tmp->features[i].type = d->features[i].type;
   tmp->features[i].valuecount = d->features[i].valuecount;
   for (j = 0; j < d->features[i].valuecount; j++)
     tmp->features[i].strings[j] = strcopy(tmp->features[i].strings[j], d->features[i].strings[j]);
  }
 for (i = 0; i < d->classno; i++)
  {
   tmp->classes[i] = strcopy(tmp->classes[i], d->classes[i]);
   tmp->classcounts[i] = d->classcounts[i];
  }
 return tmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r12
leaq 0x9075a(%rip), %rsi     # 0xa3562
movl $0x1407278, %edi        # imm = 0x1407278
movl $0x2, %edx
callq 0x390f5
movq %rax, %rbx
movl 0x1407124(%r12), %eax
movl %eax, 0x1407124(%rbx)
movl 0x140713c(%r12), %eax
movl %eax, 0x140713c(%rbx)
movsd 0x1407130(%r12), %xmm0
movsd %xmm0, 0x1407130(%rbx)
movb 0x1a8(%r12), %al
movb %al, 0x1a8(%rbx)
movl 0x1407138(%r12), %eax
movl %eax, 0x1407138(%rbx)
movq 0x8(%rbx), %rdi
movq 0x8(%r12), %rsi
callq 0x3a404
movq %rax, 0x8(%rbx)
movl 0x1c0(%r12), %eax
movl %eax, 0x1c0(%rbx)
movq 0x1b0(%rbx), %rdi
movq 0x1b0(%r12), %rsi
callq 0x3a404
movq %rax, 0x1b0(%rbx)
movl 0x1bc(%r12), %eax
movl %eax, 0x1bc(%rbx)
movl 0x1407120(%r12), %eax
movl %eax, 0x1407120(%rbx)
movl 0x10(%r12), %eax
movl %eax, 0x10(%rbx)
movl 0x1407128(%r12), %eax
movl %eax, 0x1407128(%rbx)
movsd 0x1407208(%r12), %xmm0
movsd %xmm0, 0x1407208(%rbx)
movl 0x1b8(%r12), %eax
movl %eax, 0x1b8(%rbx)
movl (%r12), %eax
movq %rbx, (%rsp)
movl %eax, (%rbx)
cmpl $0x0, 0x1bc(%r12)
jle 0x12fe3
movl $0x30f08, %r15d         # imm = 0x30F08
movq (%rsp), %rbp
leaq (%r15,%rbp), %rax
movq %rax, 0x8(%rsp)
addq %r12, %r15
movl $0x30f28, %eax          # imm = 0x30F28
leaq (%r12,%rax), %r13
addq %rax, %rbp
xorl %r14d, %r14d
movq %r12, 0x10(%rsp)
movl 0x18864(%r12,%r14,4), %eax
movq (%rsp), %rcx
movl %eax, 0x18864(%rcx,%r14,4)
movl 0x1c4(%r12,%r14,4), %eax
movl %eax, 0x1c4(%rcx,%r14,4)
imulq $0x340, %r14, %rbx      # imm = 0x340
movq 0x10(%r15,%rbx), %rax
movq 0x8(%rsp), %rcx
movq %rax, 0x10(%rcx,%rbx)
movq 0x8(%r15,%rbx), %rax
movq %rax, 0x8(%rcx,%rbx)
movl 0x4(%r15,%rbx), %eax
movl %eax, 0x4(%rcx,%rbx)
movl (%r15,%rbx), %eax
movl %eax, (%rcx,%rbx)
movl 0x18(%r15,%rbx), %eax
movl %eax, 0x18(%rcx,%rbx)
cmpl $0x0, 0x18(%r15,%rbx)
jle 0x12fbf
addq %r15, %rbx
xorl %r12d, %r12d
movq (%rbp,%r12,8), %rdi
movq (%r13,%r12,8), %rsi
callq 0x3a404
movq %rax, (%rbp,%r12,8)
incq %r12
movslq 0x18(%rbx), %rax
cmpq %rax, %r12
jl 0x12f9f
incq %r14
movq 0x10(%rsp), %r12
movslq 0x1bc(%r12), %rax
movl $0x340, %ecx            # imm = 0x340
addq %rcx, %r13
addq %rcx, %rbp
cmpq %rax, %r14
jl 0x12f34
cmpl $0x0, 0x10(%r12)
movq (%rsp), %r14
jle 0x13022
xorl %ebx, %ebx
movq 0x18(%r14,%rbx,8), %rdi
movq 0x18(%r12,%rbx,8), %rsi
callq 0x3a404
movq %rax, 0x18(%r14,%rbx,8)
movl 0x1407140(%r12,%rbx,4), %eax
movl %eax, 0x1407140(%r14,%rbx,4)
incq %rbx
movslq 0x10(%r12), %rax
cmpq %rax, %rbx
jl 0x12ff1
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq