#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*/ abort();
int /*<<< orphan*/ printf(char *);
int sscanf(char *, char *, ...);
char *strtok(char *, char *);
void readGeno(int nsample, char *sline_geno, int *chr, long *bp, double *cm,
              char *name, double *FREQ1, double *geno, char *a1, char *a2) {
  int i;
  char *nextGeno;
  int k = 0;
  *a1 = '0';
  *a2 = '0';
  char *pch = strtok(sline_geno, " \t");
  sscanf(pch, "%d", chr);
  pch = strtok(NULL, " \t");
  sscanf(pch, "%s", name);
  pch = strtok(NULL, " \t");
  sscanf(pch, "%lg", cm);
  pch = strtok(NULL, " \t");
  sscanf(pch, "%ld", bp);
  *FREQ1 = 0;
  for (i = 0; i < nsample; i++) {
    pch = strtok(NULL, " \t");
    char A1;
    if (sscanf(pch, "%c", &A1) != 1) {
      printf("-Error in tped file: genotype\n");
      abort();
    }
    pch = strtok(NULL, " \t");
    char A2;
    if (sscanf(pch, "%c", &A2) != 1) {
      printf("-Error in tped file: genotype\n");
      abort();
    }
    double g = -1;
    if (A1 == '0' || A2 == '0') {
      g = -1;
    } else if (A1 != A2) {
      if (*a1 == '0')
        *a1 = A1;
      if (*a1 == A1 && *a2 == '0')
        *a2 = A2;
      else if (*a1 == A2 && *a2 == '0')
        *a2 = A1;
      g = 1.0;
    } else {
      if (*a1 == '0' || *a1 == A1) {
        *a1 = A1;
        g = 0.0;
      } else if (*a2 == '0') {
        *a2 = A1;
        g = 2.0;
      } else if (*a2 == A1) {
        g = 2.0;
      }
    }
    *geno = g;
    if (g >= 0) {
      (*FREQ1) += (*geno);
    }
    geno++;
    k++;
  }
  (*FREQ1) /= (2 * k);
}


