// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/statistics.c
// Function: find_cliques
void find_cliques(char** files, int filecount)
{
 BOOLEAN isclique, subset;
 char clique[MAXLENGTH];
 int *counts, **subsets, res, i, j, k, t, index, cliquecount = 0, *cliques = NULL, count = 0;
 Comparisonptr comparisons;
 comparisons = all_pairwise_comparisons(files, filecount, get_parameter_l("correctiontype"), get_parameter_l("testtype"));
 subsets = generate_subsets(filecount, &res, &counts);
 for (i = 0; i < res; i++)
   if (counts[i] > 1)
    {
     isclique = BOOLEAN_TRUE;
     for (j = 0; j < counts[i]; j++)
       for (k = j + 1; k < counts[i]; k++)
        {
         index = -1;
         for (t = 0; t < (filecount * (filecount - 1)) / 2; t++)
           if (comparisons[t].alg1 == subsets[i][j] && comparisons[t].alg2 == subsets[i][k])
            {
             index = t;
             break;
            }
         if (index == -1)
          {
           printf("Error in indexing\n");
           isclique = BOOLEAN_FALSE;
           break;           
          }
         if (!comparisons[index].accepted)
          {
           isclique = BOOLEAN_FALSE;
           break;
          }
        }
     if (isclique)
      {
       cliques = alloc(cliques, (cliquecount + 1) * sizeof(int), cliquecount + 1);
       cliques[cliquecount] = i;
       cliquecount++;
      }   
    }
 for (i = 0; i < cliquecount; i++)
  {
   subset = BOOLEAN_FALSE;
   for (j = 0; j < cliquecount; j++)
     if (i != j && is_subset(subsets[cliques[i]], subsets[cliques[j]], counts[cliques[i]], counts[cliques[j]]))
      {
       subset = BOOLEAN_TRUE;
       break;
      }
   if (!subset)
    {
     count++;
     sprintf(clique, "(");
     for (j = 0; j < counts[cliques[i]] - 1; j++)
       sprintf(clique, "%s%d ", clique, subsets[cliques[i]][j] + 1);
     sprintf(clique, "%s%d)", clique, subsets[cliques[i]][j] + 1);  
     write_array_variables("aout", count, 1, "s", clique);
    }
  }
 set_default_variable("out1", count + 0.0);
 for (i = 0; i < res; i++)
   if (counts[i] > 0)
     safe_free(subsets[i]);
 safe_free(subsets);
 safe_free(counts); 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a158, %rsp          # imm = 0x7A158
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x14a9d(%rip), %rdi     # 0x95938
callq 0x4cf11
movl %eax, %ebp
leaq 0x19528(%rip), %rdi     # 0x9a3d1
callq 0x4cf11
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %eax, %ecx
callq 0x80c96
movq %rax, %r15
leaq 0x1c(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movl %r14d, %edi
callq 0x34903
movq %rax, %rbx
leal -0x1(%r14), %eax
imull %r14d, %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
xorl %r13d, %r13d
testl %eax, %eax
cmovlel %r13d, %eax
imulq $0x18, %rax, %rbp
movl $0x0, 0xc(%rsp)
movq $0x0, 0x20(%rsp)
movslq 0x1c(%rsp), %rax
cmpq %rax, %r13
jge 0x80fc3
movq 0x10(%rsp), %rax
movl (%rax,%r13,4), %eax
cmpl $0x2, %eax
jl 0x80fbb
xorl %edx, %edx
pushq $0x1
popq %r12
pushq $0x1
popq %rcx
movslq %eax, %rsi
cmpq %rsi, %rdx
jge 0x80f8f
leaq 0x1(%rdx), %r14
movq %r12, %rsi
cmpl %esi, %eax
jle 0x80f87
xorl %edi, %edi
cmpq %rdi, %rbp
je 0x80f70
movl (%r15,%rdi), %r9d
movq (%rbx,%r13,8), %r8
cmpl (%r8,%rdx,4), %r9d
jne 0x80f5d
movl 0x4(%r15,%rdi), %r9d
cmpl (%r8,%rsi,4), %r9d
je 0x80f63
addq $0x18, %rdi
jmp 0x80f3f
incq %rsi
cmpl $0x0, 0x10(%r15,%rdi)
jne 0x80f39
jmp 0x80f85
leaq 0x207f6(%rip), %rdi     # 0xa176d
callq 0x4090
movq 0x10(%rsp), %rax
movl (%rax,%r13,4), %eax
xorl %ecx, %ecx
incq %r12
movq %r14, %rdx
jmp 0x80f2a
testl %ecx, %ecx
je 0x80fbb
movl 0xc(%rsp), %edx
movslq %edx, %r14
incl %edx
leaq 0x4(,%r14,4), %rsi
movq 0x20(%rsp), %rdi
movl %edx, 0xc(%rsp)
callq 0x34f30
movq %rax, 0x20(%rsp)
movl %r13d, (%rax,%r14,4)
incq %r13
jmp 0x80f01
movl 0xc(%rsp), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, 0x28(%rsp)
movl %eax, %ebp
leaq 0x20704(%rip), %r15     # 0xa16e3
leaq 0x30(%rsp), %r12
xorl %r13d, %r13d
movl $0x0, 0xc(%rsp)
cmpq 0x28(%rsp), %r13
je 0x810d6
xorl %r14d, %r14d
cmpq %r14, %rbp
je 0x8103b
cmpq %r14, %r13
je 0x81036
movq 0x20(%rsp), %rcx
movslq (%rcx,%r13,4), %rax
movq (%rbx,%rax,8), %rdi
movslq (%rcx,%r14,4), %rcx
movq (%rbx,%rcx,8), %rsi
movq 0x10(%rsp), %r8
movl (%r8,%rax,4), %edx
movl (%r8,%rcx,4), %ecx
callq 0x348cb
testl %eax, %eax
jne 0x810ce
incq %r14
jmp 0x80ffd
movw $0x28, 0x30(%rsp)
xorl %r14d, %r14d
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movslq (%rax,%r13,4), %rax
movslq (%rcx,%rax,4), %rcx
decq %rcx
cmpq %rcx, %r14
jge 0x8107e
movq (%rbx,%rax,8), %rax
movl (%rax,%r14,4), %ecx
incl %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x41b0
incq %r14
jmp 0x81045
movl 0xc(%rsp), %r15d
incl %r15d
movq (%rbx,%rax,8), %rax
movl (%rax,%r14,4), %ecx
incl %ecx
movq %r12, %rdi
leaq 0x2064f(%rip), %rsi     # 0xa16e9
movq %r12, %rdx
xorl %eax, %eax
callq 0x41b0
leaq 0x14705(%rip), %rdi     # 0x957b0
movl %r15d, 0xc(%rsp)
movl %r15d, %esi
leaq 0x20629(%rip), %r15     # 0xa16e3
pushq $0x1
popq %rdx
leaq 0x16e0d(%rip), %rcx     # 0x97ed1
movq %r12, %r8
xorl %eax, %eax
callq 0x2f310
incq %r13
jmp 0x80fef
cvtsi2sdl 0xc(%rsp), %xmm0
leaq 0x17e75(%rip), %rdi     # 0x98f58
callq 0x30597
xorl %r14d, %r14d
movslq 0x1c(%rsp), %rax
cmpq %rax, %r14
jge 0x8110f
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0x8110a
movq (%rbx,%r14,8), %rdi
callq 0x34ff7
incq %r14
jmp 0x810eb
movq %rbx, %rdi
callq 0x34ff7
movq 0x10(%rsp), %rdi
callq 0x34ff7
addq $0x7a158, %rsp          # imm = 0x7A158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq