// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/dataset.c
// Function: read_kernel_of_dataset
int read_kernel_of_dataset(Datasetptr d)
{
 int i, j;
 char *st, myline[READLINELENGTH], *kernelfilename;
 FILE* infile;
 kernelfilename = kernel_file_name(d); 
 infile = fopen(kernelfilename, "r");
 if (!infile)
  {
   printf(m1476, kernelfilename);
   safe_free(kernelfilename);
   return 0;
  }
 if (d->kernel != NULL)
  {
   matrix_free(*(d->kernel));
   safe_free(d->kernel);
  }
 d->kernel = safemalloc(sizeof(matrix), "read_kernel_of_dataset", 10);
 *(d->kernel) = matrix_alloc(d->datacount, d->datacount);
 i = 0;
 while (fgets(myline, READLINELENGTH, infile))
  {
   if (strlen(myline) <= 1)
     continue;
   myline[strlen(myline) - 1] = '\0';
   st = strtok(myline, " ");
   j = 0;
   while (st)
    {
     d->kernel->values[i][j] = atof(st);
     j++;
     st = strtok(NULL, " ");
    }
   if (j != d->datacount)
    {
     printf(m1469, i + 1, d->datacount);
     matrix_free(*(d->kernel));
     safe_free(d->kernel);
     d->kernel = NULL;
     safe_free(kernelfilename);
     return 0;
    }
   i++;
  }
 if (i != d->datacount)
  {
   printf(m1470, d->datacount);
   matrix_free(*(d->kernel));
   safe_free(d->kernel);
   d->kernel = NULL;
   safe_free(kernelfilename);
   return 0;
  }
 fclose(infile);
 return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a170, %rsp          # imm = 0x7A170
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20d00
movq %rax, -0x7a148(%rbp)
movq -0x7a148(%rbp), %rdi
leaq 0xc7779(%rip), %rsi     # 0xe81a6
callq 0x40c0
movq %rax, -0x7a150(%rbp)
cmpq $0x0, -0x7a150(%rbp)
jne 0x20a70
movq -0x7a148(%rbp), %rsi
leaq 0xc3011(%rip), %rdi     # 0xe3a62
movb $0x0, %al
callq 0x4030
movq -0x7a148(%rbp), %rdi
callq 0x52e80
movl $0x0, -0x4(%rbp)
jmp 0x20cf1
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1407210(%rax)
je 0x20aa5
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x59ea0
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rdi
callq 0x52e80
movl $0x10, %edi
leaq 0xc2fd0(%rip), %rsi     # 0xe3a81
movl $0xa, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1407210(%rax)
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rax
movq %rax, -0x7a168(%rbp)
movq -0x10(%rbp), %rax
movl 0x1407120(%rax), %edi
movq -0x10(%rbp), %rax
movl 0x1407120(%rax), %esi
callq 0x57fc0
movq %rax, %rcx
movq -0x7a168(%rbp), %rax
movq %rcx, -0x7a160(%rbp)
movq %rdx, -0x7a158(%rbp)
movq -0x7a160(%rbp), %rcx
movq %rcx, (%rax)
movq -0x7a158(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x14(%rbp)
leaq -0x7a140(%rbp), %rdi
movq -0x7a150(%rbp), %rdx
movl $0x7a120, %esi          # imm = 0x7A120
callq 0x40f0
cmpq $0x0, %rax
je 0x20c6c
leaq -0x7a140(%rbp), %rdi
callq 0x4150
cmpq $0x1, %rax
ja 0x20b5e
jmp 0x20b28
leaq -0x7a140(%rbp), %rdi
callq 0x4150
subq $0x1, %rax
movb $0x0, -0x7a140(%rbp,%rax)
leaq -0x7a140(%rbp), %rdi
leaq 0xc4701(%rip), %rsi     # 0xe5285
callq 0x4230
movq %rax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x20be3
movq -0x20(%rbp), %rdi
callq 0x4100
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0xc46ad(%rip), %rsi     # 0xe5285
callq 0x4230
movq %rax, -0x20(%rbp)
jmp 0x20b94
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1407120(%rcx), %eax
je 0x20c5e
movl -0x14(%rbp), %esi
addl $0x1, %esi
movq -0x10(%rbp), %rax
movl 0x1407120(%rax), %edx
leaq 0xc2e8f(%rip), %rdi     # 0xe3a98
movb $0x0, %al
callq 0x4030
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x59ea0
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rdi
callq 0x52e80
movq -0x10(%rbp), %rax
movq $0x0, 0x1407210(%rax)
movq -0x7a148(%rbp), %rdi
callq 0x52e80
movl $0x0, -0x4(%rbp)
jmp 0x20cf1
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x20b28
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1407120(%rcx), %eax
je 0x20cde
movq -0x10(%rbp), %rax
movl 0x1407120(%rax), %esi
leaq 0xc2e3e(%rip), %rdi     # 0xe3aca
movb $0x0, %al
callq 0x4030
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x59ea0
movq -0x10(%rbp), %rax
movq 0x1407210(%rax), %rdi
callq 0x52e80
movq -0x10(%rbp), %rax
movq $0x0, 0x1407210(%rax)
movq -0x7a148(%rbp), %rdi
callq 0x52e80
movl $0x0, -0x4(%rbp)
jmp 0x20cf1
movq -0x7a150(%rbp), %rdi
callq 0x4250
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x7a170, %rsp          # imm = 0x7A170
popq %rbp
retq
nopl (%rax)