x86 assembly (clang, -O0):
<readGeno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
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,-0x44(%rbp)
mov    0x20(%rbp),%rax
movb   $0x30,(%rax)
mov    0x28(%rbp),%rax
movb   $0x30,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe74(%rip),%rsi
mov    $0x0,%al
call   1050 <sscanf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe5f(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1050 <sscanf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe35(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x28(%rbp),%rdx
lea    0xe26(%rip),%rsi
mov    $0x0,%al
call   1050 <sscanf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe0b(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe00(%rip),%rsi
mov    $0x0,%al
call   1050 <sscanf@plt>
mov    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    149a <readGeno+0x35a>
xor    %eax,%eax
mov    %eax,%edi
lea    0xdc3(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
lea    0xdc0(%rip),%rsi
lea    -0x51(%rbp),%rdx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
je     1290 <readGeno+0x150>
lea    0xda8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd7d(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
lea    0xd7a(%rip),%rsi
lea    -0x52(%rbp),%rdx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
je     12d6 <readGeno+0x196>
lea    0xd62(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xd22(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsbl -0x51(%rbp),%eax
cmp    $0x30,%eax
je     12fd <readGeno+0x1bd>
movsbl -0x52(%rbp),%eax
cmp    $0x30,%eax
jne    130f <readGeno+0x1cf>
movsd  0xcfb(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1444 <readGeno+0x304>
movsbl -0x51(%rbp),%eax
movsbl -0x52(%rbp),%ecx
cmp    %ecx,%eax
je     13ac <readGeno+0x26c>
mov    0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1338 <readGeno+0x1f8>
mov    -0x51(%rbp),%cl
mov    0x20(%rbp),%rax
mov    %cl,(%rax)
mov    0x20(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x51(%rbp),%ecx
cmp    %ecx,%eax
jne    1369 <readGeno+0x229>
mov    0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1369 <readGeno+0x229>
mov    -0x52(%rbp),%cl
mov    0x28(%rbp),%rax
mov    %cl,(%rax)
jmp    139a <readGeno+0x25a>
mov    0x20(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x52(%rbp),%ecx
cmp    %ecx,%eax
jne    1395 <readGeno+0x255>
mov    0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1395 <readGeno+0x255>
mov    -0x51(%rbp),%cl
mov    0x28(%rbp),%rax
mov    %cl,(%rax)
jmp    139a <readGeno+0x25a>
movsd  0xc6e(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    143f <readGeno+0x2ff>
mov    0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
je     13cf <readGeno+0x28f>
mov    0x20(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x51(%rbp),%ecx
cmp    %ecx,%eax
jne    13e5 <readGeno+0x2a5>
mov    -0x51(%rbp),%cl
mov    0x20(%rbp),%rax
mov    %cl,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    143a <readGeno+0x2fa>
mov    0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1410 <readGeno+0x2d0>
mov    -0x51(%rbp),%cl
mov    0x28(%rbp),%rax
mov    %cl,(%rax)
movsd  0xc02(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1435 <readGeno+0x2f5>
mov    0x28(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x51(%rbp),%ecx
cmp    %ecx,%eax
jne    1430 <readGeno+0x2f0>
movsd  0xbdd(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1435 <readGeno+0x2f5>
jmp    143a <readGeno+0x2fa>
jmp    143f <readGeno+0x2ff>
jmp    1444 <readGeno+0x304>
movsd  -0x60(%rbp),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1477 <readGeno+0x337>
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,0x18(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    123e <readGeno+0xfe>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readGeno>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%r15
mov    %r8,%r12
mov    %rcx,0x10(%rsp)
mov    %rdx,%rbp
mov    %edi,%r13d
mov    0x68(%rsp),%rax
mov    0x60(%rsp),%rcx
mov    0x50(%rsp),%rbx
movb   $0x30,(%rcx)
movb   $0x30,(%rax)
lea    0xe9d(%rip),%r14
mov    %rsi,%rdi
mov    %r14,%rsi
call   1060 <strtok@plt>
lea    0xe8e(%rip),%rsi
mov    %rax,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
xor    %edi,%edi
mov    %r14,%rsi
call   1060 <strtok@plt>
lea    0xe73(%rip),%rsi
mov    %rax,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
xor    %edi,%edi
mov    %r14,%rsi
call   1060 <strtok@plt>
lea    0xe58(%rip),%rsi
mov    %rax,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
xor    %edi,%edi
mov    %r14,%rsi
call   1060 <strtok@plt>
lea    0xe3e(%rip),%rsi
mov    %rax,%rdi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
movq   $0x0,(%rbx)
test   %r13d,%r13d
jle    1389 <readGeno+0x249>
mov    %r13d,0x10(%rsp)
mov    %r13d,%r14d
lea    0xe03(%rip),%rbx
lea    0xe0d(%rip),%rbp
lea    0xf(%rsp),%r15
lea    0xe(%rsp),%r12
xor    %r13d,%r13d
jmp    1250 <readGeno+0x110>
nopl   0x0(%rax,%rax,1)
mov    0x58(%rsp),%rax
movabs $0xbff0000000000000,%rcx
mov    %rcx,(%rax,%r13,8)
add    $0x1,%r13
cmp    %r13d,%r14d
je     1370 <readGeno+0x230>
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    13a4 <readGeno+0x264>
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <strtok@plt>
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    13a4 <readGeno+0x264>
movzbl 0xf(%rsp),%eax
cmp    $0x30,%al
je     1230 <readGeno+0xf0>
movzbl 0xe(%rsp),%ecx
cmp    $0x30,%cl
je     1230 <readGeno+0xf0>
mov    0x60(%rsp),%rdx
movzbl (%rdx),%edx
cmp    %cl,%al
jne    12e0 <readGeno+0x1a0>
cmp    $0x30,%dl
je     12f0 <readGeno+0x1b0>
cmp    %al,%dl
je     12f0 <readGeno+0x1b0>
mov    0x68(%rsp),%rdx
movzbl (%rdx),%ecx
cmp    $0x30,%cl
jne    135e <readGeno+0x21e>
mov    %al,(%rdx)
movsd  0xd37(%rip),%xmm0
jmp    1341 <readGeno+0x201>
nopl   0x0(%rax,%rax,1)
cmp    $0x30,%dl
jne    12fd <readGeno+0x1bd>
mov    0x60(%rsp),%rdx
mov    %al,(%rdx)
mov    %eax,%edx
jmp    1301 <readGeno+0x1c1>
mov    0x60(%rsp),%rcx
mov    %al,(%rcx)
xorpd  %xmm0,%xmm0
jmp    1341 <readGeno+0x201>
cmp    %al,%dl
jne    1314 <readGeno+0x1d4>
mov    0x68(%rsp),%rsi
cmpb   $0x30,(%rsi)
jne    1314 <readGeno+0x1d4>
mov    0x68(%rsp),%rax
mov    %cl,(%rax)
jmp    1339 <readGeno+0x1f9>
movsd  0xcec(%rip),%xmm0
cmp    %cl,%dl
jne    1341 <readGeno+0x201>
mov    0x68(%rsp),%rcx
cmpb   $0x30,(%rcx)
movsd  0xcd8(%rip),%xmm0
jne    1341 <readGeno+0x201>
mov    0x68(%rsp),%rcx
mov    %al,(%rcx)
movsd  0xcc7(%rip),%xmm0
mov    0x58(%rsp),%rax
movsd  %xmm0,(%rax,%r13,8)
mov    0x50(%rsp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1243 <readGeno+0x103>
movsd  0xcaa(%rip),%xmm0
cmp    %al,%cl
jne    1230 <readGeno+0xf0>
jmp    1341 <readGeno+0x201>
mov    0x50(%rsp),%rbx
movsd  (%rbx),%xmm0
mov    0x10(%rsp),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
jmp    1391 <readGeno+0x251>
movsd  0xc6f(%rip),%xmm0
movsd  %xmm0,(%rbx)
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc81(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [3 x i8] c" \09\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [4 x i8] c"%lg\00"
@.str.4 = [4 x i8] c"%ld\00"
@.str.5 = [3 x i8] c"%c\00"
@.str.6 = [31 x i8] c"-Error in tped file: genotype\0A\00"
define void @readGeno(i32 %0, i8* %1, i32* %2, i64* %3, double* %4, i8* %5, double* %6, double* %7, i8* %8, i8* %9) {
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i64*
%15 = alloca double*
%16 = alloca i8*
%17 = alloca double*
%18 = alloca double*
%19 = alloca i8*
%20 = alloca i8*
%21 = alloca i32
%22 = alloca i8*
%23 = alloca i32
%24 = alloca i8*
%25 = alloca i8
%26 = alloca i8
%27 = alloca double
store i32 %0, i32* %11
store i8* %1, i8** %12
store i32* %2, i32** %13
store i64* %3, i64** %14
store double* %4, double** %15
store i8* %5, i8** %16
store double* %6, double** %17
store double* %7, double** %18
store i8* %8, i8** %19
store i8* %9, i8** %20
store i32 0, i32* %23
%28 = load i8*, i8** %19
store i8 48, i8* %28
%29 = load i8*, i8** %20
store i8 48, i8* %29
%30 = load i8*, i8** %12
%31 = call i8* @strtok(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %31, i8** %24
%32 = load i8*, i8** %24
%33 = load i32*, i32** %13
%34 = call i32 (i8*, i8*, ...) @sscanf(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %33)
%35 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %35, i8** %24
%36 = load i8*, i8** %24
%37 = load i8*, i8** %16
%38 = call i32 (i8*, i8*, ...) @sscanf(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %37)
%39 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %39, i8** %24
%40 = load i8*, i8** %24
%41 = load double*, double** %15
%42 = call i32 (i8*, i8*, ...) @sscanf(i8* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %41)
%43 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %43, i8** %24
%44 = load i8*, i8** %24
%45 = load i64*, i64** %14
%46 = call i32 (i8*, i8*, ...) @sscanf(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64* %45)
%47 = load double*, double** %17
store double 0.000000e+00, double* %47
store i32 0, i32* %21
br label %48
48: ; preds = %174, %10
%49 = load i32, i32* %21
%50 = load i32, i32* %11
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %177
52: ; preds = %48
%53 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %53, i8** %24
%54 = load i8*, i8** %24
%55 = call i32 (i8*, i8*, ...) @sscanf(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %25)
%56 = icmp ne i32 %55, 1
br i1 %56, label %57, label %60
57: ; preds = %52
%58 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%59 = call i32 (...) @abort()
unreachable
60: ; preds = %52
%61 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %61, i8** %24
%62 = load i8*, i8** %24
%63 = call i32 (i8*, i8*, ...) @sscanf(i8* %62, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %26)
%64 = icmp ne i32 %63, 1
br i1 %64, label %65, label %68
65: ; preds = %60
%66 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%67 = call i32 (...) @abort()
unreachable
68: ; preds = %60
store double -1.000000e+00, double* %27
%69 = load i8, i8* %25
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 48
br i1 %71, label %76, label %72
72: ; preds = %68
%73 = load i8, i8* %26
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 48
br i1 %75, label %76, label %77
76: ; preds = %72, %68
store double -1.000000e+00, double* %27
br label %158
77: ; preds = %72
%78 = load i8, i8* %25
%79 = sext i8 %78 to i32
%80 = load i8, i8* %26
%81 = sext i8 %80 to i32
%82 = icmp ne i32 %79, %81
br i1 %82, label %83, label %123
83: ; preds = %77
%84 = load i8*, i8** %19
%85 = load i8, i8* %84
%86 = sext i8 %85 to i32
%87 = icmp eq i32 %86, 48
br i1 %87, label %88, label %91
88: ; preds = %83
%89 = load i8, i8* %25
%90 = load i8*, i8** %19
store i8 %89, i8* %90
br label %91
91: ; preds = %88, %83
%92 = load i8*, i8** %19
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = load i8, i8* %25
%96 = sext i8 %95 to i32
%97 = icmp eq i32 %94, %96
br i1 %97, label %98, label %106
98: ; preds = %91
%99 = load i8*, i8** %20
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 48
br i1 %102, label %103, label %106
103: ; preds = %98
%104 = load i8, i8* %26
%105 = load i8*, i8** %20
store i8 %104, i8* %105
br label %122
106: ; preds = %98, %91
%107 = load i8*, i8** %19
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = load i8, i8* %26
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %109, %111
br i1 %112, label %113, label %121
113: ; preds = %106
%114 = load i8*, i8** %20
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp eq i32 %116, 48
br i1 %117, label %118, label %121
118: ; preds = %113
%119 = load i8, i8* %25
%120 = load i8*, i8** %20
store i8 %119, i8* %120
br label %121
121: ; preds = %118, %113, %106
br label %122
122: ; preds = %121, %103
store double 1.000000e+00, double* %27
br label %157
123: ; preds = %77
%124 = load i8*, i8** %19
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 48
br i1 %127, label %135, label %128
128: ; preds = %123
%129 = load i8*, i8** %19
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = load i8, i8* %25
%133 = sext i8 %132 to i32
%134 = icmp eq i32 %131, %133
br i1 %134, label %135, label %138
135: ; preds = %128, %123
%136 = load i8, i8* %25
%137 = load i8*, i8** %19
store i8 %136, i8* %137
store double 0.000000e+00, double* %27
br label %156
138: ; preds = %128
%139 = load i8*, i8** %20
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 48
br i1 %142, label %143, label %146
143: ; preds = %138
%144 = load i8, i8* %25
%145 = load i8*, i8** %20
store i8 %144, i8* %145
store double 2.000000e+00, double* %27
br label %155
146: ; preds = %138
%147 = load i8*, i8** %20
%148 = load i8, i8* %147
%149 = sext i8 %148 to i32
%150 = load i8, i8* %25
%151 = sext i8 %150 to i32
%152 = icmp eq i32 %149, %151
br i1 %152, label %153, label %154
153: ; preds = %146
store double 2.000000e+00, double* %27
br label %154
154: ; preds = %153, %146
br label %155
155: ; preds = %154, %143
br label %156
156: ; preds = %155, %135
br label %157
157: ; preds = %156, %122
br label %158
158: ; preds = %157, %76
%159 = load double, double* %27
%160 = load double*, double** %18
store double %159, double* %160
%161 = load double, double* %27
%162 = fcmp oge double %161, 0.000000e+00
br i1 %162, label %163, label %169
163: ; preds = %158
%164 = load double*, double** %18
%165 = load double, double* %164
%166 = load double*, double** %17
%167 = load double, double* %166
%168 = fadd double %167, %165
store double %168, double* %166
br label %169
169: ; preds = %163, %158
%170 = load double*, double** %18
%171 = getelementptr inbounds double, double* %170, i32 1
store double* %171, double** %18
%172 = load i32, i32* %23
%173 = add nsw i32 %172, 1
store i32 %173, i32* %23
br label %174
174: ; preds = %169
%175 = load i32, i32* %21
%176 = add nsw i32 %175, 1
store i32 %176, i32* %21
br label %48
177: ; preds = %48
%178 = load i32, i32* %23
%179 = mul nsw i32 2, %178
%180 = sitofp i32 %179 to double
%181 = load double*, double** %17
%182 = load double, double* %181
%183 = fdiv double %182, %180
store double %183, double* %181
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [4 x i8] c"%lg\00"
@.str.4 = [4 x i8] c"%ld\00"
@.str.5 = [3 x i8] c"%c\00"
@str.7 = [30 x i8] c"-Error in tped file: genotype\00"
define void @readGeno(i32 %0, i8* %1, i32* %2, i64* %3, double* %4, i8* %5, double* nocapture %6, double* nocapture writeonly %7, i8* nocapture %8, i8* nocapture %9) {
%11 = alloca i8
%12 = alloca i8
store i8 48, i8* %8
store i8 48, i8* %9
%13 = tail call i8* @strtok(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%14 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%15 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%17 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %4)
%19 = tail call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%20 = tail call i32 (i8*, i8*, ...) @sscanf(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64* %3)
store double 0.000000e+00, double* %6
%21 = icmp sgt i32 %0, 0
br i1 %21, label %22, label %88
22: ; preds = %10, %79
%23 = phi i32 [ %81, %79 ], [ 0, %10 ]
%24 = phi double* [ %80, %79 ], [ %7, %10 ]
%25 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%26 = call i32 (i8*, i8*, ...) @sscanf(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %11)
%27 = icmp eq i32 %26, 1
br i1 %27, label %31, label %28
28: ; preds = %22
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.7, i64 0, i64 0))
%30 = call i32 (...) @abort()
unreachable
31: ; preds = %22
%32 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%33 = call i32 (i8*, i8*, ...) @sscanf(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %12)
%34 = icmp eq i32 %33, 1
br i1 %34, label %38, label %35
35: ; preds = %31
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.7, i64 0, i64 0))
%37 = call i32 (...) @abort()
unreachable
38: ; preds = %31
%39 = load i8, i8* %11
%40 = icmp eq i8 %39, 48
%41 = load i8, i8* %12
%42 = icmp eq i8 %41, 48
%43 = select i1 %40, i1 true, i1 %42
br i1 %43, label %74, label %44
44: ; preds = %38
%45 = icmp eq i8 %39, %41
%46 = load i8, i8* %8
%47 = icmp eq i8 %46, 48
br i1 %45, label %64, label %48
48: ; preds = %44
br i1 %47, label %49, label %50
49: ; preds = %48
store i8 %39, i8* %8
br label %52
50: ; preds = %48
%51 = icmp eq i8 %46, %39
br i1 %51, label %52, label %57
52: ; preds = %49, %50
%53 = phi i8 [ %39, %49 ], [ %46, %50 ]
%54 = load i8, i8* %9
%55 = icmp eq i8 %54, 48
br i1 %55, label %56, label %57
56: ; preds = %52
store i8 %41, i8* %9
br label %75
57: ; preds = %52, %50
%58 = phi i8 [ %53, %52 ], [ %46, %50 ]
%59 = icmp eq i8 %58, %41
br i1 %59, label %60, label %75
60: ; preds = %57
%61 = load i8, i8* %9
%62 = icmp eq i8 %61, 48
br i1 %62, label %63, label %75
63: ; preds = %60
store i8 %39, i8* %9
br label %75
64: ; preds = %44
%65 = icmp eq i8 %46, %39
%66 = select i1 %47, i1 true, i1 %65
br i1 %66, label %67, label %68
67: ; preds = %64
store i8 %39, i8* %8
br label %75
68: ; preds = %64
%69 = load i8, i8* %9
%70 = icmp eq i8 %69, 48
br i1 %70, label %71, label %72
71: ; preds = %68
store i8 %39, i8* %9
br label %75
72: ; preds = %68
%73 = icmp eq i8 %69, %39
br i1 %73, label %75, label %74
74: ; preds = %72, %38
store double -1.000000e+00, double* %24
br label %79
75: ; preds = %72, %67, %71, %57, %60, %63, %56
%76 = phi double [ 1.000000e+00, %56 ], [ 1.000000e+00, %63 ], [ 1.000000e+00, %60 ], [ 1.000000e+00, %57 ], [ 2.000000e+00, %71 ], [ 0.000000e+00, %67 ], [ 2.000000e+00, %72 ]
store double %76, double* %24
%77 = load double, double* %6
%78 = fadd double %76, %77
store double %78, double* %6
br label %79
79: ; preds = %74, %75
%80 = getelementptr inbounds double, double* %24, i64 1
%81 = add nuw nsw i32 %23, 1
%82 = icmp eq i32 %81, %0
br i1 %82, label %83, label %22
83: ; preds = %79
%84 = load double, double* %6
%85 = shl i32 %0, 1
%86 = sitofp i32 %85 to double
%87 = fdiv double %84, %86
br label %88
88: ; preds = %83, %10
%89 = phi double [ %87, %83 ], [ 0x7FF8000000000000, %10 ]
store double %89, double* %6
ret void
}