// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/lerils.c
// Function: generate_rule_pool
Ruleset generate_rule_pool(Instanceptr instances, int positive, int M, double p1)
{
 double **thresholds;
 int i, j, k, p, *counts, size, pos, **relevant, bestbit, bestp, bestdirection;
 Decisionconditionptr** included;
 Decisionconditionptr current;
 Decisionruleptr current_rule;
 Instanceptr tmp;
 Ruleset result;
 double prob, best_description_length, description_length;
 empty_ruleset(&result);
 size = data_size(instances);
 thresholds = safecalloc(current_dataset->featurecount, sizeof(double*), "learn_ruleset_lerils_oneclass", 4);
 counts = safecalloc(current_dataset->featurecount, sizeof(int), "learn_ruleset_lerils_oneclass", 5);
 for (i = 0; i < current_dataset->featurecount; i++)
   if (in_list(current_dataset->features[i].type, 2, INTEGER, REAL))
     thresholds[i] = possible_split_points(instances, i, &(counts[i]));
 included = (Decisionconditionptr**) safemalloc_2d(sizeof(Decisionconditionptr*), sizeof(Decisionconditionptr), M, current_dataset->featurecount, "generate_rule_pool", 10);
 relevant = (int**) safemalloc_2d(sizeof(int *), sizeof(int), M, current_dataset->featurecount, "generate_rule_pool", 11);
 for (i = 0; i < M; i++)
  {
   do{
      pos = myrand() % size;
      tmp = data_x(instances, pos);
   }while (give_classno(tmp) != positive);
   for (j = 0; j < current_dataset->featurecount; j++)
     if (current_dataset->features[j].type != CLASSDEF)
      {
       current = empty_condition();
       current->conditiontype = UNIVARIATE_CONDITION;
       current->freeparam = 1;
       current->featureindex = j;
       included[i][j] = current;
       prob = produce_random_value(0.0, 1.0);
       if (prob < 0.5)
         relevant[i][j] = YES;
       else
         relevant[i][j] = NO;
       switch (current_dataset->features[j].type)
        {
         case INTEGER:pos = split_point_lower_and_upper_limits(tmp->values[j].intvalue, thresholds[j], counts[j]);
                      current->comparison = '*';
                      current->upperlimit = thresholds[j][pos + 1];
                      current->lowerlimit = thresholds[j][pos];
                      current->datasize = pos;
                      current->value = pos + 1;
                      break;
         case    REAL:pos = split_point_lower_and_upper_limits(tmp->values[j].floatvalue, thresholds[j], counts[j]);
                      current->comparison = '*';
                      current->upperlimit = thresholds[j][pos + 1];
                      current->lowerlimit = thresholds[j][pos];
                      current->datasize = pos;
                      current->value = pos + 1;
                      break;
         case  STRING:current->comparison = '=';
                      current->value = tmp->values[j].stringindex;
                      break;
        }
      }
     else
       relevant[i][j] = NO;
   /*Random walk*/
   for (j = 0; j < 3 * (current_dataset->featurecount - 1); j++)
    {
     prob = produce_random_value(0.0, 1.0);
     if (prob < p1)
      {
       do{
         pos = myrand() % current_dataset->featurecount;
       }while (current_dataset->features[pos].type == CLASSDEF); 
       relevant[i][pos] = 1 - relevant[i][pos];
      }
     else
      {
       best_description_length = description_length_of_rule_lerils(included[i], relevant[i], instances, positive);
       bestbit = -1;
       for (k = 0; k < current_dataset->featurecount; k++)
         if (current_dataset->features[k].type != CLASSDEF)
          {
           if (current_dataset->features[k].type == STRING || relevant[i][k])
            {
             relevant[i][k] = 1 - relevant[i][k];
             if (rule_cover_instance_lerils(included[i], relevant[i], tmp))
              {
               description_length = description_length_of_rule_lerils(included[i], relevant[i], instances, positive);
               if (description_length < best_description_length)
                {
                 bestbit = k;
                 best_description_length = description_length;
                }
              }
             relevant[i][k] = 1 - relevant[i][k];
            }
           else
             if (!relevant[i][k])
              {
               relevant[i][k] = 1 - relevant[i][k];
               for (p = included[i][k]->datasize - 1; p >= 0; p--)
                {
                 included[i][k]->lowerlimit = thresholds[k][p];
                 if (rule_cover_instance_lerils(included[i], relevant[i], tmp))
                  {
                   description_length = description_length_of_rule_lerils(included[i], relevant[i], instances, positive);
                   if (description_length < best_description_length)
                    {
                     bestbit = k;
                     bestp = p;
                     bestdirection = -1;
                     best_description_length = description_length;
                    }
                  }
                }
               included[i][k]->lowerlimit = thresholds[k][included[i][k]->datasize];
               for (p = ((int)included[i][k]->value) + 1; p < counts[k]; p++)
                {
                 included[i][k]->upperlimit = thresholds[k][p];
                 if (rule_cover_instance_lerils(included[i], relevant[i], tmp))
                  {
                   description_length = description_length_of_rule_lerils(included[i], relevant[i], instances, positive);
                   if (description_length < best_description_length)
                    {
                     bestbit = k;
                     bestp = p;
                     bestdirection = +1;
                     best_description_length = description_length;
                    }
                  }
                }
               included[i][k]->upperlimit = thresholds[k][(int)included[i][k]->value];
               relevant[i][k] = 1 - relevant[i][k];
              }
          }
       if (bestbit != -1)
        {
         relevant[i][bestbit] = 1 - relevant[i][bestbit];
         if (relevant[i][bestbit] && current_dataset->features[bestbit].type != STRING)
          {
           if (bestdirection == -1)
             included[i][bestbit]->lowerlimit = thresholds[bestbit][bestp];
           else
             included[i][bestbit]->upperlimit = thresholds[bestbit][bestp];
          }
        }
      }
    }
   current_rule = empty_rule(positive);
   for (j = 0; j < current_dataset->featurecount; j++)
     if (relevant[i][j])
       add_condition(current_rule, create_copy_of_condition(included[i][j]));
   if (!rule_exists(result, current_rule))
     add_rule(&result, current_rule);
   else
    {
     free_rule(*current_rule);
     safe_free(current_rule);
    }
  }
 free_2d((void**)relevant, M);
 for (i = 0; i < M; i++)
  {
   for (j = 0; j < current_dataset->featurecount; j++)
     if (current_dataset->features[j].type != CLASSDEF)
      {
       free_condition(*(included[i][j]));
       safe_free(included[i][j]);
      }
   safe_free(included[i]);
  }
 safe_free(included);
 for (i = 0; i < current_dataset->featurecount; i++)
   if (counts[i] > 0)
     safe_free(thresholds[i]);
 safe_free(thresholds);
 safe_free(counts); 
 return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0xa0(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
callq 0xade30
movq -0x8(%rbp), %rdi
callq 0x449f0
movl %eax, -0x3c(%rbp)
leaq 0xb73bd(%rip), %rax     # 0x105840
movq (%rax), %rax
movslq 0x1bc(%rax), %rdi
movl $0x8, %esi
leaq 0x97e72(%rip), %rdx     # 0xe630b
movl $0x4, %ecx
callq 0x52f40
movq %rax, -0x20(%rbp)
leaq 0xb7392(%rip), %rax     # 0x105840
movq (%rax), %rax
movslq 0x1bc(%rax), %rdi
movl $0x4, %esi
leaq 0x97e47(%rip), %rdx     # 0xe630b
movl $0x5, %ecx
callq 0x52f40
movq %rax, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xb735d(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x4e55d
leaq 0xb734b(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x24(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl (%rax), %edi
movl $0x2, %ecx
xorl %edx, %edx
movl %ecx, %esi
movb $0x0, %al
callq 0x53e40
cmpl $0x0, %eax
je 0x4e54d
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x38(%rbp), %rdx
movslq -0x24(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
callq 0x4e010
movq %rax, %rdx
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x4e54f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4e4d9
movl -0x10(%rbp), %edx
leaq 0xb72d9(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1bc(%rax), %ecx
movl $0x8, %esi
leaq 0x97dad(%rip), %r8      # 0xe6329
movl $0xa, %r9d
movq %rsi, %rdi
callq 0x53120
movq %rax, -0x60(%rbp)
movl -0x10(%rbp), %edx
leaq 0xb72a8(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1bc(%rax), %ecx
movl $0x8, %edi
movl $0x4, %esi
leaq 0x97d77(%rip), %r8      # 0xe6329
movl $0xb, %r9d
callq 0x53120
movq %rax, -0x48(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4efdf
jmp 0x4e5d6
movb $0x0, %al
callq 0x54550
cltd
idivl -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x46c40
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x43530
cmpl -0xc(%rbp), %eax
jne 0x4e5d6
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
leaq 0xb722d(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x4e8a7
leaq 0xb7217(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x28(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x3, (%rax)
je 0x4e880
movb $0x0, %al
callq 0xadea0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x68(%rbp), %rax
movl $0x1, 0x3c(%rax)
movl -0x28(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, (%rax)
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
xorps %xmm0, %xmm0
movsd 0x93982(%rip), %xmm1    # 0xe2018
callq 0x545a0
movsd %xmm0, -0x80(%rbp)
movsd 0x94310(%rip), %xmm0    # 0xe29b8
ucomisd -0x80(%rbp), %xmm0
jbe 0x4e6c8
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x4e6df
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
leaq 0xb715a(%rip), %rax     # 0x105840
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %eax
movl %eax, -0xa4(%rbp)
testl %eax, %eax
je 0x4e72c
jmp 0x4e707
movl -0xa4(%rbp), %eax
subl $0x1, %eax
je 0x4e85d
jmp 0x4e718
movl -0xa4(%rbp), %eax
subl $0x2, %eax
je 0x4e7c6
jmp 0x4e87e
movq -0x78(%rbp), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x4e3c0
movl %eax, -0x40(%rbp)
movq -0x68(%rbp), %rax
movb $0x2a, 0x4(%rax)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movl -0x40(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, 0x38(%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x4e87e
movq -0x78(%rbp), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x4e3c0
movl %eax, -0x40(%rbp)
movq -0x68(%rbp), %rax
movb $0x2a, 0x4(%rax)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movl -0x40(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, 0x38(%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x4e87e
movq -0x68(%rbp), %rax
movb $0x3d, 0x4(%rax)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,8), %xmm0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x8(%rax)
jmp 0x4e897
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0x4e899
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4e609
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
leaq 0xb6f88(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
movl 0x1bc(%rcx), %ecx
subl $0x1, %ecx
imull $0x3, %ecx, %ecx
cmpl %ecx, %eax
jge 0x4eede
xorps %xmm0, %xmm0
movsd 0x9373e(%rip), %xmm1    # 0xe2018
callq 0x545a0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4e964
jmp 0x4e8f6
movb $0x0, %al
callq 0x54550
leaq 0xb6f3c(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cltd
idivl 0x1bc(%rcx)
movl %edx, -0x40(%rbp)
leaq 0xb6f28(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x40(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x3, (%rax)
je 0x4e8f6
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movl $0x1, %edx
subl (%rax,%rcx,4), %edx
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4eece
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %ecx
callq 0x4e2a0
movsd %xmm0, -0x88(%rbp)
movl $0xffffffff, -0x4c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
leaq 0xb6e98(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x4edf2
leaq 0xb6e82(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x2c(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x3, (%rax)
je 0x4ede2
leaq 0xb6e5b(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x2c(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x1, (%rax)
je 0x4ea1b
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x4eaf6
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl $0x1, %edx
subl (%rax,%rcx,4), %edx
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x78(%rbp), %rdx
callq 0x4e220
cmpl $0x0, %eax
je 0x4eac6
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %ecx
callq 0x4e2a0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm1
movsd -0x88(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4eac4
movl -0x2c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x4eac6
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl $0x1, %edx
subl (%rax,%rcx,4), %edx
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4ede0
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x4edde
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl $0x1, %edx
subl (%rax,%rcx,4), %edx
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x38(%rax), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jl 0x4ec2d
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x18(%rax)
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x78(%rbp), %rdx
callq 0x4e220
cmpl $0x0, %eax
je 0x4ec1d
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %ecx
callq 0x4e2a0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm1
movsd -0x88(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4ec1b
movl -0x2c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x50(%rbp)
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x4ec1d
jmp 0x4ec1f
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4eb58
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x60(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq 0x38(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x18(%rax)
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cvttsd2si 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x38(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x4ed6d
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x10(%rax)
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x78(%rbp), %rdx
callq 0x4e220
cmpl $0x0, %eax
je 0x4ed5d
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %ecx
callq 0x4e2a0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm1
movsd -0x88(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4ed5b
movl -0x2c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x50(%rbp)
movl $0x1, -0x54(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x4ed5d
jmp 0x4ed5f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4ec8e
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x60(%rbp), %rcx
movslq -0x24(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x2c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cvttsd2si 0x8(%rcx), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x10(%rax)
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl $0x1, %edx
subl (%rax,%rcx,4), %edx
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x4ede0
jmp 0x4ede2
jmp 0x4ede4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4e99e
cmpl $-0x1, -0x4c(%rbp)
je 0x4eecc
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x4c(%rbp), %rcx
movl $0x1, %edx
subl (%rax,%rcx,4), %edx
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x4c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x4c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x4eeca
leaq 0xb69f8(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x4c(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x1, (%rax)
je 0x4eeca
cmpl $-0x1, -0x54(%rbp)
jne 0x4ee9a
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x50(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x18(%rax)
jmp 0x4eec8
movq -0x20(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x50(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm0, 0x10(%rax)
jmp 0x4eeca
jmp 0x4eecc
jmp 0x4eece
jmp 0x4eed0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4e8ae
movl -0xc(%rbp), %edi
callq 0xad8b0
movq %rax, -0x70(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
leaq 0xb6945(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x4ef5c
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x4ef4f
movq -0x70(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xad480
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0xad950
jmp 0x4ef51
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4eef1
movq -0xa0(%rbp), %rcx
movq -0x70(%rbp), %rdi
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xdb870
cmpl $0x0, %eax
jne 0x4ef9c
movq -0xa0(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0xaea30
jmp 0x4efcf
movq -0x70(%rbp), %rcx
movq 0x30(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x30(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xadd10
movq -0x70(%rbp), %rdi
callq 0x52e80
jmp 0x4efd1
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4e5c8
movq -0x48(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x52e20
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4f0db
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
leaq 0xb6831(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x4f0bc
leaq 0xb681b(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x28(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x3, (%rax)
je 0x4f0ac
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movups 0x60(%rcx), %xmm0
movq %rsp, %rax
movups %xmm0, 0x60(%rax)
movups 0x50(%rcx), %xmm0
movups %xmm0, 0x50(%rax)
movups 0x40(%rcx), %xmm0
movups %xmm0, 0x40(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups 0x30(%rcx), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xadc90
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x52e80
jmp 0x4f0ae
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4f005
movq -0x60(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x52e80
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4eff2
movq -0x60(%rbp), %rdi
callq 0x52e80
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0xb674b(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x4f12c
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x4f11f
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x52e80
jmp 0x4f121
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4f0eb
movq -0x20(%rbp), %rdi
callq 0x52e80
movq -0x38(%rbp), %rdi
callq 0x52e80
movq -0x98(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop