// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/instance.c
// Function: copy_of_instance
Instanceptr copy_of_instance(Instanceptr inst)
{
	/*!Last Changed 19.02.2005*/
	Instanceptr currentinstance;
	int i;
	if (!inst)
		 return NULL;
 currentinstance = (Instanceptr)safemalloc(sizeof(Instance), "copy_of_instance", 5);
 currentinstance->values = (union value*)safemalloc(current_dataset->multifeaturecount * sizeof(union value), "copy_of_instance", 6);
	for (i = 0; i < current_dataset->multifeaturecount; i++)
		 if (i != current_dataset->classdefno || current_dataset->classno == 0)
				 currentinstance->values[i].floatvalue = inst->values[i].floatvalue;
			else	 
				 currentinstance->values[i].stringindex = inst->values[i].stringindex;
 currentinstance->next = NULL;
 currentinstance->sublist = NULL;
 if (current_dataset->storetype == STORE_MULTILABEL)
  {
   currentinstance->class_labels = safemalloc(current_dataset->classno * sizeof(int), "copy_of_instance", 15);
   for (i = 0; i < current_dataset->classno; i++)
     currentinstance->class_labels[i] = inst->class_labels[i];  
  }
 else
   currentinstance->class_labels = NULL;
	return currentinstance;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x42cc0
movq $0x0, -0x8(%rbp)
jmp 0x42e4a
movl $0x30, %edi
leaq 0xa2928(%rip), %rsi     # 0xe55f4
movl $0x5, %edx
callq 0x52d70
movq %rax, -0x18(%rbp)
leaq 0xc2b5f(%rip), %rax     # 0x105840
movq (%rax), %rax
movslq 0x1c0(%rax), %rdi
shlq $0x3, %rdi
leaq 0xa28fe(%rip), %rsi     # 0xe55f4
movl $0x6, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xc2b25(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1c0(%rcx), %eax
jge 0x42d99
movl -0x1c(%rbp), %eax
leaq 0xc2b10(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1407128(%rcx), %eax
jne 0x42d4b
leaq 0xc2afe(%rip), %rax     # 0x105840
movq (%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0x42d6d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x42d89
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,8), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
jmp 0x42d8b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x42d11
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
leaq 0xc2a88(%rip), %rax     # 0x105840
movq (%rax), %rax
cmpl $0x4, 0x140713c(%rax)
jne 0x42e36
leaq 0xc2a75(%rip), %rax     # 0x105840
movq (%rax), %rax
movslq 0x10(%rax), %rdi
shlq $0x2, %rdi
leaq 0xa2817(%rip), %rsi     # 0xe55f4
movl $0xf, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xc2a3d(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x10(%rcx), %eax
jge 0x42e34
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x42df9
jmp 0x42e42
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)