// File: /workspace/github_cpp_makefile_star2_O3/GenisGE[P]evalAdmix/filereader_and_conversions.cpp
// Function: getTestIndividuals(char const*)
std::vector<iArray*> getTestIndividuals(const char *pName){
  iArray *testList = typecast_stringarray_to_iArray(readarray(std::string(pName)));
  
  int numTrues=0;
  for(int i=0;i<testList->x;i++)
    if(testList->array[i])
      numTrues++;
  //printf("numTrues:%d\n",numTrues);
  //testList->print("testlist",NULL);
  std::vector<iArray*> returnVal;
  int pos1 = getNext(testList,0);
  while(pos1!=-1){
    int pos2 = getNext(testList,pos1+1);
    while(pos2!=-1){
      if(pos2!=-1){
	//printf("p1:%d\tp2:%d\n",pos1,pos2);
	iArray *pr = allocIntArray(2);
	pr->array[0]=pos1;pr->array[1]=pos2;
	returnVal.push_back(pr);
      }
      pos2 = getNext(testList,pos2+1);
    }
    pos1 = getNext(testList,pos1+1);
  }
  killArray(testList);
  return returnVal;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x48(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x5f1a
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6277(%rip), %rsi      # 0xe218
leaq 0x6275(%rip), %rdx      # 0xe21d
leaq 0x28(%rsp), %rdi
callq 0x61b8
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x6d1a
leaq 0x10(%rsp), %rdi
callq 0x6b74
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x900c
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x7ff4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x800f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movslq (%r14), %rax
testq %rax, %rax
jle 0x803b
movq 0x8(%r14), %rcx
xorl %r12d, %r12d
cmpl $0x1, (%rcx,%r12,4)
je 0x8055
incq %r12
cmpq %r12, %rax
jne 0x802c
movq %r14, %rdi
callq 0xa98b
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %r15
leal 0x1(%r12), %ebp
cmpl %ebp, %eax
jle 0x8079
movq 0x8(%r14), %rcx
movslq %ebp, %r13
cmpl $0x1, (%rcx,%r13,4)
je 0x80b5
incq %r13
cmpl %r13d, %eax
jne 0x806a
cmpl %ebp, %eax
jle 0x803b
movslq %ebp, %r12
movq 0x8(%r14), %rcx
cmpl $0x1, (%rcx,%r12,4)
je 0x8095
incq %r12
cmpl %r12d, %eax
jne 0x8084
jmp 0x803b
cmpq $-0x1, %r12
jne 0x805a
jmp 0x803b
movq 0x8(%r14), %rcx
movslq %r13d, %r13
cmpl $0x1, (%rcx,%r13,4)
je 0x80b5
incq %r13
cmpl %r13d, %eax
jne 0x80a4
jmp 0x8079
cmpq $-0x1, %r13
je 0x8079
movl $0x2, %edi
callq 0xadb7
movq %rax, 0x10(%rsp)
movq 0x8(%rax), %rcx
movl %r12d, (%rcx)
movl %r13d, 0x4(%rcx)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x80e9
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x80f4
movq %rbx, %rdi
movq %r15, %rdx
callq 0x92da
incl %r13d
movl (%r14), %eax
cmpl %r13d, %eax
jg 0x809d
jmp 0x8079
jmp 0x8106
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8168
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
jmp 0x815e
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x900c
jmp 0x812c
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x8148
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x8148
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8168
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x8168
movq %rax, %r14
movq %r14, %rdi
callq 0x2400