#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*/ gzFile;

/* Variables and functions */
int Poisson(double);
int /*<<< orphan*/ calclike(int, double, double *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double);
int /*<<< orphan*/ gzwrite(int /*<<< orphan*/, double *, int);
int pick_a_base(double, int *);
int /*<<< orphan*/ stderr;
int print_ind_site(double errate, double meandepth, int genotype[2],
                   gzFile glffile) {
  int i, b, numreads;
  double like[10];
  numreads = Poisson(meandepth);
  for (i = 0; i < 10; i++)
    like[i] = -0.0;
  for (i = 0; i < numreads; i++) {
    b = pick_a_base(errate, genotype);
    for (int j = 0; 0 && j < 10; j++)
      fprintf(stderr, " %f ", like[j]);
    calclike(b, errate, like);
    for (int j = 0; 0 && j < 10; j++)
      fprintf(stderr, " %f ", like[j]);
  }
  if (1) {
    double mx = like[0];
    for (int i = 1; i < 10; i++)
      if (like[i] > mx)
        mx = like[i];
    for (int i = 0; i < 10; i++)
      like[i] -= mx;
  }
  gzwrite(glffile, like, sizeof(double) * 10);
  return numreads;
}


x86 assembly (clang, -O0):
<print_ind_site>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1070 <Poisson@plt>
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0xa,-0x20(%rbp)
jge    11aa <print_ind_site+0x5a>
movslq -0x20(%rbp),%rax
movsd  0xe6a(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1180 <print_ind_site+0x30>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1290 <print_ind_site+0x140>
movsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1030 <pick_a_base@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x84(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    11e7 <print_ind_site+0x97>
jmp    121d <print_ind_site+0xcd>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
movslq -0x84(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
lea    0xe04(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    11d8 <print_ind_site+0x88>
mov    -0x24(%rbp),%edi
movsd  -0x8(%rbp),%xmm0
lea    -0x80(%rbp),%rsi
call   1050 <calclike@plt>
movl   $0x0,-0x88(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1247 <print_ind_site+0xf7>
jmp    127d <print_ind_site+0x12d>
mov    0x2d92(%rip),%rax
mov    (%rax),%edi
movslq -0x88(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
lea    0xda4(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1238 <print_ind_site+0xe8>
jmp    1282 <print_ind_site+0x132>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b1 <print_ind_site+0x61>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x1,-0x94(%rbp)
cmpl   $0xa,-0x94(%rbp)
jge    12fd <print_ind_site+0x1ad>
movslq -0x94(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
ucomisd -0x90(%rbp),%xmm0
ff
jbe    12e4 <print_ind_site+0x194>
movslq -0x94(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    12e9 <print_ind_site+0x199>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    12a7 <print_ind_site+0x157>
movl   $0x0,-0x98(%rbp)
cmpl   $0xa,-0x98(%rbp)
jge    1347 <print_ind_site+0x1f7>
movsd  -0x90(%rbp),%xmm1
ff
movslq -0x98(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1307 <print_ind_site+0x1b7>
mov    -0x1c(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    $0x50,%edx
call   1060 <gzwrite@plt>
mov    -0x28(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ind_site>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x60,%rsp
mov    %esi,%r14d
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
movaps %xmm1,%xmm0
call   1060 <Poisson@plt>
mov    %eax,%r15d
movapd 0xe95(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
movapd %xmm0,0x20(%rsp)
movapd %xmm0,0x30(%rsp)
movapd %xmm0,0x40(%rsp)
movapd %xmm0,0x50(%rsp)
movapd %xmm0,%xmm4
movapd %xmm0,%xmm3
movapd %xmm0,%xmm2
movapd %xmm0,%xmm1
test   %eax,%eax
jle    11f1 <print_ind_site+0xb1>
lea    0x10(%rsp),%r12
mov    %r15d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
call   1030 <pick_a_base@plt>
mov    %eax,%edi
movsd  0x8(%rsp),%xmm0
mov    %r12,%rsi
call   1040 <calclike@plt>
add    $0xffffffff,%ebp
jne    11b0 <print_ind_site+0x70>
movapd 0x10(%rsp),%xmm0
movapd 0x20(%rsp),%xmm4
movapd 0x30(%rsp),%xmm3
movapd 0x40(%rsp),%xmm2
movapd 0x50(%rsp),%xmm1
movapd %xmm0,%xmm5
unpckhpd %xmm0,%xmm5
maxsd  %xmm0,%xmm5
movapd %xmm4,%xmm6
maxsd  %xmm5,%xmm6
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
maxsd  %xmm6,%xmm5
movapd %xmm3,%xmm6
maxsd  %xmm5,%xmm6
movapd %xmm3,%xmm5
unpckhpd %xmm3,%xmm5
maxsd  %xmm6,%xmm5
movapd %xmm2,%xmm6
maxsd  %xmm5,%xmm6
movapd %xmm2,%xmm5
unpckhpd %xmm2,%xmm5
maxsd  %xmm6,%xmm5
movapd %xmm1,%xmm6
maxsd  %xmm5,%xmm6
movapd %xmm1,%xmm5
unpckhpd %xmm1,%xmm5
maxsd  %xmm6,%xmm5
unpcklpd %xmm5,%xmm5
subpd  %xmm5,%xmm0
movapd %xmm0,0x10(%rsp)
subpd  %xmm5,%xmm4
movapd %xmm4,0x20(%rsp)
subpd  %xmm5,%xmm3
movapd %xmm3,0x30(%rsp)
subpd  %xmm5,%xmm2
movapd %xmm2,0x40(%rsp)
subpd  %xmm5,%xmm1
movapd %xmm1,0x50(%rsp)
lea    0x10(%rsp),%rsi
mov    %r14d,%edi
mov    $0x50,%edx
call   1050 <gzwrite@plt>
mov    %r15d,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c" %f \00"
define i32 @print_ind_site(double %0, double %1, i32* %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [10 x double]
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
store double %0, double* %5
store double %1, double* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%18 = load double, double* %6
%19 = call i32 @Poisson(double %18)
store i32 %19, i32* %11
store i32 0, i32* %9
br label %20
20: ; preds = %27, %4
%21 = load i32, i32* %9
%22 = icmp slt i32 %21, 10
br i1 %22, label %23, label %30
23: ; preds = %20
%24 = load i32, i32* %9
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 %25
store double -0.000000e+00, double* %26
br label %27
27: ; preds = %23
%28 = load i32, i32* %9
%29 = add nsw i32 %28, 1
store i32 %29, i32* %9
br label %20
30: ; preds = %20
store i32 0, i32* %9
br label %31
31: ; preds = %67, %30
%32 = load i32, i32* %9
%33 = load i32, i32* %11
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %70
35: ; preds = %31
%36 = load double, double* %5
%37 = load i32*, i32** %7
%38 = call i32 @pick_a_base(double %36, i32* %37)
store i32 %38, i32* %10
store i32 0, i32* %13
br label %39
39: ; preds = %47, %35
br i1 false, label %40, label %50
40: ; preds = %39
%41 = load i32, i32* @stderr
%42 = load i32, i32* %13
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 %43
%45 = load double, double* %44
%46 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %45)
br label %47
47: ; preds = %40
%48 = load i32, i32* %13
%49 = add nsw i32 %48, 1
store i32 %49, i32* %13
br label %39
50: ; preds = %39
%51 = load i32, i32* %10
%52 = load double, double* %5
%53 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 0
%54 = call i32 @calclike(i32 %51, double %52, double* %53)
store i32 0, i32* %14
br label %55
55: ; preds = %63, %50
br i1 false, label %56, label %66
56: ; preds = %55
%57 = load i32, i32* @stderr
%58 = load i32, i32* %14
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 %59
%61 = load double, double* %60
%62 = call i32 @fprintf(i32 %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %61)
br label %63
63: ; preds = %56
%64 = load i32, i32* %14
%65 = add nsw i32 %64, 1
store i32 %65, i32* %14
br label %55
66: ; preds = %55
br label %67
67: ; preds = %66
%68 = load i32, i32* %9
%69 = add nsw i32 %68, 1
store i32 %69, i32* %9
br label %31
70: ; preds = %31
%71 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 0
%72 = load double, double* %71
store double %72, double* %15
store i32 1, i32* %16
br label %73
73: ; preds = %89, %70
%74 = load i32, i32* %16
%75 = icmp slt i32 %74, 10
br i1 %75, label %76, label %92
76: ; preds = %73
%77 = load i32, i32* %16
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 %78
%80 = load double, double* %79
%81 = load double, double* %15
%82 = fcmp ogt double %80, %81
br i1 %82, label %83, label %88
83: ; preds = %76
%84 = load i32, i32* %16
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 %85
%87 = load double, double* %86
store double %87, double* %15
br label %88
88: ; preds = %83, %76
br label %89
89: ; preds = %88
%90 = load i32, i32* %16
%91 = add nsw i32 %90, 1
store i32 %91, i32* %16
br label %73
92: ; preds = %73
store i32 0, i32* %17
br label %93
93: ; preds = %103, %92
%94 = load i32, i32* %17
%95 = icmp slt i32 %94, 10
br i1 %95, label %96, label %106
96: ; preds = %93
%97 = load double, double* %15
%98 = load i32, i32* %17
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 %99
%101 = load double, double* %100
%102 = fsub double %101, %97
store double %102, double* %100
br label %103
103: ; preds = %96
%104 = load i32, i32* %17
%105 = add nsw i32 %104, 1
store i32 %105, i32* %17
br label %93
106: ; preds = %93
%107 = load i32, i32* %8
%108 = getelementptr inbounds [10 x double], [10 x double]* %12, i64 0, i64 0
%109 = call i32 @gzwrite(i32 %107, double* %108, i32 80)
%110 = load i32, i32* %11
ret i32 %110
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @print_ind_site(double %0, double %1, i32* %2, i32 %3) {
%5 = alloca [10 x double]
%6 = bitcast [10 x double]* %5 to i8*
%7 = tail call i32 @Poisson(double %1)
%8 = getelementptr inbounds [10 x double], [10 x double]* %5, i64 0, i64 0
%9 = bitcast [10 x double]* %5 to <2 x double>*
store <2 x double> <double -0.000000e+00, double -0.000000e+00>, <2 x double>* %9
%10 = getelementptr inbounds [10 x double], [10 x double]* %5, i64 0, i64 2
%11 = bitcast double* %10 to <2 x double>*
store <2 x double> <double -0.000000e+00, double -0.000000e+00>, <2 x double>* %11
%12 = getelementptr inbounds [10 x double], [10 x double]* %5, i64 0, i64 4
%13 = bitcast double* %12 to <2 x double>*
store <2 x double> <double -0.000000e+00, double -0.000000e+00>, <2 x double>* %13
%14 = getelementptr inbounds [10 x double], [10 x double]* %5, i64 0, i64 6
%15 = bitcast double* %14 to <2 x double>*
store <2 x double> <double -0.000000e+00, double -0.000000e+00>, <2 x double>* %15
%16 = getelementptr inbounds [10 x double], [10 x double]* %5, i64 0, i64 8
%17 = bitcast double* %16 to <2 x double>*
store <2 x double> <double -0.000000e+00, double -0.000000e+00>, <2 x double>* %17
%18 = icmp sgt i32 %7, 0
br i1 %18, label %19, label %36
19: ; preds = %4, %19
%20 = phi i32 [ %23, %19 ], [ 0, %4 ]
%21 = call i32 @pick_a_base(double %0, i32* %2)
%22 = call i32 @calclike(i32 %21, double %0, double* %8)
%23 = add nuw nsw i32 %20, 1
%24 = icmp eq i32 %23, %7
br i1 %24, label %25, label %19
25: ; preds = %19
%26 = bitcast [10 x double]* %5 to <2 x double>*
%27 = load <2 x double>, <2 x double>* %26
%28 = bitcast double* %10 to <2 x double>*
%29 = load <2 x double>, <2 x double>* %28
%30 = bitcast double* %12 to <2 x double>*
%31 = load <2 x double>, <2 x double>* %30
%32 = bitcast double* %14 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = bitcast double* %16 to <2 x double>*
%35 = load <2 x double>, <2 x double>* %34
br label %36
36: ; preds = %25, %4
%37 = phi <2 x double> [ %27, %25 ], [ <double -0.000000e+00, double -0.000000e+00>, %4 ]
%38 = phi <2 x double> [ %29, %25 ], [ <double -0.000000e+00, double -0.000000e+00>, %4 ]
%39 = phi <2 x double> [ %31, %25 ], [ <double -0.000000e+00, double -0.000000e+00>, %4 ]
%40 = phi <2 x double> [ %33, %25 ], [ <double -0.000000e+00, double -0.000000e+00>, %4 ]
%41 = phi <2 x double> [ %35, %25 ], [ <double -0.000000e+00, double -0.000000e+00>, %4 ]
%42 = extractelement <2 x double> %37, i64 0
%43 = extractelement <2 x double> %37, i64 1
%44 = fcmp ogt double %43, %42
%45 = select i1 %44, double %43, double %42
%46 = extractelement <2 x double> %38, i64 0
%47 = fcmp ogt double %46, %45
%48 = select i1 %47, double %46, double %45
%49 = extractelement <2 x double> %38, i64 1
%50 = fcmp ogt double %49, %48
%51 = select i1 %50, double %49, double %48
%52 = extractelement <2 x double> %39, i64 0
%53 = fcmp ogt double %52, %51
%54 = select i1 %53, double %52, double %51
%55 = extractelement <2 x double> %39, i64 1
%56 = fcmp ogt double %55, %54
%57 = select i1 %56, double %55, double %54
%58 = extractelement <2 x double> %40, i64 0
%59 = fcmp ogt double %58, %57
%60 = select i1 %59, double %58, double %57
%61 = extractelement <2 x double> %40, i64 1
%62 = fcmp ogt double %61, %60
%63 = select i1 %62, double %61, double %60
%64 = extractelement <2 x double> %41, i64 0
%65 = fcmp ogt double %64, %63
%66 = select i1 %65, double %64, double %63
%67 = extractelement <2 x double> %41, i64 1
%68 = fcmp ogt double %67, %66
%69 = select i1 %68, double %67, double %66
%70 = insertelement <2 x double> poison, double %69, i64 0
%71 = shufflevector <2 x double> %70, <2 x double> poison, <2 x i32> zeroinitializer
%72 = fsub <2 x double> %37, %71
%73 = bitcast [10 x double]* %5 to <2 x double>*
store <2 x double> %72, <2 x double>* %73
%74 = fsub <2 x double> %38, %71
%75 = bitcast double* %10 to <2 x double>*
store <2 x double> %74, <2 x double>* %75
%76 = fsub <2 x double> %39, %71
%77 = bitcast double* %12 to <2 x double>*
store <2 x double> %76, <2 x double>* %77
%78 = fsub <2 x double> %40, %71
%79 = bitcast double* %14 to <2 x double>*
store <2 x double> %78, <2 x double>* %79
%80 = fsub <2 x double> %41, %71
%81 = bitcast double* %16 to <2 x double>*
store <2 x double> %80, <2 x double>* %81
%82 = call i32 @gzwrite(i32 %3, double* %8, i32 80)
ret i32 %7
}