LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/extractors.cpp
// Function: extractOK(iArray*, dArray*)
dArray *extractOK(iArray *okList,dArray *array){
  dArray *returnArray = allocDoubleArray(okList->x);
  int extractIndex;
  double var;
  for(int j=0;j<okList->x;j++){
    extractIndex = okList->array[j];
    var = array->array[extractIndex];
    returnArray->array[j] = var;
  }
  return returnArray;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %edi
callq 0xadcc
movslq (%r14), %rcx
testq %rcx, %rcx
jle 0x9774
movq 0x8(%r14), %rdx
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %rdi
xorl %r8d, %r8d
movslq (%rdx,%r8,4), %r9
movsd (%rsi,%r9,8), %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rcx
jne 0x975c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/extractors.cpp
// Function: extractOK(bArray*, dArray*)
dArray *extractOK(bArray *okList,dArray *array){
  dArray *returnArray = allocDoubleArray(okList->numTrue);
  int inPlace = 0;
  for(int j=0 ; j<okList->x ; j++){
    if(okList->array[j] == 1){
      returnArray->array[inPlace] = array->array[j];
      inPlace++;
    }
  }
  return returnArray;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %edi
callq 0xadcc
movslq (%r14), %rcx
testq %rcx, %rcx
jle 0x97c5
movq 0x8(%r14), %rdx
xorl %esi, %esi
xorl %edi, %edi
cmpl $0x1, (%rdx,%rsi,4)
jne 0x97bd
movq 0x8(%rbx), %r8
movsd (%r8,%rsi,8), %xmm0
movq 0x8(%rax), %r8
movslq %edi, %rdi
movsd %xmm0, (%r8,%rdi,8)
incl %edi
incq %rsi
cmpq %rsi, %rcx
jne 0x979e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/extractors.cpp
// Function: extractOK(bArray*, iArray*)
iArray *extractOK(bArray *okList,iArray *array){
  iArray *returnArray = allocIntArray(okList->numTrue);
  int inPlace = 0;
  for(int j=0 ; j<okList->x ; j++){
    if(okList->array[j] == 1){
      returnArray->array[inPlace] = array->array[j];
      inPlace++;
    }
  }
  return returnArray;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x4(%rdi), %rdi
callq 0xac62
cmpl $0x0, (%r14)
jle 0x9813
movq 0x8(%r14), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpl $0x1, (%rcx,%rdx,4)
jne 0x9808
movq 0x8(%rbx), %rdi
movl (%rdi,%rdx,4), %edi
movq 0x8(%rax), %r8
movslq %esi, %rsi
movl %edi, (%r8,%rsi,4)
incl %esi
incq %rdx
movslq (%r14), %rdi
cmpq %rdi, %rdx
jl 0x97ee
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/extractors.cpp
// Function: extractOK(bArray*, iMatrix*)
iMatrix *extractOK(bArray *okList,iMatrix *matr){
  iMatrix *returnMatrix = allocIntMatrix(matr->x,okList->numTrue);
  int atPos =0;
  for(int i=0;i<matr->y;i++)
    if(okList->array[i]){
      for(int j=0;j<matr->x;j++)
	returnMatrix->matrix[j][atPos] = matr->matrix [j] [i];
      atPos++;
    }
  return returnMatrix;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %edi
movl 0x4(%r14), %esi
callq 0xa5cc
cmpl $0x0, 0x4(%rbx)
jle 0x9880
movq 0x8(%r14), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpl $0x0, (%rcx,%rdx,4)
je 0x9874
cmpl $0x0, (%rbx)
jle 0x9872
movq 0x8(%rbx), %rdi
movq 0x8(%rax), %r8
movslq %esi, %r9
xorl %r10d, %r10d
movq (%rdi,%r10,8), %r11
movl (%r11,%rdx,4), %r11d
movq (%r8,%r10,8), %r14
movl %r11d, (%r14,%r9,4)
incq %r10
movslq (%rbx), %r11
cmpq %r11, %r10
jl 0x9857
incl %esi
incq %rdx
movslq 0x4(%rbx), %rdi
cmpq %rdi, %rdx
jl 0x983e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/extractors.cpp
// Function: extractOK(bArray*, usiMatrix*)
usiMatrix *extractOK(bArray *okList,usiMatrix *matr){
  usiMatrix *returnMatrix = allocUSIntMatrix(matr->x,okList->numTrue);
  int atPos =0;
  for(int i=0;i<matr->y;i++)
    if(okList->array[i]){
      for(int j=0;j<matr->x;j++)
	returnMatrix->matrix[j][atPos] = matr->matrix [j] [i];
      atPos++;
    }
  return returnMatrix;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %edi
movl 0x4(%r14), %esi
callq 0xa725
movslq 0x4(%rbx), %rcx
testq %rcx, %rcx
jle 0x98f1
movq 0x8(%r14), %rdx
xorl %esi, %esi
xorl %edi, %edi
cmpl $0x0, (%rdx,%rsi,4)
je 0x98e9
movslq (%rbx), %r8
testq %r8, %r8
jle 0x98e7
movq 0x8(%rbx), %r9
movq 0x8(%rax), %r10
movslq %edi, %r11
xorl %r14d, %r14d
movq (%r9,%r14,8), %r15
movzwl (%r15,%rsi,2), %ebp
movq (%r10,%r14,8), %r15
movw %bp, (%r15,%r11,2)
incq %r14
cmpq %r14, %r8
jne 0x98cd
incl %edi
incq %rsi
cmpq %rcx, %rsi
jne 0x98b1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/extractors.cpp
// Function: extract(dMatrix*, iArray*)
dArray *extract( dMatrix *var,iArray *choose){
  dArray *retVal = allocDoubleArray(choose->x-1);
   for (int i=1;i<var->y;i++){
    retVal->array[i-1]=var->matrix[choose->array[i]][i];
  }
  return retVal;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %edi
decl %edi
callq 0xadcc
movslq 0x4(%r14), %rcx
cmpq $0x2, %rcx
jl 0x9949
movq 0x8(%r14), %rdx
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %rdi
decq %rcx
xorl %r8d, %r8d
movslq 0x4(%rsi,%r8,4), %r9
movq (%rdx,%r9,8), %r9
movsd 0x8(%r9,%r8,8), %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rcx
jne 0x992b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/extractors.cpp
// Function: extract(iArray*, iArray*)
iArray *extract(iArray *var,iArray *choose){
  iArray *retVal = allocIntArray(var->x-1);
  for (int i=1;i<var->x;i++)
    retVal->array[i-1]=var->array[i-1-choose->array[i]];
  return retVal;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rdi
decq %rdi
callq 0xac62
cmpl $0x2, (%rbx)
jl 0x999f
movq 0x8(%rbx), %rcx
movq 0x8(%r14), %rdx
movq 0x8(%rax), %rsi
movl $0x1, %edi
movslq (%rdx,%rdi,4), %r8
shlq $0x2, %r8
movq %rcx, %r9
subq %r8, %r9
movl -0x4(%r9,%rdi,4), %r8d
movl %r8d, -0x4(%rsi,%rdi,4)
incq %rdi
movslq (%rbx), %r8
cmpq %r8, %rdi
jl 0x997c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocIntMatrix(int, int)
iMatrix *allocIntMatrix(int x, int y){
  try{
    iMatrix *tmp = new iMatrix();
    int **ppi = new int*[x];
    

    // int *curPtr = new int [x * y];
    for( int i = 0; i < x; ++i) {
      *(ppi + i) = new int[y];
      // curPtr += y;
    }
#if _fillup_
    for (int i=0;i<x;i++)
      for(int n=0;n<y;n++)
	ppi[i][n]=0;
#endif
    printf("\t-> Allocated: %.3f gig memory\n",(float)sizeof(int)*x*y/1000000000);
    tmp->matrix=ppi;
    tmp->x=x;
    tmp->y=y;
    return tmp;
  }catch(std::exception & e){
    printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(int)*x*y/1000000000);
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0x10, %edi
movl %ebp, 0x4(%rsp)
callq 0x2220
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movslq %ebp, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, %r15
movl %ebp, %r13d
testl %ebp, %ebp
jle 0xa647
movslq %ebx, %rax
leaq (,%rax,4), %rcx
testl %eax, %eax
movq $-0x1, %r12
cmovnsq %rcx, %r12
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x2030
movq %rax, (%r15,%rbp,8)
incq %rbp
cmpq %rbp, %r13
jne 0xa633
cmpl $0x0, 0x4(%rsp)
jle 0xa671
movl %ebx, %r12d
shlq $0x2, %r12
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0xa669
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2100
incq %rbp
cmpq %rbp, %r13
jne 0xa657
movl 0x4(%rsp), %ebp
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
mulss 0x3e70(%rip), %xmm0     # 0xe4f4
cvtsi2ss %ebx, %xmm1
mulss %xmm0, %xmm1
divss 0x3e64(%rip), %xmm1     # 0xe4f8
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x3e6e(%rip), %rdi      # 0xe510
movb $0x1, %al
callq 0x2040
movq %r15, 0x8(%r14)
movl %ebp, (%r14)
movl %ebx, 0x4(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa6ca
jmp 0xa6ca
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xa720
callq 0x20c0
xorps %xmm0, %xmm0
cvtsi2ssl 0x4(%rsp), %xmm0
mulss 0x3e0c(%rip), %xmm0     # 0xe4f4
cvtsi2ss %ebx, %xmm1
mulss %xmm0, %xmm1
divss 0x3e00(%rip), %xmm1     # 0xe4f8
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x3e2a(%rip), %rdi      # 0xe530
movb $0x1, %al
callq 0x2040
leaq 0x4081(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocUSIntMatrix(int, int)
usiMatrix *allocUSIntMatrix(int x, int y){
  try{
    usiMatrix *tmp = new usiMatrix();
    unsigned short int **ppi = new unsigned short int*[x];
    // int *curPtr = new int [x * y];
    for( int i = 0; i < x; ++i) {
      *(ppi + i) = new unsigned short int[y];
      // curPtr += y;
    }
#if _fillup_
    for (int i=0;i<x;i++)
      for(int n=0;n<y;n++)
	ppi[i][n]=0;
#endif
    printf("\t-> Allocated: %.3f gig memory\n",(float)sizeof(unsigned short int)*x*y/1000000000);
    tmp->matrix=ppi;
    tmp->x=x;
    tmp->y=y;
    return tmp;
  }catch(std::exception & e){
    printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(int)*x*y/1000000000);
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0x10, %edi
movl %ebp, 0x4(%rsp)
callq 0x2220
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movslq %ebp, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, %r15
movl %ebp, %r13d
testl %ebp, %ebp
jle 0xa79c
movslq %ebx, %rax
leaq (%rax,%rax), %rcx
testl %eax, %eax
movq $-0x1, %r12
cmovnsq %rcx, %r12
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x2030
movq %rax, (%r15,%rbp,8)
incq %rbp
cmpq %rbp, %r13
jne 0xa788
cmpl $0x0, 0x4(%rsp)
jle 0xa7c5
movl %ebx, %r12d
addq %r12, %r12
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0xa7bd
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2100
incq %rbp
cmpq %rbp, %r13
jne 0xa7ab
movl 0x4(%rsp), %ebp
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %ebx, %xmm1
mulss %xmm0, %xmm1
divss 0x3d14(%rip), %xmm1     # 0xe4f8
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x3d1e(%rip), %rdi      # 0xe510
movb $0x1, %al
callq 0x2040
movq %r15, 0x8(%r14)
movl %ebp, (%r14)
movl %ebx, 0x4(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa81a
jmp 0xa81a
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xa870
callq 0x20c0
xorps %xmm0, %xmm0
cvtsi2ssl 0x4(%rsp), %xmm0
mulss 0x3cbc(%rip), %xmm0     # 0xe4f4
cvtsi2ss %ebx, %xmm1
mulss %xmm0, %xmm1
divss 0x3cb0(%rip), %xmm1     # 0xe4f8
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x3cda(%rip), %rdi      # 0xe530
movb $0x1, %al
callq 0x2040
leaq 0x3f31(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: killSnpMatrix(snpMatrix*)
void killSnpMatrix(snpMatrix *mat){
  killMatrix(mat->pba);
  killMatrix(mat->dprime);
  killMatrix(mat->pbA);
  killMatrix(mat->pBa);
  killMatrix(mat->pBA);
  killMatrix(mat->rmisc);
  killMatrix(mat->D);
  killMatrix(mat->lod);
  delete mat;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xa938
movq (%rbx), %rdi
callq 0xa938
movq 0x10(%rbx), %rdi
callq 0xa938
movq 0x18(%rbx), %rdi
callq 0xa938
movq 0x20(%rbx), %rdi
callq 0xa938
movq 0x28(%rbx), %rdi
callq 0xa938
movq 0x30(%rbx), %rdi
callq 0xa938
movq 0x38(%rbx), %rdi
callq 0xa938
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: killPars(pars*)
void killPars(pars *mat){
  killArray(mat->Sk1);
  killArray(mat->Sk2);
  killArray(mat->Sk3);
  killArray(mat->t);
  killMatrix(mat->S);
  killArray(mat->maf);
  killArray(mat->maf2);
  killArray(mat->ind1);
  killArray(mat->ind2);
  //killArray(mat->pos);
  //killArray(mat->chr);
  delete mat;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xa875
movq 0x8(%rbx), %rdi
callq 0xa875
movq 0x10(%rbx), %rdi
callq 0xa875
movq 0x18(%rbx), %rdi
callq 0xa875
movq 0x20(%rbx), %rdi
callq 0xa938
movq 0x30(%rbx), %rdi
callq 0xa875
movq 0x38(%rbx), %rdi
callq 0xa875
movq 0x40(%rbx), %rdi
callq 0xa8c3
movq 0x48(%rbx), %rdi
callq 0xa8c3
movl $0x78, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocDoubleMatrix(int, int)
dMatrix *allocDoubleMatrix(int x, int y){
  try{
    dMatrix *tmp = new dMatrix();
    double **ppi = new double*[x];
    double *curPtr = new double [x * y];
    
    for( int i = 0; i < x; ++i) {
      *(ppi + i) = curPtr;
      curPtr += y;
    }
#if _fillup_
    for (int i=0;i<x;i++)
      for(int n=0;n<y;n++)
	ppi[i][n]=0;
#endif
    tmp->matrix=ppi;
    tmp->x=x;
    tmp->y=y;
    return tmp;
  }catch(std::exception & e){
        printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(double)*x*y/1000000000);
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0x10, %edi
callq 0x2220
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movslq %ebp, %rax
leaq (,%rax,8), %rdi
testl %eax, %eax
movq $-0x1, %r12
cmovsq %r12, %rdi
callq 0x2030
movq %rax, %r15
movl %ebx, %eax
imull %ebp, %eax
cltq
leaq (,%rax,8), %rdi
testl %eax, %eax
cmovsq %r12, %rdi
callq 0x2030
movl %ebp, %r13d
testl %ebp, %ebp
jle 0xaad4
movslq %ebx, %rcx
shlq $0x3, %rcx
xorl %edx, %edx
movq %rax, (%r15,%rdx,8)
incq %rdx
addq %rcx, %rax
cmpq %rdx, %r13
jne 0xaac5
movl %ebp, 0x4(%rsp)
testl %ebp, %ebp
jle 0xaaff
movl %ebx, %r12d
shlq $0x3, %r12
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0xaaf7
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2100
incq %rbp
cmpq %rbp, %r13
jne 0xaae5
movq %r15, 0x8(%r14)
movl 0x4(%rsp), %eax
movl %eax, (%r14)
movl %ebx, 0x4(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xab24
jmp 0xab24
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xab78
callq 0x20c0
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
mulss 0x39bc(%rip), %xmm0     # 0xe4fc
cvtsi2ss %ebx, %xmm1
mulss %xmm0, %xmm1
divss 0x39a8(%rip), %xmm1     # 0xe4f8
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x39d2(%rip), %rdi      # 0xe530
movb $0x1, %al
callq 0x2040
leaq 0x3c29(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocDoubleMatrix(int, int, float)
dMatrix *allocDoubleMatrix(int x, int y,float inputVar){
  dMatrix *retVal = allocDoubleMatrix(x,y);
  for (int i=0;i<x;i++)
    for(int n=0;n<y;n++)
      retVal->matrix[i][n]= inputVar;

  return retVal;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movl %esi, %ebx
movl %edi, %ebp
callq 0xaa59
testl %ebp, %ebp
jle 0xac5b
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rsp), %xmm0
movl %ebp, %ecx
movl %ebx, %esi
leal 0x1(%rbx), %edx
decq %rsi
movq %rsi, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
shrl %edx
shlq $0x4, %rdx
xorl %esi, %esi
movdqa 0x24ac(%rip), %xmm2     # 0xd070
movdqa 0x24b4(%rip), %xmm3     # 0xd080
pxor %xmm3, %xmm1
pcmpeqd %xmm4, %xmm4
movdqa 0x3924(%rip), %xmm5     # 0xe500
testl %ebx, %ebx
jle 0xac53
movq 0x8(%rax), %rdi
movq (%rdi,%rsi,8), %rdi
xorl %r8d, %r8d
movdqa %xmm2, %xmm6
movdqa %xmm6, %xmm7
pxor %xmm3, %xmm7
movdqa %xmm7, %xmm8
pcmpgtd %xmm1, %xmm8
pcmpeqd %xmm1, %xmm7
pshufd $0xf5, %xmm7, %xmm9     # xmm9 = xmm7[1,1,3,3]
pand %xmm8, %xmm9
pshufd $0xf5, %xmm8, %xmm7     # xmm7 = xmm8[1,1,3,3]
por %xmm9, %xmm7
movd %xmm7, %r9d
notl %r9d
testb $0x1, %r9b
je 0xac2f
movsd %xmm0, (%rdi,%r8)
pxor %xmm4, %xmm7
pextrw $0x4, %xmm7, %r9d
testb $0x1, %r9b
je 0xac46
movsd %xmm0, 0x8(%rdi,%r8)
paddq %xmm5, %xmm6
addq $0x10, %r8
cmpq %r8, %rdx
jne 0xabef
incq %rsi
cmpq %rcx, %rsi
jne 0xabdc
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocIntArray(unsigned long)
iArray *allocIntArray(size_t  i){
  try{
    int *tmp= new int[i];
    iArray *intArray = new iArray();
#if _fillup_
    for (unsigned int j=0;j<i;j++)
      tmp[j]=0;
#endif
    intArray->x=i;
    intArray->array=tmp;
    return intArray;
  }catch(std::exception & e){
    printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(size_t)*i/1000000000);
    printf("\t-> Thats an array of length: %lu \n",i);
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %rax
shrq $0x3e, %rax
leaq (,%rdi,4), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %rax, %r14
movl $0x10, %edi
callq 0x2220
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
testq %rbx, %rbx
je 0xacb4
xorl %ecx, %ecx
movl $0x0, (%r14,%rcx,4)
incq %rcx
movl %ecx, %edx
cmpq %rbx, %rdx
jb 0xaca2
movl %ebx, (%rax)
movq %r14, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0xacc4
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xacdd
callq 0x20c0
testq %rbx, %rbx
js 0xace2
cvtsi2ss %rbx, %xmm0
jmp 0xacf9
callq 0x2400
movq %rbx, %rax
shrq %rax
movl %ebx, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
mulss 0x37fb(%rip), %xmm0     # 0xe4fc
divss 0x37ef(%rip), %xmm0     # 0xe4f8
cvtss2sd %xmm0, %xmm0
leaq 0x381c(%rip), %rdi      # 0xe530
movb $0x1, %al
callq 0x2040
leaq 0x3836(%rip), %rdi      # 0xe558
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
leaq 0x3a62(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocBoolArray(int)
bArray *allocBoolArray(int i){
  try{
    int *tmp= new int[i];
  bArray *boolArray = new bArray();
#if _fillup_
  for (int j=0;j<i;j++)
    tmp[j]=0;
#endif
  boolArray->x=i;
  boolArray->array=tmp;
  boolArray->numTrue = 0;
  return boolArray;
 }catch(std::exception & e){
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
movslq %edi, %rax
leaq (,%rax,4), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, %r14
movl $0x10, %edi
callq 0x2220
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
testl %ebx, %ebx
jle 0xad8d
movl %ebx, %edx
shlq $0x2, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2100
movl %ebx, (%r15)
movq %r14, 0x8(%r15)
movl $0x0, 0x4(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
jmp 0xada7
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xadc7
callq 0x20c0
leaq 0x39da(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocDoubleArray(int)
dArray *allocDoubleArray(int i){
  try{
    double *tmp= new double[i];
    dArray *darray = new dArray();
#if _fillup_
    for (int j=0;j<i;j++)
      tmp[j]=0.0;
#endif
    darray->x=i;
    darray->array=tmp;
    return darray;
  }catch(std::exception & e){
    printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(double)*i/1000000000);
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
movslq %edi, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, %r14
movl $0x10, %edi
callq 0x2220
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
testl %ebx, %ebx
jle 0xae1a
movl %ebx, %edx
shlq $0x3, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2100
movl %ebx, (%r15)
movq %r14, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
jmp 0xae2c
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xae72
callq 0x20c0
cvtsi2ss %ebx, %xmm0
mulss 0x36b7(%rip), %xmm0     # 0xe4fc
divss 0x36ab(%rip), %xmm0     # 0xe4f8
cvtss2sd %xmm0, %xmm0
leaq 0x36d8(%rip), %rdi      # 0xe530
movb $0x1, %al
callq 0x2040
leaq 0x392f(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocDoubleArray(dArray*)
dArray *allocDoubleArray(dArray *other){
  try{
    dArray *darray = new dArray();
  double *tmp= new double[other->x];
  
  for (int j=0;j<other->x;j++)
    tmp[j]=other->array[j];
  darray->x=other->x;
  darray->array=tmp;
  return darray;
  }catch(std::exception & e){
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x10, %edi
callq 0x2220
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movslq (%r14), %r15
leaq (,%r15,8), %rax
testq %r15, %r15
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
testl %r15d, %r15d
jle 0xaecd
movq 0x8(%r14), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0xaebb
movl %r15d, (%rbx)
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
jmp 0xaedf
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xaeff
callq 0x20c0
leaq 0x38a2(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: killFunctionPars(functionPars*)
void killFunctionPars(functionPars *tmp){

  killMatrix(tmp->data);
  killArray(tmp->pair);
  
  killArray(tmp->position);//this is the pos from the outer run
  killArray(tmp->alim);
  killArray(tmp->par); 
  killArray(tmp->chr);

  delete tmp;

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xa95a
movq 0x8(%rbx), %rdi
callq 0xa8c3
movq 0x18(%rbx), %rdi
callq 0xa875
movq 0x28(%rbx), %rdi
callq 0xa875
movq 0x20(%rbx), %rdi
callq 0xa875
movq 0x10(%rbx), %rdi
callq 0xa8c3
movq %rbx, %rdi
callq 0xb57e
movl $0x178, %esi            # imm = 0x178
movq %rbx, %rdi
popq %rbx
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: killHapStruct(hapStruct*)
void killHapStruct(hapStruct *tmp){
  killMatrix(tmp->pBA);
  killMatrix(tmp->pBa);
  killMatrix(tmp->pbA);
  killMatrix(tmp->pba);
  killMatrix(tmp->mea);
  delete tmp;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xa938
movq 0x8(%rbx), %rdi
callq 0xa938
movq 0x10(%rbx), %rdi
callq 0xa938
movq 0x18(%rbx), %rdi
callq 0xa938
movq 0x20(%rbx), %rdi
callq 0xa938
movl $0x28, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: killFullResults(fullResults*)
void killFullResults(fullResults *tmp){

  killArray(tmp->kResult);

  if (tmp->S1!=tmp->S)
    killMatrix(tmp->S);
  killMatrix(tmp->S1);

  killArray(tmp->t);

  
  killArray(tmp->position);
  
  //killArray(tmp->alim);
  
  if(tmp->choose!=NULL)
    killArray(tmp->choose);
  if(tmp->back!=0)
    killHapStruct(tmp->hap);
  else
    delete tmp->hap;
  killArray(tmp->maf);
  killArray(tmp->chr); //COKE ROX
  killMatrix(tmp->post);
  if(tmp->convInfo!=NULL)
    killMatrix(tmp->convInfo);
  killArray(tmp->keepList);
  killArray(tmp->path);
  delete tmp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xa875
movq 0x10(%rbx), %rdi
cmpq %rdi, 0x88(%rbx)
je 0xafb2
callq 0xa938
movq 0x88(%rbx), %rdi
callq 0xa938
movq 0x40(%rbx), %rdi
callq 0xa875
movq 0x50(%rbx), %rdi
callq 0xa875
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0xafde
callq 0xa8c3
cmpl $0x0, 0x78(%rbx)
movq 0x80(%rbx), %rdi
je 0xaff2
callq 0xaf53
jmp 0xb001
testq %rdi, %rdi
je 0xb001
movl $0x28, %esi
callq 0x2230
movq 0x90(%rbx), %rdi
callq 0xa875
movq 0x98(%rbx), %rdi
callq 0xa8c3
movq 0xa0(%rbx), %rdi
callq 0xa938
movq 0xa8(%rbx), %r14
testq %r14, %r14
je 0xb047
movq 0x8(%r14), %rdi
callq 0xa8ea
movl $0x10, %esi
movq %r14, %rdi
callq 0x2230
movq 0xb8(%rbx), %rdi
callq 0xa8c3
movq 0xc0(%rbx), %rdi
callq 0xa8c3
movl $0xf0, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocFloatArray(int)
fArray *allocFloatArray(int i){
  try{
    float *tmp= new float[i];
    fArray *darray = new fArray();
#if _fillup_
    for (int j=0;j<i;j++)
      tmp[j]=0.0;
#endif
    darray->x=i;
    darray->array=tmp;
    return darray;
  }catch(std::exception & e){
printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(float)*i/1000000000);
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
movslq %edi, %rax
leaq (,%rax,4), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, %r14
movl $0x10, %edi
callq 0x2220
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
testl %ebx, %ebx
jle 0xb362
movl %ebx, %edx
shlq $0x2, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2100
movl %ebx, (%r15)
movq %r14, 0x8(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
jmp 0xb374
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xb3ba
callq 0x20c0
cvtsi2ss %ebx, %xmm0
mulss 0x3167(%rip), %xmm0     # 0xe4f4
divss 0x3163(%rip), %xmm0     # 0xe4f8
cvtss2sd %xmm0, %xmm0
leaq 0x3190(%rip), %rdi      # 0xe530
movb $0x1, %al
callq 0x2040
leaq 0x33e7(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/alloc.cpp
// Function: allocFloatMatrix(unsigned long, unsigned long)
fMatrix *allocFloatMatrix(size_t x, size_t y){
  try{
    fMatrix *tmp = new fMatrix();
    float **ppi = new float*[x];
    float *curPtr = new float [x * y];
    
    for(unsigned long int i = 0; i < x; ++i) {
      *(ppi + i) = curPtr;
      curPtr += y;
    }
#if _fillup_
    for (unsigned long int i=0;i<x;i++)
      for(unsigned long int n=0;n<y;n++)
	ppi[i][n]=0;
#endif
    
    tmp->matrix=ppi;
    tmp->x=x;
    tmp->y=y;
    return tmp;
  }catch(std::exception & e){
    printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(float)*x*y/1000000000);
    printf("\t-> Allocation failed, likely cause: need more memory, will exit.\n");
    exit(0);
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %edi
callq 0x2220
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %r14, %rax
shrq $0x3d, %rax
leaq (,%r14,8), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %rax, %r12
movq %rbx, %rax
imulq %r14, %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
xorl %edi, %edi
negq %rcx
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x2030
testq %r14, %r14
je 0xb462
leaq (,%rbx,4), %r13
xorl %ecx, %ecx
movq %rax, (%r12,%rcx,8)
incq %rcx
addq %r13, %rax
cmpq %rcx, %r14
jne 0xb436
xorl %ebp, %ebp
testq %rbx, %rbx
je 0xb45a
movq (%r12,%rbp,8), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2100
incq %rbp
cmpq %rbp, %r14
jne 0xb447
movq %r12, 0x8(%r15)
movl %r14d, (%r15)
movl %ebx, 0x4(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb483
jmp 0xb483
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xb49f
callq 0x20c0
testq %r14, %r14
js 0xb4a4
xorps %xmm0, %xmm0
cvtsi2ss %r14, %xmm0
jmp 0xb4bd
callq 0x2400
movq %r14, %rax
shrq %rax
andl $0x1, %r14d
orq %rax, %r14
xorps %xmm0, %xmm0
cvtsi2ss %r14, %xmm0
addss %xmm0, %xmm0
mulss 0x302f(%rip), %xmm0     # 0xe4f4
testq %rbx, %rbx
js 0xb4d1
cvtsi2ss %rbx, %xmm1
jmp 0xb4e6
movq %rbx, %rax
shrq %rax
andl $0x1, %ebx
orq %rax, %rbx
cvtsi2ss %rbx, %xmm1
addss %xmm1, %xmm1
mulss %xmm1, %xmm0
divss 0x3006(%rip), %xmm0     # 0xe4f8
cvtss2sd %xmm0, %xmm0
leaq 0x3033(%rip), %rdi      # 0xe530
movb $0x1, %al
callq 0x2040
leaq 0x328a(%rip), %rdi      # 0xe795
callq 0x2370
xorl %edi, %edi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/evalAdmix.cpp
// Function: allocFloat2(unsigned long, unsigned long)
float **allocFloat2(size_t x,size_t y){
  float **ret= new float*[x];
  for(size_t i=0;i<x;i++)
    ret[i] = new float[y];
  //printf("\t-> Tried to allocate: %.3f gig memory\n",(float)sizeof(float)*x*y/1000000000);
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rdi, %rax
shrq $0x3d, %rax
leaq (,%rdi,8), %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x2030
movq %rax, %r14
testq %rbx, %rbx
je 0xb712
movq %r15, %rax
shrq $0x3e, %rax
shlq $0x2, %r15
xorl %r13d, %r13d
negq %rax
movl $0x0, %r12d
sbbq %r12, %r12
orq %r15, %r12
movq %r12, %rdi
callq 0x2030
movq %rax, (%r14,%r13,8)
incq %r13
cmpq %r13, %rbx
jne 0xb6fe
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/evalAdmix.cpp
// Function: calcRes(float**, float*, unsigned short**, double**, double**, int, int, int, int, int**, int*)
void calcRes(float **r, float *mean_r, unsigned short int **G, double **Q, double **F, int K, int nSites, int nInd,int nIndUse,  int **isMissing, int *useInd){

  double sum_r[nIndUse];
  int usedSites[nIndUse];


  for(int i=0; i<nIndUse;i++){
    sum_r[i] = 0;
    usedSites[i] = 0;
  }

  for(int j=0; j<nSites;j++){
    //int u=0;
    for(int i=0; i<nInd;i++){
      if(useInd[i]){
      if(!isMissing[j][i]){
	
	double fpart=0; // individual freq pi
	
	for(int k=0; k<K; k++){
	  fpart += Q[i][k]*F[j][k];

	  
	}

	 
	r[i][j] = G[j][i] - 2 * fpart;
	sum_r[i] += r[i][j];
	usedSites[i]++;
	//	u++;
      }
      //else u++;
      }
      
    }
  }

  for(int i=0; i<nIndUse;i++){
    //fprintf(stderr, "ind %i has %i sites with data\n", i, usedSites[i]); 
    mean_r[i] = sum_r[i]/usedSites[i];

  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r15d
movq %r8, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %rdx, %r13
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
movl 0x20(%rbp), %ecx
movl 0x10(%rbp), %edx
movq %rsp, %r14
leaq 0xf(,%rcx,8), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %rsp, %r12
leaq 0xf(,%rcx,4), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movl %ecx, %eax
testl %ecx, %ecx
movq %rax, -0x30(%rbp)
jle 0xba0e
leaq (,%rax,8), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2100
movq -0x30(%rbp), %rax
leaq (,%rax,4), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2100
movl 0x10(%rbp), %edx
testl %edx, %edx
jle 0xbadf
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rcx
movl %edx, %edx
movq %rdx, -0x40(%rbp)
movl 0x18(%rbp), %edi
movl %r15d, %r8d
xorl %r9d, %r9d
cmpl $0x0, 0x18(%rbp)
jle 0xbad2
xorl %r10d, %r10d
cmpl $0x0, (%rax,%r10,4)
je 0xbac6
movq (%rcx,%r9,8), %rdx
cmpl $0x0, (%rdx,%r10,4)
jne 0xbac6
testl %r15d, %r15d
jle 0xba84
movq -0x48(%rbp), %rdx
movq (%rdx,%r10,8), %r11
movq -0x50(%rbp), %rdx
movq (%rdx,%r9,8), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%r11,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %r8
jne 0xba6b
jmp 0xba88
xorpd %xmm0, %xmm0
movq (%r13,%r9,8), %rdx
movzwl (%rdx,%r10,2), %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
addsd %xmm0, %xmm0
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movq (%rbx,%r10,8), %rdx
movss %xmm0, (%rdx,%r9,4)
cvtss2sd %xmm0, %xmm0
addsd (%r14,%r10,8), %xmm0
movsd %xmm0, (%r14,%r10,8)
incl (%r12,%r10,4)
incq %r10
cmpq %rdi, %r10
jne 0xba3a
incq %r9
cmpq -0x40(%rbp), %r9
jne 0xba2d
movl 0x20(%rbp), %eax
testl %eax, %eax
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rdx
jle 0xbb17
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sdl (%r12,%rax,4), %xmm0
movsd (%r14,%rax,8), %xmm1
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, (%rcx,%rax,4)
incq %rax
cmpq %rax, %rdx
jne 0xbaf0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/evalAdmix.cpp
// Function: correlateRes(int, float*, float*, double, double, int**, int, int)
double correlateRes(int nSites, float *r1, float *r2, double mean_r1, double mean_r2, int **isMissing, int ind1, int ind2){

  double cor_num=0;
  double cor_den1=0;
  double cor_den2=0;
  double d_r1=0;
  double d_r2=0;
  

  for(int j=0; j<nSites;j++){
    //if(j==368)
    //continue;
    if(!isMissing[j][ind1]&!isMissing[j][ind2]){
      d_r1 = (r1[j] - mean_r1);
      d_r2 = (r2[j] - mean_r2);
      cor_num += d_r1*d_r2;
      cor_den1 += d_r1*d_r1;
      cor_den2 += d_r2*d_r2;
    }
    
  }
  double cor;
  cor = cor_num/(sqrt(cor_den1)*sqrt(cor_den2));
  return cor;

}

// Assembly:
subq $0x28, %rsp
xorpd %xmm2, %xmm2
testl %edi, %edi
jle 0xbb8f
movslq %r8d, %rax
movslq %r9d, %r8
movl %edi, %edi
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
xorpd %xmm5, %xmm5
xorpd %xmm4, %xmm4
xorl %r9d, %r9d
movq (%rcx,%r9,8), %r10
movl (%r10,%r8,4), %r11d
orl (%r10,%rax,4), %r11d
jne 0xbb85
movss (%rdx,%r9,4), %xmm1
movss (%rsi,%r9,4), %xmm3
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
cvtps2pd %xmm3, %xmm1
subpd %xmm0, %xmm1
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
mulsd %xmm1, %xmm3
addsd %xmm3, %xmm4
mulpd %xmm1, %xmm1
addpd %xmm1, %xmm5
incq %r9
cmpq %r9, %rdi
jne 0xbb49
jmp 0xbb97
xorpd %xmm5, %xmm5
xorpd %xmm4, %xmm4
ucomisd %xmm2, %xmm5
movapd %xmm4, 0x10(%rsp)
jb 0xbbac
xorps %xmm2, %xmm2
sqrtsd %xmm5, %xmm2
jmp 0xbbc3
movapd %xmm5, %xmm0
movapd %xmm5, (%rsp)
callq 0x2190
movapd (%rsp), %xmm5
movapd %xmm0, %xmm2
unpckhpd %xmm5, %xmm5            # xmm5 = xmm5[1,1]
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm5
jb 0xbbda
xorps %xmm0, %xmm0
sqrtsd %xmm5, %xmm0
jmp 0xbbed
movapd %xmm5, %xmm0
movsd %xmm2, (%rsp)
callq 0x2190
movsd (%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm2
divsd %xmm2, %xmm1
movapd %xmm1, %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/GenisGE[P]evalAdmix/ngsevalAdmix.cpp
// Function: correlateNGSRes(int, double*, double*, double, double, char**, int, int)
double correlateNGSRes(int nSites, double *r1, double *r2, double mean_r1, double mean_r2, char **keep, int ind1, int ind2){

  double cor_num=0;
  double cor_den1=0;
  double cor_den2=0;
  double d_r1=0;
  double d_r2=0;
  

  for(int j=0; j<nSites;j++){

    if(keep[j][ind1] == 1 & keep[j][ind2] == 1){
      d_r1 = (r1[j] - mean_r1);
      d_r2 = (r2[j] - mean_r2);

      cor_num += d_r1*d_r2;
      cor_den1 += d_r1*d_r1;
      cor_den2 += d_r2*d_r2;
    }
    
  }
  double cor;
  cor = cor_num/(sqrt(cor_den1)*sqrt(cor_den2));
  /*if(isnan(cor)){
    fprintf(stderr, "NaN generated when calculating residuals of individuals %i and %i \n", ind1, ind2);
    fprintf(stderr, "Numerator was %.3f, denominator was square root of %.3f times %.3f mean residual 1 was %.3f and mean residual 2 %.3f\n",cor_num, cor_den1, cor_den2, mean_r1, mean_r2);
    exit(0);
    }*/
  return cor;

}

// Assembly:
subq $0x28, %rsp
xorpd %xmm2, %xmm2
testl %edi, %edi
jle 0xc3ec
movslq %r8d, %rax
movslq %r9d, %r8
movl %edi, %edi
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
xorpd %xmm5, %xmm5
xorpd %xmm4, %xmm4
xorl %r9d, %r9d
movq (%rcx,%r9,8), %r10
cmpb $0x1, (%r10,%rax)
jne 0xc3e2
cmpb $0x1, (%r10,%r8)
jne 0xc3e2
movsd (%rsi,%r9,8), %xmm1
movhpd (%rdx,%r9,8), %xmm1     # xmm1 = xmm1[0],mem[0]
subpd %xmm0, %xmm1
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
mulsd %xmm1, %xmm3
addsd %xmm3, %xmm4
mulpd %xmm1, %xmm1
addpd %xmm1, %xmm5
incq %r9
cmpq %r9, %rdi
jne 0xc3a8
jmp 0xc3f4
xorpd %xmm5, %xmm5
xorpd %xmm4, %xmm4
ucomisd %xmm2, %xmm5
movapd %xmm4, 0x10(%rsp)
jb 0xc409
xorps %xmm2, %xmm2
sqrtsd %xmm5, %xmm2
jmp 0xc420
movapd %xmm5, %xmm0
movapd %xmm5, (%rsp)
callq 0x2190
movapd (%rsp), %xmm5
movapd %xmm0, %xmm2
unpckhpd %xmm5, %xmm5            # xmm5 = xmm5[1,1]
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm5
jb 0xc437
xorps %xmm0, %xmm0
sqrtsd %xmm5, %xmm0
jmp 0xc44a
movapd %xmm5, %xmm0
movsd %xmm2, (%rsp)
callq 0x2190
movsd (%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm2
divsd %xmm2, %xmm1
movapd %xmm1, %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/test_co_sst.cpp
// Function: test_get_update_2()
void test_get_update_2() {
    // Test edge case with a tree of size 1.
    co_static_search_tree tree(1);
    tree.update(0, 2);
    if (tree.get(2) != 0) {
        cout << "test_get_update_2 failed: expected 2 at index 0." << endl;
        return;
    }
    tree.update(0, 5);
    if (tree.get(5) != 0) {
        cout << "test_get_update_2 failed: expected 5 at index 0." << endl;
        return;
    }
    tree.update(0, 501);
    if (tree.get(501) != 0) {
        cout << "test_get_update_2 failed: expected 501 at index 0." << endl;
        return;
    }
    cout << "test_get_update_2: OK" << endl;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x134c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x15ee
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
callq 0x17e2
movl $0x30, %ebx
testl %eax, %eax
je 0x2bd7
leaq 0x1680(%rip), %rsi      # 0x4255
jmp 0x2c46
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x15ee
leaq 0x8(%rsp), %rdi
movl $0x5, %esi
callq 0x17e2
testl %eax, %eax
je 0x2c04
leaq 0x1684(%rip), %rsi      # 0x4286
jmp 0x2c46
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x1f5, %edx            # imm = 0x1F5
callq 0x15ee
leaq 0x8(%rsp), %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x17e2
testl %eax, %eax
leaq 0x16bd(%rip), %rax      # 0x42ea
leaq 0x1683(%rip), %rsi      # 0x42b7
cmoveq %rax, %rsi
movl $0x15, %eax
movl $0x32, %ebx
cmoveq %rax, %rbx
movq 0x438b(%rip), %r14      # 0x6fd8
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1140
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq 0x4362(%rip), %rdi      # 0x6fd8
callq 0x1030
movq %rax, %rdi
callq 0x10b0
leaq 0x8(%rsp), %rdi
callq 0x13e6
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x13e6
movq %rbx, %rdi
callq 0x11e0
// File: /workspace/github_cpp_makefile_star2_O1/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/test_co_sst.cpp
// Function: test_range_update_uniform(int)
void test_range_update_uniform(const int n) {
    co_static_search_tree tree(n);
    int arr[n];
    for (int i = 0; i < n; ++i) {
        arr[i] = i * 5;
    }
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < n; ++j){
            arr[j] = j * 5;
        }
        int len = rand() % (n / 2) + 1;
        int R = min(i + len - 1, n - 1);
        tree.range_update(i, R, arr);

        i += (len - 1);
    }
    for (int i = 0; i < (n - 1) * 5; ++i) {
        int result = tree.get(i);
        int expected = ceil(i / 5.0);
        if (result != expected)
        {
            printf("Incorrect index for query value %d, got %d, expected %d\n", i, result, expected);
            exit(-1);
        }
    }
    cout << "Success range update uniform: " << n << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %edi, %r15d
leaq -0x100(%rbp), %rdi
movl %r15d, %esi
callq 0x134c
movq %rsp, -0x40(%rbp)
movl %r15d, %ebx
movq %rsp, %r14
leaq 0xf(,%rbx,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
testl %r15d, %r15d
jle 0x3608
leaq (%rbx,%rbx,4), %rax
xorl %ecx, %ecx
movq %r14, %rdx
movl %ecx, (%rdx)
addq $0x5, %rcx
addq $0x4, %rdx
cmpq %rcx, %rax
jne 0x35f9
movq %r15, -0x38(%rbp)
testl %r15d, %r15d
jle 0x366c
movq -0x38(%rbp), %rax
movl %eax, %ecx
shrl %ecx
movl %ecx, -0x2c(%rbp)
leal -0x1(%rax), %r15d
xorl %r12d, %r12d
xorl %eax, %eax
xorl %ecx, %ecx
movl %eax, (%r14,%rcx,4)
incq %rcx
addl $0x5, %eax
cmpq %rcx, %rbx
jne 0x3627
callq 0x1070
cltd
idivl -0x2c(%rbp)
movl %edx, %r13d
addl %r12d, %r13d
cmpl %r13d, %r15d
movl %r13d, %edx
cmovll %r15d, %edx
leaq -0x100(%rbp), %rdi
movl %r12d, %esi
movq %r14, %rcx
callq 0x1a1a
incl %r13d
movl %r13d, %r12d
cmpl %ebx, %r13d
jl 0x3623
movq -0x38(%rbp), %r13
leal -0x5(%r13,%r13,4), %ebx
testl %ebx, %ebx
jle 0x36b7
xorl %r14d, %r14d
leaq -0x100(%rbp), %r15
movq %r15, %rdi
movl %r14d, %esi
callq 0x17e2
movl %eax, %r12d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
divsd 0xacf(%rip), %xmm0      # 0x4170
callq 0x1060
cvttsd2si %xmm0, %ecx
cmpl %ecx, %r12d
jne 0x3727
incl %r14d
cmpl %r14d, %ebx
jne 0x3683
movq 0x391a(%rip), %rdi      # 0x6fd8
leaq 0xd7f(%rip), %rsi       # 0x4444
movl $0x1e, %edx
callq 0x1140
movq 0x3902(%rip), %rdi      # 0x6fd8
movl %r13d, %esi
callq 0x11d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
movq -0x40(%rbp), %rsp
leaq -0x100(%rbp), %rdi
callq 0x13e6
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcc0(%rip), %rdi       # 0x43ee
movl %r14d, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1040
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1160
jmp 0x3749
jmp 0x3749
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x13e6
movq %rbx, %rdi
callq 0x11e0
// File: /workspace/github_cpp_makefile_star2_O1/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/test_co_sst.cpp
// Function: main
int main() {
    srand(10);
    chrono::steady_clock::time_point begin = chrono::steady_clock::now();
    test_get_update_1();
    test_get_update_2();
    test_get_update_3();
    test_get_update_4();
    test_get_update_5();
    test_range_update_small();
    test_range_update_uniform(16);
    test_range_update_uniform(20);
    test_range_update_uniform(100);
    test_range_update_uniform(500);
    test_range_update_uniform(1e6);
    chrono::steady_clock::time_point end = chrono::steady_clock::now();
    cout << "Time difference = " << chrono::duration_cast<chrono::microseconds>(end - begin).count() << "[µs]" << std::endl;

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0xa, %edi
callq 0x10f0
callq 0x1170
movq %rax, %rbx
callq 0x299c
callq 0x2b8b
callq 0x2cad
callq 0x2ebe
callq 0x3110
callq 0x3374
movl $0x10, %edi
callq 0x35a9
movl $0x14, %edi
callq 0x35a9
movl $0x64, %edi
callq 0x35a9
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x35a9
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x35a9
callq 0x1170
movq %rax, %r14
movq 0x3802(%rip), %r15      # 0x6fd8
leaq 0xc86(%rip), %rsi       # 0x4463
movl $0x12, %edx
movq %r15, %rdi
callq 0x1140
subq %rbx, %r14
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %r14, %rax
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x7, %rdx
addq %rdx, %rsi
movq %r15, %rdi
callq 0x10e0
movq %rax, %rbx
leaq 0xc59(%rip), %rsi       # 0x4476
movl $0x5, %edx
movq %rax, %rdi
callq 0x1140
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10b0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/TracyLaiMan[P]GLib_Example/GLibExample.cpp
// Function: glib::GLibExample::init()
bool GLibExample::init(){
    std::cout << "GLibExample::init" << std::endl;

    m_workerContext = g_main_context_new();

    if (nullptr == m_workerContext) {
        return false;
    }

    m_eventLoop = g_main_loop_new(m_workerContext, false);
    if (nullptr == m_eventLoop) {
        return false;
    }

    m_eventThread = std::thread(&GLibExample::mainLoopThread, this);
 
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x2b31(%rip), %r14      # 0x4fd0
leaq 0xb5e(%rip), %rsi       # 0x3004
movl $0x11, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
callq 0x21d0
movq %rax, 0x8(%rbx)
xorl %r14d, %r14d
testq %rax, %rax
je 0x2535
movq %rax, %rdi
xorl %esi, %esi
callq 0x2110
movq %rax, (%rbx)
testq %rax, %rax
je 0x2535
leaq 0x42(%rip), %rax        # 0x2546
leaq -0x30(%rbp), %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
leaq -0x20(%rbp), %rdx
movq %rbx, (%rdx)
leaq -0x18(%rbp), %rdi
callq 0x2638
cmpq $0x0, 0x28(%rbx)
jne 0x2541
movq -0x18(%rbp), %rax
movq %rax, 0x28(%rbx)
movb $0x1, %r14b
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2050
// File: /workspace/github_cpp_makefile_star2_O1/TracyLaiMan[P]GLib_Example/GLibExample.cpp
// Function: glib::GLibExample::mainLoopThread()
void GLibExample::mainLoopThread(){
    g_main_context_push_thread_default(m_workerContext);
    do{
        std::cout << "mainLoopThread running" << std::endl;
        g_main_loop_run(m_eventLoop);
    }while(false);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2040
movq 0x2a70(%rip), %r14      # 0x4fd0
leaq 0xaaf(%rip), %rsi       # 0x3016
movl $0x16, %edx
movq %r14, %rdi
callq 0x21c0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq (%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O1/TracyLaiMan[P]GLib_Example/GLibExample.cpp
// Function: glib::GLibExample::SourceEventTest()
void GLibExample::SourceEventTest(){
    
    auto source = g_idle_source_new();
    g_source_set_callback(source, reinterpret_cast<GSourceFunc>(&onEventCallback), this, nullptr);
    g_source_attach(source, m_workerContext);
    g_source_unref(source);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x20a0
movq %rax, %r14
leaq 0x25(%rip), %rsi        # 0x25e6
movq %rax, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x2220
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x2170
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/TracyLaiMan[P]GLib_Example/main.cpp
// Function: main
int main(int argc, char **argv){

    auto example = glib::GLibExample::create();
    std::cout << "***Hi GLib***" << std::endl;
    while(1)
    {
	example->SourceEventTest();
        sleep(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq -0x18(%rbp), %rdi
callq 0x240c
movq 0x2243(%rip), %rbx      # 0x4fd0
leaq 0x48e(%rip), %rsi       # 0x3222
movl $0xd, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq 0x2211(%rip), %rdi      # 0x4fd0
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq -0x18(%rbp), %rdi
callq 0x25a8
movl $0x1, %edi
callq 0x20f0
jmp 0x2dcc
jmp 0x2de3
movq %rax, %rbx
movq -0x10(%rbp), %rdi
testq %rdi, %rdi
je 0x2df4
callq 0x28e0
movq %rbx, %rdi
callq 0x2250