#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ DataCounter(char *, int *, int *, char *);
scalar_t__ atof(char *);
int atoi(char *);
int nboffile(char **, int, int, char **);
int /*<<< orphan*/ printf(char *, ...);
char *strdup(char *);
int handleParams__f(int argc, char *argv[], int *nSNP, int *nIND,
                    double **Genotypes, char **GenoFileName,
                    char **OutputFileName, int *K, int *runSVD,
                    char **subSampleName, int *sc, int *nf, int *nSNP_file,
                    double *prop, int *haploid, double *min_AF) {
  int i, j, tmp, nfile, snp;
  *nSNP = 0;
  for (i = 0; i < argc; i++) {
    if (argv[i][0] == '-') {
      switch (argv[i][1]) {
      case 'i':
        nfile = nboffile(argv, argc, i + 1, GenoFileName);
        for (j = 0; j < nfile; j++) {
          printf("Reading file %s... ", GenoFileName[j]);
          if (!DataCounter(GenoFileName[j], &snp, nIND, "genotypes")) {
            printf("%i snps typed on %i individuals\n", snp, *nIND);
            nSNP_file[j] = snp;
            *nSNP += snp;
          } else {
            return 1;
          }
        }
        *nf = nfile;
        if (nfile > 1)
          printf("A total of %d snps typed on %d individuals in the %d files\n",
                 *nSNP, *nIND, nfile);
        break;
      case 'K':
        *K = atoi(argv[i + 1]);
        break;
      case 'o':
        *OutputFileName = strdup(argv[i + 1]);
        break;
      case 'I':
        *runSVD = 1;
        *subSampleName = strdup(argv[i + 1]);
        break;
      case 'S':
        *sc = atoi(argv[i + 1]);
        break;
      case 'p':
        *prop = (double)atof(argv[i + 1]);
        break;
      case 'h':
        *haploid = (int)atoi(argv[i + 1]);
        break;
      case 'm':
        *min_AF = (double)atof(argv[i + 1]);
        break;
      }
    }
  }
  if (*K >= *nSNP || *K >= *nIND) {
    printf(
        "***WARNING*** K must be lower than the rank of the design matrix\n");
    *K = *nSNP < *nIND ? *nSNP - 1 : *nIND - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<handleParams__f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    142a <handleParams__f+0x2ca>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1417 <handleParams__f+0x2b7>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
add    $0xffffffb7,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0x27,%eax
ja     1412 <handleParams__f+0x2b2>
mov    -0x50(%rbp),%rax
lea    0xdf7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    -0x34(%rbp),%edx
add    $0x1,%edx
mov    -0x30(%rbp),%rcx
call   1030 <nboffile@plt>
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    12d5 <handleParams__f+0x175>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x44(%rbp),%rsi
lea    0xe41(%rip),%rcx
call   1050 <DataCounter@plt>
cmp    $0x0,%eax
jne    12b6 <handleParams__f+0x156>
mov    -0x44(%rbp),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x44(%rbp),%edx
mov    0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x44(%rbp),%ecx
mov    -0x18(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
jmp    12c2 <handleParams__f+0x162>
movl   $0x1,-0x4(%rbp)
jmp    149b <handleParams__f+0x33b>
jmp    12c7 <handleParams__f+0x167>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1232 <handleParams__f+0xd2>
mov    -0x40(%rbp),%ecx
mov    0x38(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x1,-0x40(%rbp)
jle    1305 <handleParams__f+0x1a5>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x40(%rbp),%ecx
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1412 <handleParams__f+0x2b2>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <atoi@plt>
mov    %eax,%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1412 <handleParams__f+0x2b2>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <strdup@plt>
mov    %rax,%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    1412 <handleParams__f+0x2b2>
mov    0x20(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <strdup@plt>
mov    %rax,%rcx
mov    0x28(%rbp),%rax
mov    %rcx,(%rax)
jmp    1412 <handleParams__f+0x2b2>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <atoi@plt>
mov    %eax,%ecx
mov    0x30(%rbp),%rax
mov    %ecx,(%rax)
jmp    1412 <handleParams__f+0x2b2>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <atof@plt>
cvtsi2sd %rax,%xmm0
mov    0x48(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1412 <handleParams__f+0x2b2>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <atoi@plt>
mov    %eax,%ecx
mov    0x50(%rbp),%rax
mov    %ecx,(%rax)
jmp    1412 <handleParams__f+0x2b2>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <atof@plt>
cvtsi2sd %rax,%xmm0
mov    0x58(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1417 <handleParams__f+0x2b7>
jmp    141c <handleParams__f+0x2bc>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b8 <handleParams__f+0x58>
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    144e <handleParams__f+0x2ee>
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jl     1494 <handleParams__f+0x334>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    147f <handleParams__f+0x31f>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    148b <handleParams__f+0x32b>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handleParams__f>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rcx,%r15
mov    0x68(%rsp),%r14
mov    %rdx,0x18(%rsp)
movl   $0x0,(%rdx)
test   %edi,%edi
jle    139a <handleParams__f+0x22a>
mov    %r9,%r12
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %edi,%esi
xor    %r13d,%r13d
mov    %rsi,0x8(%rsp)
jmp    11dd <handleParams__f+0x6d>
mov    0x8(%rbx,%r13,8),%rdi
call   1050 <atof@plt>
mov    0x8(%rsp),%rsi
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0xa8(%rsp),%rax
movsd  %xmm0,(%rax)
add    $0x1,%r13
cmp    %rsi,%r13
je     1391 <handleParams__f+0x221>
mov    (%rbx,%r13,8),%rax
cmpb   $0x2d,(%rax)
jne    11d0 <handleParams__f+0x60>
movsbl 0x1(%rax),%eax
add    $0xffffffb7,%eax
cmp    $0x27,%eax
ja     11d0 <handleParams__f+0x60>
lea    0xe07(%rip),%rdx
movslq (%rdx,%rax,4),%rax
add    %rdx,%rax
jmp    *%rax
mov    0x70(%rsp),%rax
movl   $0x1,(%rax)
mov    0x8(%rbx,%r13,8),%rdi
call   1090 <strdup@plt>
mov    0x78(%rsp),%rcx
jmp    134c <handleParams__f+0x1dc>
mov    0x8(%rbx,%r13,8),%rdi
call   1080 <atoi@plt>
mov    0x8(%rsp),%rsi
mov    %eax,(%r14)
jmp    11d0 <handleParams__f+0x60>
mov    0x8(%rbx,%r13,8),%rdi
call   1080 <atoi@plt>
mov    0x80(%rsp),%rcx
jmp    125b <handleParams__f+0xeb>
mov    0x8(%rbx,%r13,8),%rdi
call   1080 <atoi@plt>
mov    0xa0(%rsp),%rcx
mov    %eax,(%rcx)
mov    0x8(%rsp),%rsi
jmp    11d0 <handleParams__f+0x60>
lea    0x1(%r13),%edx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r12,%rcx
call   1030 <nboffile@plt>
mov    %eax,%ecx
test   %eax,%eax
jle    137d <handleParams__f+0x20d>
mov    %ebp,0x24(%rsp)
mov    %ecx,0x20(%rsp)
mov    %ecx,%r14d
xor    %ebp,%ebp
nop
mov    (%r12,%rbp,8),%rsi
lea    0xe05(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    (%r12,%rbp,8),%rdi
lea    0x14(%rsp),%rsi
mov    %r15,%rdx
lea    0xdff(%rip),%rcx
call   1060 <DataCounter@plt>
test   %eax,%eax
jne    13cf <handleParams__f+0x25f>
mov    0x14(%rsp),%esi
mov    (%r15),%edx
lea    0xdee(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x14(%rsp),%eax
mov    0x90(%rsp),%rcx
mov    %eax,(%rcx,%rbp,4)
mov    0x18(%rsp),%rcx
add    %eax,(%rcx)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1290 <handleParams__f+0x120>
mov    0x88(%rsp),%rax
mov    0x20(%rsp),%ecx
mov    %ecx,(%rax)
cmp    $0x2,%ecx
mov    0x68(%rsp),%r14
mov    0x24(%rsp),%ebp
mov    0x8(%rsp),%rsi
jl     11d0 <handleParams__f+0x60>
mov    0x18(%rsp),%rax
mov    (%rax),%esi
mov    (%r15),%edx
lea    0xdb3(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x8(%rsp),%rsi
jmp    11d0 <handleParams__f+0x60>
mov    0x8(%rbx,%r13,8),%rdi
call   1090 <strdup@plt>
mov    0x60(%rsp),%rcx
mov    %rax,(%rcx)
mov    0x8(%rsp),%rsi
jmp    11d0 <handleParams__f+0x60>
mov    0x8(%rbx,%r13,8),%rdi
call   1050 <atof@plt>
mov    0x8(%rsp),%rsi
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x98(%rsp),%rax
jmp    11cc <handleParams__f+0x5c>
mov    0x88(%rsp),%rax
mov    %ecx,(%rax)
mov    0x8(%rsp),%rsi
jmp    11d0 <handleParams__f+0x60>
mov    0x18(%rsp),%rax
mov    (%rax),%eax
jmp    139c <handleParams__f+0x22c>
xor    %eax,%eax
mov    (%r14),%ecx
cmp    %eax,%ecx
jge    13aa <handleParams__f+0x23a>
xor    %eax,%eax
cmp    (%r15),%ecx
jl     13d4 <handleParams__f+0x264>
lea    0xd6a(%rip),%rdi
call   1040 <puts@plt>
mov    0x18(%rsp),%rax
mov    (%rax),%eax
mov    (%r15),%ecx
cmp    %ecx,%eax
cmovl  %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%r14)
xor    %eax,%eax
jmp    13d4 <handleParams__f+0x264>
mov    $0x1,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Reading file %s... \00"
@.str.1 = [10 x i8] c"genotypes\00"
@.str.2 = [33 x i8] c"%i snps typed on %i individuals\0A\00"
@.str.3 = [60 x i8] c"A total of %d snps typed on %d individuals in the %d files\0A\00"
@.str.4 = [66 x i8] c"***WARNING*** K must be lower than the rank of the design matrix\0A\00"
define i32 @handleParams__f(i32 %0, i8** %1, i32* %2, i32* %3, double** %4, i8** %5, i8** %6, i32* %7, i32* %8, i8** %9, i32* %10, i32* %11, i32* %12, double* %13, i32* %14, double* %15) {
%17 = alloca i32
%18 = alloca i32
%19 = alloca i8**
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca double**
%23 = alloca i8**
%24 = alloca i8**
%25 = alloca i32*
%26 = alloca i32*
%27 = alloca i8**
%28 = alloca i32*
%29 = alloca i32*
%30 = alloca i32*
%31 = alloca double*
%32 = alloca i32*
%33 = alloca double*
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
store i32 %0, i32* %18
store i8** %1, i8*** %19
store i32* %2, i32** %20
store i32* %3, i32** %21
store double** %4, double*** %22
store i8** %5, i8*** %23
store i8** %6, i8*** %24
store i32* %7, i32** %25
store i32* %8, i32** %26
store i8** %9, i8*** %27
store i32* %10, i32** %28
store i32* %11, i32** %29
store i32* %12, i32** %30
store double* %13, double** %31
store i32* %14, i32** %32
store double* %15, double** %33
%39 = load i32*, i32** %20
store i32 0, i32* %39
store i32 0, i32* %34
br label %40
40: ; preds = %189, %16
%41 = load i32, i32* %34
%42 = load i32, i32* %18
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %192
44: ; preds = %40
%45 = load i8**, i8*** %19
%46 = load i32, i32* %34
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8*, i8** %45, i64 %47
%49 = load i8*, i8** %48
%50 = getelementptr inbounds i8, i8* %49, i64 0
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 45
br i1 %53, label %54, label %188
54: ; preds = %44
%55 = load i8**, i8*** %19
%56 = load i32, i32* %34
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8*, i8** %55, i64 %57
%59 = load i8*, i8** %58
%60 = getelementptr inbounds i8, i8* %59, i64 1
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
switch i32 %62, label %187 [
i32 105, label %63
i32 75, label %121
i32 111, label %130
i32 73, label %139
i32 83, label %149
i32 112, label %158
i32 104, label %168
i32 109, label %177
]
63: ; preds = %54
%64 = load i8**, i8*** %19
%65 = load i32, i32* %18
%66 = load i32, i32* %34
%67 = add nsw i32 %66, 1
%68 = load i8**, i8*** %23
%69 = call i32 @nboffile(i8** %64, i32 %65, i32 %67, i8** %68)
store i32 %69, i32* %37
store i32 0, i32* %35
br label %70
70: ; preds = %105, %63
%71 = load i32, i32* %35
%72 = load i32, i32* %37
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %108
74: ; preds = %70
%75 = load i8**, i8*** %23
%76 = load i32, i32* %35
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8*, i8** %75, i64 %77
%79 = load i8*, i8** %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %79)
%81 = load i8**, i8*** %23
%82 = load i32, i32* %35
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8*, i8** %81, i64 %83
%85 = load i8*, i8** %84
%86 = load i32*, i32** %21
%87 = call i32 @DataCounter(i8* %85, i32* %38, i32* %86, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%88 = icmp ne i32 %87, 0
br i1 %88, label %103, label %89
89: ; preds = %74
%90 = load i32, i32* %38
%91 = load i32*, i32** %21
%92 = load i32, i32* %91
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %90, i32 %92)
%94 = load i32, i32* %38
%95 = load i32*, i32** %30
%96 = load i32, i32* %35
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %95, i64 %97
store i32 %94, i32* %98
%99 = load i32, i32* %38
%100 = load i32*, i32** %20
%101 = load i32, i32* %100
%102 = add nsw i32 %101, %99
store i32 %102, i32* %100
br label %104
103: ; preds = %74
store i32 1, i32* %17
br label %223
104: ; preds = %89
br label %105
105: ; preds = %104
%106 = load i32, i32* %35
%107 = add nsw i32 %106, 1
store i32 %107, i32* %35
br label %70
108: ; preds = %70
%109 = load i32, i32* %37
%110 = load i32*, i32** %29
store i32 %109, i32* %110
%111 = load i32, i32* %37
%112 = icmp sgt i32 %111, 1
br i1 %112, label %113, label %120
113: ; preds = %108
%114 = load i32*, i32** %20
%115 = load i32, i32* %114
%116 = load i32*, i32** %21
%117 = load i32, i32* %116
%118 = load i32, i32* %37
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i32 %115, i32 %117, i32 %118)
br label %120
120: ; preds = %113, %108
br label %187
121: ; preds = %54
%122 = load i8**, i8*** %19
%123 = load i32, i32* %34
%124 = add nsw i32 %123, 1
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8*, i8** %122, i64 %125
%127 = load i8*, i8** %126
%128 = call i32 @atoi(i8* %127)
%129 = load i32*, i32** %25
store i32 %128, i32* %129
br label %187
130: ; preds = %54
%131 = load i8**, i8*** %19
%132 = load i32, i32* %34
%133 = add nsw i32 %132, 1
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i8*, i8** %131, i64 %134
%136 = load i8*, i8** %135
%137 = call i8* @strdup(i8* %136)
%138 = load i8**, i8*** %24
store i8* %137, i8** %138
br label %187
139: ; preds = %54
%140 = load i32*, i32** %26
store i32 1, i32* %140
%141 = load i8**, i8*** %19
%142 = load i32, i32* %34
%143 = add nsw i32 %142, 1
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i8*, i8** %141, i64 %144
%146 = load i8*, i8** %145
%147 = call i8* @strdup(i8* %146)
%148 = load i8**, i8*** %27
store i8* %147, i8** %148
br label %187
149: ; preds = %54
%150 = load i8**, i8*** %19
%151 = load i32, i32* %34
%152 = add nsw i32 %151, 1
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds i8*, i8** %150, i64 %153
%155 = load i8*, i8** %154
%156 = call i32 @atoi(i8* %155)
%157 = load i32*, i32** %28
store i32 %156, i32* %157
br label %187
158: ; preds = %54
%159 = load i8**, i8*** %19
%160 = load i32, i32* %34
%161 = add nsw i32 %160, 1
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i8*, i8** %159, i64 %162
%164 = load i8*, i8** %163
%165 = call i64 @atof(i8* %164)
%166 = sitofp i64 %165 to double
%167 = load double*, double** %31
store double %166, double* %167
br label %187
168: ; preds = %54
%169 = load i8**, i8*** %19
%170 = load i32, i32* %34
%171 = add nsw i32 %170, 1
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds i8*, i8** %169, i64 %172
%174 = load i8*, i8** %173
%175 = call i32 @atoi(i8* %174)
%176 = load i32*, i32** %32
store i32 %175, i32* %176
br label %187
177: ; preds = %54
%178 = load i8**, i8*** %19
%179 = load i32, i32* %34
%180 = add nsw i32 %179, 1
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds i8*, i8** %178, i64 %181
%183 = load i8*, i8** %182
%184 = call i64 @atof(i8* %183)
%185 = sitofp i64 %184 to double
%186 = load double*, double** %33
store double %185, double* %186
br label %187
187: ; preds = %54, %177, %168, %158, %149, %139, %130, %121, %120
br label %188
188: ; preds = %187, %44
br label %189
189: ; preds = %188
%190 = load i32, i32* %34
%191 = add nsw i32 %190, 1
store i32 %191, i32* %34
br label %40
192: ; preds = %40
%193 = load i32*, i32** %25
%194 = load i32, i32* %193
%195 = load i32*, i32** %20
%196 = load i32, i32* %195
%197 = icmp sge i32 %194, %196
br i1 %197, label %204, label %198
198: ; preds = %192
%199 = load i32*, i32** %25
%200 = load i32, i32* %199
%201 = load i32*, i32** %21
%202 = load i32, i32* %201
%203 = icmp sge i32 %200, %202
br i1 %203, label %204, label %222
204: ; preds = %198, %192
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%206 = load i32*, i32** %20
%207 = load i32, i32* %206
%208 = load i32*, i32** %21
%209 = load i32, i32* %208
%210 = icmp slt i32 %207, %209
br i1 %210, label %211, label %215
211: ; preds = %204
%212 = load i32*, i32** %20
%213 = load i32, i32* %212
%214 = sub nsw i32 %213, 1
br label %219
215: ; preds = %204
%216 = load i32*, i32** %21
%217 = load i32, i32* %216
%218 = sub nsw i32 %217, 1
br label %219
219: ; preds = %215, %211
%220 = phi i32 [ %214, %211 ], [ %218, %215 ]
%221 = load i32*, i32** %25
store i32 %220, i32* %221
br label %222
222: ; preds = %219, %198
store i32 0, i32* %17
br label %223
223: ; preds = %222, %103
%224 = load i32, i32* %17
ret i32 %224
}

LLVM IR (-O2):
@.str = [20 x i8] c"Reading file %s... \00"
@.str.1 = [10 x i8] c"genotypes\00"
@.str.2 = [33 x i8] c"%i snps typed on %i individuals\0A\00"
@.str.3 = [60 x i8] c"A total of %d snps typed on %d individuals in the %d files\0A\00"
@str = [65 x i8] c"***WARNING*** K must be lower than the rank of the design matrix\00"
define i32 @handleParams__f(i32 %0, i8** %1, i32* nocapture %2, i32* %3, double** nocapture readnone %4, i8** %5, i8** nocapture writeonly %6, i32* nocapture %7, i32* nocapture writeonly %8, i8** nocapture writeonly %9, i32* nocapture writeonly %10, i32* nocapture writeonly %11, i32* nocapture writeonly %12, double* nocapture writeonly %13, i32* nocapture writeonly %14, double* nocapture writeonly %15) {
%17 = alloca i32
%18 = bitcast i32* %17 to i8*
store i32 0, i32* %2
%19 = icmp sgt i32 %0, 0
br i1 %19, label %20, label %106
20: ; preds = %16
%21 = zext i32 %0 to i64
br label %22
22: ; preds = %20, %101
%23 = phi i64 [ 0, %20 ], [ %102, %101 ]
%24 = getelementptr inbounds i8*, i8** %1, i64 %23
%25 = load i8*, i8** %24
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 45
br i1 %27, label %28, label %101
28: ; preds = %22
%29 = getelementptr inbounds i8, i8* %25, i64 1
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
switch i32 %31, label %101 [
i32 105, label %32
i32 75, label %64
i32 111, label %69
i32 73, label %74
i32 83, label %79
i32 112, label %84
i32 104, label %90
i32 109, label %95
]
32: ; preds = %28
%33 = trunc i64 %23 to i32
%34 = add i32 %33, 1
%35 = call i32 @nboffile(i8** %1, i32 %0, i32 %34, i8** %5)
%36 = icmp sgt i32 %35, 0
br i1 %36, label %38, label %37
37: ; preds = %32
store i32 %35, i32* %11
br label %101
38: ; preds = %32
%39 = zext i32 %35 to i64
br label %40
40: ; preds = %38, %48
%41 = phi i64 [ 0, %38 ], [ %56, %48 ]
%42 = getelementptr inbounds i8*, i8** %5, i64 %41
%43 = load i8*, i8** %42
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %43)
%45 = load i8*, i8** %42
%46 = call i32 @DataCounter(i8* %45, i32* %17, i32* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %120
48: ; preds = %40
%49 = load i32, i32* %17
%50 = load i32, i32* %3
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %49, i32 %50)
%52 = load i32, i32* %17
%53 = getelementptr inbounds i32, i32* %12, i64 %41
store i32 %52, i32* %53
%54 = load i32, i32* %2
%55 = add nsw i32 %54, %52
store i32 %55, i32* %2
%56 = add nuw nsw i64 %41, 1
%57 = icmp eq i64 %56, %39
br i1 %57, label %58, label %40
58: ; preds = %48
store i32 %35, i32* %11
%59 = icmp sgt i32 %35, 1
br i1 %59, label %60, label %101
60: ; preds = %58
%61 = load i32, i32* %2
%62 = load i32, i32* %3
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i32 %61, i32 %62, i32 %35)
br label %101
64: ; preds = %28
%65 = add nuw nsw i64 %23, 1
%66 = getelementptr inbounds i8*, i8** %1, i64 %65
%67 = load i8*, i8** %66
%68 = call i32 @atoi(i8* %67)
store i32 %68, i32* %7
br label %101
69: ; preds = %28
%70 = add nuw nsw i64 %23, 1
%71 = getelementptr inbounds i8*, i8** %1, i64 %70
%72 = load i8*, i8** %71
%73 = call i8* @strdup(i8* %72)
store i8* %73, i8** %6
br label %101
74: ; preds = %28
store i32 1, i32* %8
%75 = add nuw nsw i64 %23, 1
%76 = getelementptr inbounds i8*, i8** %1, i64 %75
%77 = load i8*, i8** %76
%78 = call i8* @strdup(i8* %77)
store i8* %78, i8** %9
br label %101
79: ; preds = %28
%80 = add nuw nsw i64 %23, 1
%81 = getelementptr inbounds i8*, i8** %1, i64 %80
%82 = load i8*, i8** %81
%83 = call i32 @atoi(i8* %82)
store i32 %83, i32* %10
br label %101
84: ; preds = %28
%85 = add nuw nsw i64 %23, 1
%86 = getelementptr inbounds i8*, i8** %1, i64 %85
%87 = load i8*, i8** %86
%88 = call i64 @atof(i8* %87)
%89 = sitofp i64 %88 to double
store double %89, double* %13
br label %101
90: ; preds = %28
%91 = add nuw nsw i64 %23, 1
%92 = getelementptr inbounds i8*, i8** %1, i64 %91
%93 = load i8*, i8** %92
%94 = call i32 @atoi(i8* %93)
store i32 %94, i32* %14
br label %101
95: ; preds = %28
%96 = add nuw nsw i64 %23, 1
%97 = getelementptr inbounds i8*, i8** %1, i64 %96
%98 = load i8*, i8** %97
%99 = call i64 @atof(i8* %98)
%100 = sitofp i64 %99 to double
store double %100, double* %15
br label %101
101: ; preds = %37, %22, %58, %60, %28, %95, %90, %84, %79, %74, %69, %64
%102 = add nuw nsw i64 %23, 1
%103 = icmp eq i64 %102, %21
br i1 %103, label %104, label %22
104: ; preds = %101
%105 = load i32, i32* %2
br label %106
106: ; preds = %104, %16
%107 = phi i32 [ %105, %104 ], [ 0, %16 ]
%108 = load i32, i32* %7
%109 = icmp slt i32 %108, %107
br i1 %109, label %110, label %113
110: ; preds = %106
%111 = load i32, i32* %3
%112 = icmp slt i32 %108, %111
br i1 %112, label %120, label %113
113: ; preds = %110, %106
%114 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%115 = load i32, i32* %2
%116 = load i32, i32* %3
%117 = icmp slt i32 %115, %116
%118 = select i1 %117, i32 %115, i32 %116
%119 = add nsw i32 %118, -1
store i32 %119, i32* %7
br label %120
120: ; preds = %40, %110, %113
%121 = phi i32 [ 0, %113 ], [ 0, %110 ], [ 1, %40 ]
ret i32 %121
}