// File: /workspace/github_c_makefile_star2_O2/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 0x846bb(%rip), %rsi     # 0x96546
pushq $0x2
popq %rdx
movl $0x1407278, %edi        # imm = 0x1407278
callq 0x34f59
movq %rax, %rbp
movl 0x1407124(%r12), %eax
movl %eax, 0x1407124(%rbp)
movl 0x140713c(%r12), %eax
movl %eax, 0x140713c(%rbp)
movsd 0x1407130(%r12), %xmm0
movsd %xmm0, 0x1407130(%rbp)
movb 0x1a8(%r12), %al
movb %al, 0x1a8(%rbp)
movl 0x1407138(%r12), %eax
movl %eax, 0x1407138(%rbp)
movq 0x8(%rbp), %rdi
movq 0x8(%r12), %rsi
callq 0x3604c
movq %rax, 0x8(%rbp)
movl 0x1c0(%r12), %eax
movl %eax, 0x1c0(%rbp)
movq 0x1b0(%rbp), %rdi
movq 0x1b0(%r12), %rsi
callq 0x3604c
movq %rax, 0x1b0(%rbp)
movl 0x1bc(%r12), %eax
movl %eax, 0x1bc(%rbp)
movl 0x1407120(%r12), %ecx
movl %ecx, 0x1407120(%rbp)
movl 0x10(%r12), %ecx
movl %ecx, 0x10(%rbp)
movl 0x1407128(%r12), %ecx
movl %ecx, 0x1407128(%rbp)
movsd 0x1407208(%r12), %xmm0
movsd %xmm0, 0x1407208(%rbp)
movl 0x1b8(%r12), %ecx
movl %ecx, 0x1b8(%rbp)
movl (%r12), %ecx
movl %ecx, (%rbp)
movl $0x30f08, %r15d         # imm = 0x30F08
leaq (%r15,%rbp), %rcx
movq %rcx, 0x8(%rsp)
addq %r12, %r15
movl $0x30f28, %ecx          # imm = 0x30F28
leaq (%r12,%rcx), %r13
movq %rbp, (%rsp)
addq %rcx, %rbp
xorl %r14d, %r14d
movq %r12, 0x10(%rsp)
cltq
cmpq %rax, %r14
jge 0x1204d
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, %rcx      # imm = 0x340
leaq (%r15,%rcx), %rbx
movq 0x10(%r15,%rcx), %rax
movq 0x8(%rsp), %rdx
movq %rax, 0x10(%rdx,%rcx)
movq 0x8(%r15,%rcx), %rax
movq %rax, 0x8(%rdx,%rcx)
movq (%r15,%rcx), %rax
movq %rax, (%rdx,%rcx)
movl 0x18(%r15,%rcx), %eax
movl %eax, 0x18(%rdx,%rcx)
xorl %r12d, %r12d
cltq
cmpq %rax, %r12
jge 0x1202d
movq (%rbp,%r12,8), %rdi
movq (%r13,%r12,8), %rsi
callq 0x3604c
movq %rax, (%rbp,%r12,8)
incq %r12
movl 0x18(%rbx), %eax
jmp 0x1200a
incq %r14
movq 0x10(%rsp), %r12
movl 0x1bc(%r12), %eax
movl $0x340, %ecx            # imm = 0x340
addq %rcx, %r13
addq %rcx, %rbp
jmp 0x11fa3
xorl %ebx, %ebx
movq (%rsp), %r14
movslq 0x10(%r12), %rax
cmpq %rax, %rbx
jge 0x12086
movq 0x18(%r14,%rbx,8), %rdi
movq 0x18(%r12,%rbx,8), %rsi
callq 0x3604c
movq %rax, 0x18(%r14,%rbx,8)
movl 0x1407140(%r12,%rbx,4), %eax
movl %eax, 0x1407140(%r14,%rbx,4)
incq %rbx
jmp 0x12053
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq