// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/dataset.c
// Function: generate_data_with_noisy_features_from_a_dataset
void generate_data_with_noisy_features_from_a_dataset(Datasetptr d, Instanceptr data, char* fname, double stdev, double percentage)
{
 /*!Last Changed 13.10.2004*/
 FILE* outfile;
 int i;
 Instanceptr tmp;
 double value;
 outfile = fopen(fname, "w");
 if (!outfile)
  {
   printf(m1248, fname);
   return;
  }
 tmp = data;
 while (tmp)
  {
   for (i = 0; i < d->featurecount; i++)
     switch (d->features[i].type)
      {
       case INTEGER:if (produce_random_value(0, 1) < percentage)
                     {
                      value = tmp->values[i].intvalue + produce_normal_value(0, stdev);
                      tmp->values[i].intvalue = (int) value;
                     }
                    break;
       case    REAL:if (produce_random_value(0, 1) < percentage)
                     {
                      value = tmp->values[i].floatvalue + produce_normal_value(0, stdev);
                      tmp->values[i].floatvalue = (double) value;
                     } 
                    break;
      }
   tmp = tmp->next;
  }
 print_instance_list(outfile, ' ', d, data);
 fclose(outfile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq 0xcc715(%rip), %rsi     # 0xe81be
callq 0x40c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1bad0
movq -0x18(%rbp), %rsi
leaq 0xc7702(%rip), %rdi     # 0xe31c6
movb $0x0, %al
callq 0x4030
jmp 0x1bc37
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x1bc18
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x1bc07
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
testl %eax, %eax
je 0x1bb29
jmp 0x1bb1c
movl -0x4c(%rbp), %eax
subl $0x2, %eax
je 0x1bb8f
jmp 0x1bbf7
xorps %xmm0, %xmm0
movsd 0xc64e4(%rip), %xmm1    # 0xe2018
callq 0x545a0
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1bb8d
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x20(%rbp), %xmm1
xorps %xmm0, %xmm0
callq 0xc4710
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
cvttsd2si -0x48(%rbp), %edx
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
jmp 0x1bbf7
xorps %xmm0, %xmm0
movsd 0xc647e(%rip), %xmm1    # 0xe2018
callq 0x545a0
movaps %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1bbf5
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x20(%rbp), %xmm1
xorps %xmm0, %xmm0
callq 0xc4710
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1bbf7
jmp 0x1bbf9
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1baea
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x1bad8
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x20, %esi
callq 0x44c60
movq -0x30(%rbp), %rdi
callq 0x4250
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)