#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ DataCounter(char *, int *, int *, char *);
int EOF;
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int getNumberOfPopulation(int *, int);
int /*<<< orphan*/ getPopSizes(int *, int *, int, int);
int *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
char *strdup(char *);
void read_params(int argc, char *argv[], char **popfile, char **genofile,
                 char **fstfile, int **POPs, int **PopSizes, int *nIND,
                 int *nSNP, int *nPOP, int ploidy) {
  int i, tmp, ind;
  int value;
  FILE *MyFILE;
  for (i = 0; i < argc; i++) {
    if (argv[i][0] == '-') {
      switch (argv[i][1]) {
      case 'i':
        *genofile = strdup(argv[i + 1]);
        printf("Genotypes in file %s\n", *genofile);
        if (!DataCounter(*genofile, nSNP, nIND, "genotypes")) {
          *nIND /= ploidy;
        } else {
          printf("ERROR: problem with the geno file\n");
        }
        break;
      case 'p':
        *popfile = strdup(argv[i + 1]);
        if ((MyFILE = fopen(*popfile, "r")) == NULL) {
          printf("Error, invalid pop file\n");
          break;
        }
        printf("Populations in file %s\n", *popfile);
        DataCounter(*popfile, &tmp, nIND, "genotypes");
        *POPs = malloc(sizeof(int) * (*nIND));
        ind = 0;
        fscanf(MyFILE, "%d", &value);
        while (ind < *nIND && value != EOF) {
          (*POPs)[ind] = value;
          fscanf(MyFILE, "%d", &value);
          ind++;
        }
        *nPOP = getNumberOfPopulation(*POPs, *nIND);
        *PopSizes = malloc(sizeof(int) * (*nPOP));
        getPopSizes(*PopSizes, *POPs, *nIND, *nPOP);
        break;
      case 'o':
        *fstfile = strdup(argv[i + 1]);
        break;
      }
    }
  }
}


x86 assembly (clang, -O0):
<read_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    145f <read_params+0x2df>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    144c <read_params+0x2cc>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0x4c(%rbp)
sub    $0x69,%eax
je     1220 <read_params+0xa0>
jmp    11fe <read_params+0x7e>
mov    -0x4c(%rbp),%eax
sub    $0x6f,%eax
je     1427 <read_params+0x2a7>
jmp    120f <read_params+0x8f>
mov    -0x4c(%rbp),%eax
sub    $0x70,%eax
je     12a9 <read_params+0x129>
jmp    1447 <read_params+0x2c7>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <strdup@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
lea    0xdb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
mov    0x20(%rbp),%rsi
mov    0x18(%rbp),%rdx
lea    0xdab(%rip),%rcx
call   1030 <DataCounter@plt>
cmp    $0x0,%eax
jne    1296 <read_params+0x116>
mov    0x30(%rbp),%ecx
mov    0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    (%rax),%eax
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x58(%rbp),%rax
mov    %ecx,(%rax)
jmp    12a4 <read_params+0x124>
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1447 <read_params+0x2c7>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <strdup@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
lea    0xd6c(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    12fd <read_params+0x17d>
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1447 <read_params+0x2c7>
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    0x18(%rbp),%rdx
lea    -0x38(%rbp),%rsi
lea    0xcee(%rip),%rcx
call   1030 <DataCounter@plt>
mov    0x18(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x3c(%rbp)
mov    -0x48(%rbp),%rdi
lea    0xd1b(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x3c(%rbp),%ecx
mov    0x18(%rbp),%rdx
xor    %eax,%eax
cmp    (%rdx),%ecx
mov    %al,-0x59(%rbp)
jge    138a <read_params+0x20a>
mov    -0x40(%rbp),%eax
mov    0x2c66(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    139a <read_params+0x21a>
jmp    13cd <read_params+0x24d>
mov    -0x40(%rbp),%edx
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x48(%rbp),%rdi
lea    0xcc0(%rip),%rsi
lea    -0x40(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1364 <read_params+0x1e4>
mov    -0x30(%rbp),%rax
mov    (%rax),%rdi
mov    0x18(%rbp),%rax
mov    (%rax),%esi
call   1060 <getNumberOfPopulation@plt>
mov    %eax,%ecx
mov    0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    0x28(%rbp),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x30(%rbp),%rax
mov    (%rax),%rsi
mov    0x18(%rbp),%rax
mov    (%rax),%edx
mov    0x28(%rbp),%rax
mov    (%rax),%ecx
call   10a0 <getPopSizes@plt>
jmp    1447 <read_params+0x2c7>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <strdup@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
jmp    144c <read_params+0x2cc>
jmp    1451 <read_params+0x2d1>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b9 <read_params+0x39>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_params>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8,0x18(%rsp)
mov    %rcx,0x10(%rsp)
test   %edi,%edi
jle    13a5 <read_params+0x215>
mov    %r9,%rbx
mov    %rdx,%r12
mov    %rsi,%r13
mov    %edi,%r15d
xor    %r14d,%r14d
mov    %rdx,0x8(%rsp)
jmp    11ed <read_params+0x5d>
mov    0x8(%r13,%r14,8),%rdi
call   10a0 <strdup@plt>
mov    0x18(%rsp),%rcx
mov    %rax,(%rcx)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    %r15,%r14
je     13a5 <read_params+0x215>
mov    0x0(%r13,%r14,8),%rax
cmpb   $0x2d,(%rax)
jne    11e0 <read_params+0x50>
movsbl 0x1(%rax),%eax
cmp    $0x70,%eax
je     1264 <read_params+0xd4>
cmp    $0x6f,%eax
je     11c6 <read_params+0x36>
cmp    $0x69,%eax
jne    11e0 <read_params+0x50>
mov    0x8(%r13,%r14,8),%rdi
call   10a0 <strdup@plt>
mov    0x10(%rsp),%rbp
mov    %rax,0x0(%rbp)
lea    0xddc(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%rbp),%rdi
mov    0x68(%rsp),%rbp
mov    0x70(%rsp),%rsi
mov    %rbp,%rdx
lea    0xdd0(%rip),%rcx
call   1040 <DataCounter@plt>
test   %eax,%eax
je     137e <read_params+0x1ee>
lea    0xdfb(%rip),%rdi
call   1030 <puts@plt>
jmp    11e0 <read_params+0x50>
mov    0x8(%r13,%r14,8),%rdi
call   10a0 <strdup@plt>
mov    %rax,(%r12)
mov    %rax,%rdi
lea    0xda4(%rip),%rsi
call   1090 <fopen@plt>
mov    %r12,%rbp
test   %rax,%rax
je     1391 <read_params+0x201>
mov    %rax,%r12
mov    0x0(%rbp),%rsi
lea    0xd87(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x0(%rbp),%rdi
lea    0x24(%rsp),%rsi
mov    0x68(%rsp),%rbp
mov    %rbp,%rdx
lea    0xd5c(%rip),%rcx
call   1040 <DataCounter@plt>
mov    0x0(%rbp),%edi
shl    $0x2,%edi
call   1080 <malloc@plt>
mov    %rax,(%rbx)
mov    %r12,%rdi
lea    0xd63(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1060 <fscanf@plt>
mov    0x0(%rbp),%esi
test   %esi,%esi
jle    133b <read_params+0x1ab>
mov    0x4(%rsp),%eax
mov    0x2cf5(%rip),%rcx
cmp    (%rcx),%eax
je     133b <read_params+0x1ab>
mov    $0x1,%ebp
nopl   0x0(%rax)
mov    (%rbx),%rcx
mov    %eax,-0x4(%rcx,%rbp,4)
mov    %r12,%rdi
lea    0xd29(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1060 <fscanf@plt>
mov    0x68(%rsp),%rax
movslq (%rax),%rsi
cmp    %rsi,%rbp
jge    133b <read_params+0x1ab>
add    $0x1,%rbp
mov    0x4(%rsp),%eax
mov    0x2cb1(%rip),%rcx
cmp    (%rcx),%eax
jne    1300 <read_params+0x170>
mov    (%rbx),%rdi
call   1070 <getNumberOfPopulation@plt>
mov    %eax,%ebp
mov    0x78(%rsp),%rax
mov    %ebp,(%rax)
lea    0x0(,%rbp,4),%edi
call   1080 <malloc@plt>
mov    0x60(%rsp),%rcx
mov    %rax,(%rcx)
mov    (%rbx),%rsi
mov    0x68(%rsp),%rcx
mov    (%rcx),%edx
mov    %rax,%rdi
mov    %ebp,%ecx
call   10b0 <getPopSizes@plt>
mov    0x8(%rsp),%r12
jmp    11e0 <read_params+0x50>
mov    0x0(%rbp),%eax
cltd
idivl  0x80(%rsp)
mov    %eax,0x0(%rbp)
jmp    11e0 <read_params+0x50>
lea    0xca5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbp,%r12
jmp    11e0 <read_params+0x50>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Genotypes in file %s\0A\00"
@.str.1 = [10 x i8] c"genotypes\00"
@.str.2 = [35 x i8] c"ERROR: problem with the geno file\0A\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [25 x i8] c"Error, invalid pop file\0A\00"
@.str.5 = [24 x i8] c"Populations in file %s\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@EOF = global i32 0
define void @read_params(i32 %0, i8** %1, i8** %2, i8** %3, i8** %4, i32** %5, i32** %6, i32* %7, i32* %8, i32* %9, i32 %10) {
%12 = alloca i32
%13 = alloca i8**
%14 = alloca i8**
%15 = alloca i8**
%16 = alloca i8**
%17 = alloca i32**
%18 = alloca i32**
%19 = alloca i32*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32*
store i32 %0, i32* %12
store i8** %1, i8*** %13
store i8** %2, i8*** %14
store i8** %3, i8*** %15
store i8** %4, i8*** %16
store i32** %5, i32*** %17
store i32** %6, i32*** %18
store i32* %7, i32** %19
store i32* %8, i32** %20
store i32* %9, i32** %21
store i32 %10, i32* %22
store i32 0, i32* %23
br label %28
28: ; preds = %165, %11
%29 = load i32, i32* %23
%30 = load i32, i32* %12
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %168
32: ; preds = %28
%33 = load i8**, i8*** %13
%34 = load i32, i32* %23
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8*, i8** %33, i64 %35
%37 = load i8*, i8** %36
%38 = getelementptr inbounds i8, i8* %37, i64 0
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 45
br i1 %41, label %42, label %164
42: ; preds = %32
%43 = load i8**, i8*** %13
%44 = load i32, i32* %23
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8*, i8** %43, i64 %45
%47 = load i8*, i8** %46
%48 = getelementptr inbounds i8, i8* %47, i64 1
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
switch i32 %50, label %163 [
i32 105, label %51
i32 112, label %77
i32 111, label %154
]
51: ; preds = %42
%52 = load i8**, i8*** %13
%53 = load i32, i32* %23
%54 = add nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %52, i64 %55
%57 = load i8*, i8** %56
%58 = call i8* @strdup(i8* %57)
%59 = load i8**, i8*** %15
store i8* %58, i8** %59
%60 = load i8**, i8*** %15
%61 = load i8*, i8** %60
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %61)
%63 = load i8**, i8*** %15
%64 = load i8*, i8** %63
%65 = load i32*, i32** %20
%66 = load i32*, i32** %19
%67 = call i32 @DataCounter(i8* %64, i32* %65, i32* %66, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%68 = icmp ne i32 %67, 0
br i1 %68, label %74, label %69
69: ; preds = %51
%70 = load i32, i32* %22
%71 = load i32*, i32** %19
%72 = load i32, i32* %71
%73 = sdiv i32 %72, %70
store i32 %73, i32* %71
br label %76
74: ; preds = %51
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
br label %76
76: ; preds = %74, %69
br label %163
77: ; preds = %42
%78 = load i8**, i8*** %13
%79 = load i32, i32* %23
%80 = add nsw i32 %79, 1
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8*, i8** %78, i64 %81
%83 = load i8*, i8** %82
%84 = call i8* @strdup(i8* %83)
%85 = load i8**, i8*** %14
store i8* %84, i8** %85
%86 = load i8**, i8*** %14
%87 = load i8*, i8** %86
%88 = call i32* @fopen(i8* %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %88, i32** %27
%89 = icmp eq i32* %88, null
br i1 %89, label %90, label %92
90: ; preds = %77
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %163
92: ; preds = %77
%93 = load i8**, i8*** %14
%94 = load i8*, i8** %93
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %94)
%96 = load i8**, i8*** %14
%97 = load i8*, i8** %96
%98 = load i32*, i32** %19
%99 = call i32 @DataCounter(i8* %97, i32* %24, i32* %98, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%100 = load i32*, i32** %19
%101 = load i32, i32* %100
%102 = sext i32 %101 to i64
%103 = mul i64 4, %102
%104 = trunc i64 %103 to i32
%105 = call i32* @malloc(i32 %104)
%106 = load i32**, i32*** %17
store i32* %105, i32** %106
store i32 0, i32* %25
%107 = load i32*, i32** %27
%108 = call i32 @fscanf(i32* %107, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %26)
br label %109
109: ; preds = %120, %92
%110 = load i32, i32* %25
%111 = load i32*, i32** %19
%112 = load i32, i32* %111
%113 = icmp slt i32 %110, %112
br i1 %113, label %114, label %118
114: ; preds = %109
%115 = load i32, i32* %26
%116 = load i32, i32* @EOF
%117 = icmp ne i32 %115, %116
br label %118
118: ; preds = %114, %109
%119 = phi i1 [ false, %109 ], [ %117, %114 ]
br i1 %119, label %120, label %131
120: ; preds = %118
%121 = load i32, i32* %26
%122 = load i32**, i32*** %17
%123 = load i32*, i32** %122
%124 = load i32, i32* %25
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i32, i32* %123, i64 %125
store i32 %121, i32* %126
%127 = load i32*, i32** %27
%128 = call i32 @fscanf(i32* %127, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %26)
%129 = load i32, i32* %25
%130 = add nsw i32 %129, 1
store i32 %130, i32* %25
br label %109
131: ; preds = %118
%132 = load i32**, i32*** %17
%133 = load i32*, i32** %132
%134 = load i32*, i32** %19
%135 = load i32, i32* %134
%136 = call i32 @getNumberOfPopulation(i32* %133, i32 %135)
%137 = load i32*, i32** %21
store i32 %136, i32* %137
%138 = load i32*, i32** %21
%139 = load i32, i32* %138
%140 = sext i32 %139 to i64
%141 = mul i64 4, %140
%142 = trunc i64 %141 to i32
%143 = call i32* @malloc(i32 %142)
%144 = load i32**, i32*** %18
store i32* %143, i32** %144
%145 = load i32**, i32*** %18
%146 = load i32*, i32** %145
%147 = load i32**, i32*** %17
%148 = load i32*, i32** %147
%149 = load i32*, i32** %19
%150 = load i32, i32* %149
%151 = load i32*, i32** %21
%152 = load i32, i32* %151
%153 = call i32 @getPopSizes(i32* %146, i32* %148, i32 %150, i32 %152)
br label %163
154: ; preds = %42
%155 = load i8**, i8*** %13
%156 = load i32, i32* %23
%157 = add nsw i32 %156, 1
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds i8*, i8** %155, i64 %158
%160 = load i8*, i8** %159
%161 = call i8* @strdup(i8* %160)
%162 = load i8**, i8*** %16
store i8* %161, i8** %162
br label %163
163: ; preds = %42, %154, %131, %90, %76
br label %164
164: ; preds = %163, %32
br label %165
165: ; preds = %164
%166 = load i32, i32* %23
%167 = add nsw i32 %166, 1
store i32 %167, i32* %23
br label %28
168: ; preds = %28
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Genotypes in file %s\0A\00"
@.str.1 = [10 x i8] c"genotypes\00"
@.str.3 = [2 x i8] c"r\00"
@.str.5 = [24 x i8] c"Populations in file %s\0A\00"
@.str.6 = [3 x i8] c"%d\00"
@EOF = global i32 0
@str = [24 x i8] c"Error, invalid pop file\00"
@str.7 = [34 x i8] c"ERROR: problem with the geno file\00"
define void @read_params(i32 %0, i8** nocapture %1, i8** nocapture %2, i8** nocapture %3, i8** nocapture writeonly %4, i32** nocapture %5, i32** nocapture writeonly %6, i32* %7, i32* %8, i32* nocapture writeonly %9, i32 %10) {
%12 = alloca i32
%13 = alloca i32
%14 = bitcast i32* %12 to i8*
%15 = bitcast i32* %13 to i8*
%16 = icmp sgt i32 %0, 0
br i1 %16, label %17, label %98
17: ; preds = %11
%18 = zext i32 %0 to i64
br label %19
19: ; preds = %17, %95
%20 = phi i64 [ 0, %17 ], [ %96, %95 ]
%21 = getelementptr inbounds i8*, i8** %1, i64 %20
%22 = load i8*, i8** %21
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 45
br i1 %24, label %25, label %95
25: ; preds = %19
%26 = getelementptr inbounds i8, i8* %22, i64 1
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
switch i32 %28, label %95 [
i32 105, label %29
i32 112, label %43
i32 111, label %90
]
29: ; preds = %25
%30 = add nuw nsw i64 %20, 1
%31 = getelementptr inbounds i8*, i8** %1, i64 %30
%32 = load i8*, i8** %31
%33 = call i8* @strdup(i8* %32)
store i8* %33, i8** %3
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %33)
%35 = load i8*, i8** %3
%36 = call i32 @DataCounter(i8* %35, i32* %8, i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %29
%39 = load i32, i32* %7
%40 = sdiv i32 %39, %10
store i32 %40, i32* %7
br label %95
41: ; preds = %29
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.7, i64 0, i64 0))
br label %95
43: ; preds = %25
%44 = add nuw nsw i64 %20, 1
%45 = getelementptr inbounds i8*, i8** %1, i64 %44
%46 = load i8*, i8** %45
%47 = call i8* @strdup(i8* %46)
store i8* %47, i8** %2
%48 = call i32* @fopen(i8* %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%49 = icmp eq i32* %48, null
br i1 %49, label %50, label %52
50: ; preds = %43
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %95
52: ; preds = %43
%53 = load i8*, i8** %2
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %53)
%55 = load i8*, i8** %2
%56 = call i32 @DataCounter(i8* %55, i32* %12, i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%57 = load i32, i32* %7
%58 = shl i32 %57, 2
%59 = call i32* @malloc(i32 %58)
store i32* %59, i32** %5
%60 = call i32 @fscanf(i32* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %13)
%61 = load i32, i32* %7
%62 = icmp sgt i32 %61, 0
%63 = load i32, i32* %13
%64 = load i32, i32* @EOF
%65 = icmp ne i32 %63, %64
%66 = select i1 %62, i1 %65, i1 false
br i1 %66, label %67, label %81
67: ; preds = %52, %67
%68 = phi i64 [ %73, %67 ], [ 0, %52 ]
%69 = phi i32 [ %77, %67 ], [ %63, %52 ]
%70 = load i32*, i32** %5
%71 = getelementptr inbounds i32, i32* %70, i64 %68
store i32 %69, i32* %71
%72 = call i32 @fscanf(i32* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32* %13)
%73 = add nuw nsw i64 %68, 1
%74 = load i32, i32* %7
%75 = sext i32 %74 to i64
%76 = icmp slt i64 %73, %75
%77 = load i32, i32* %13
%78 = load i32, i32* @EOF
%79 = icmp ne i32 %77, %78
%80 = select i1 %76, i1 %79, i1 false
br i1 %80, label %67, label %81
81: ; preds = %67, %52
%82 = phi i32 [ %61, %52 ], [ %74, %67 ]
%83 = load i32*, i32** %5
%84 = call i32 @getNumberOfPopulation(i32* %83, i32 %82)
store i32 %84, i32* %9
%85 = shl i32 %84, 2
%86 = call i32* @malloc(i32 %85)
store i32* %86, i32** %6
%87 = load i32*, i32** %5
%88 = load i32, i32* %7
%89 = call i32 @getPopSizes(i32* %86, i32* %87, i32 %88, i32 %84)
br label %95
90: ; preds = %25
%91 = add nuw nsw i64 %20, 1
%92 = getelementptr inbounds i8*, i8** %1, i64 %91
%93 = load i8*, i8** %92
%94 = call i8* @strdup(i8* %93)
store i8* %94, i8** %4
br label %95
95: ; preds = %19, %38, %41, %25, %90, %81, %50
%96 = add nuw nsw i64 %20, 1
%97 = icmp eq i64 %96, %18
br i1 %97, label %98, label %19
98: ; preds = %95, %11
ret void
}