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

/* Variables and functions */
int /*<<< orphan*/ LocusHistory(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                long double **, long double **, long,
                                long double, long, long *, long *, long *,
                                long *);
long LocusHistoryInit(int /*<<< orphan*/ *, long double **, long double **);
long double **calloc(long, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ free(long double **);
int /*<<< orphan*/ init_genrand(long);
int /*<<< orphan*/ printf(char *, ...);
long time(int /*<<< orphan*/ *);
int main(void) {
  long i, k, seed, switches, node[6], alleles[7], AllNum[7], a162[7];
  long double s, R, (*poissonTrans)[300L + 1], (*gaussTrans)[1500L + 1];
  FILE *fout;
  if ((fout = fopen("/dev/null", "w")) == NULL)
    goto quit;
  FILE *fout1;
  if ((fout1 = fopen("PositiveSelectionSimulationF07.out", "w")) == NULL)
    goto quit;
  if ((poissonTrans = calloc((100L + 1) * (300L + 1), sizeof(long double))) ==
      NULL) {
    fprintf(fout, " No memory-1! ");
    goto quit;
  }
  if ((gaussTrans = calloc((100000L - 100L + 1) * (1500L + 1),
                           sizeof(long double))) == NULL) {
    fprintf(fout, " No memory-2! ");
    goto quit;
  }
  printf(" zapolnyayu figushki!\n");
  i = LocusHistoryInit(fout, poissonTrans, gaussTrans);
  if (i == -1)
    goto quit;
  printf(" zapolnila figushki!\n");
  node[0] = -53800000;
  node[1] = -12100000;
  node[2] = -10700000;
  node[3] = -7200000;
  node[4] = -1400000;
  node[5] = -700000;
  time_t seconds;
  seconds = time(NULL);
  seed = seconds;
  init_genrand(seed);
  for (i = 0; i != 100; i++) {
    for (k = 0; k != 1; k++) {
      if (k == 0)
        s = -0.01;
      else
        s = -0.1;
      if (k <= 3)
        switches = -1;
      else
        switches = 200000000;
      printf(" %12ld %10ld %11.9f %5ld %10ld %10.8f %10ld\n", 70000000L,
             100000L, 0.0000001, i, seed, (float)s, switches);
      fprintf(fout, " %12ld %10ld %11.9f %5ld %10ld %10.8f %10ld\n", 70000000L,
              100000L, 0.0000001, i, seed, (float)s, switches);
      fprintf(fout1, "%12ld\t%10ld\t%11.9f\t%5ld\t%10ld\t%10.8f\t%10ld\t",
              70000000L, 100000L, 0.0000001, i, seed, (float)s, switches);
      LocusHistory(fout, fout1, poissonTrans, gaussTrans, seed, s, switches,
                   node, alleles, AllNum, a162);
      fprintf(fout1, "\t%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t", AllNum[0],
              AllNum[1], AllNum[2], AllNum[3], AllNum[4], AllNum[5], AllNum[6]);
      fprintf(fout1, "%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t", alleles[0],
              alleles[1], alleles[2], alleles[3], alleles[4], alleles[5],
              alleles[6]);
      fprintf(fout1, "%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t%7ld\t%7ld\n", a162[0],
              a162[1], a162[2], a162[3], a162[4], a162[5], a162[6]);
    }
  }
quit:
  fclose(fout);
  fclose(fout1);
  free(poissonTrans);
  free(gaussTrans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x1d0,%rsp
movl   $0x0,-0x14(%rbp)
lea    0xe5c(%rip),%rdi
lea    0xe5f(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x168(%rbp)
cmp    $0x0,%rax
jne    11de <main+0x3e>
jmp    1622 <main+0x482>
lea    0xe3f(%rip),%rdi
lea    0xe36(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x170(%rbp)
cmp    $0x0,%rax
jne    1207 <main+0x67>
jmp    1622 <main+0x482>
mov    $0x76c1,%edi
mov    $0x10,%esi
call   1070 <calloc@plt>
mov    %rax,-0x158(%rbp)
cmp    $0x0,%rax
jne    1241 <main+0xa1>
mov    -0x168(%rbp),%rdi
lea    0xe12(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1622 <main+0x482>
mov    $0x8f013a9,%edi
mov    $0x10,%esi
call   1070 <calloc@plt>
mov    %rax,-0x160(%rbp)
cmp    $0x0,%rax
jne    127b <main+0xdb>
mov    -0x168(%rbp),%rdi
lea    0xde7(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    1622 <main+0x482>
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x168(%rbp),%rdi
mov    -0x158(%rbp),%rsi
mov    -0x160(%rbp),%rdx
call   1060 <LocusHistoryInit@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0xffffffffffffffff,-0x20(%rbp)
jne    12b7 <main+0x117>
jmp    1622 <main+0x482>
lea    0xdbe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movq   $0xfffffffffccb13c0,-0x70(%rbp)
fc
movq   $0xffffffffff475e60,-0x68(%rbp)
ff
movq   $0xffffffffff5cbb20,-0x60(%rbp)
ff
movq   $0xffffffffff922300,-0x58(%rbp)
ff
movq   $0xffffffffffeaa340,-0x50(%rbp)
ff
movq   $0xfffffffffff551a0,-0x48(%rbp)
ff
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %rax,-0x178(%rbp)
mov    -0x178(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   10c0 <init_genrand@plt>
movq   $0x0,-0x20(%rbp)
cmpq   $0x64,-0x20(%rbp)
je     161d <main+0x47d>
movq   $0x0,-0x28(%rbp)
cmpq   $0x1,-0x28(%rbp)
je     1607 <main+0x467>
cmpq   $0x0,-0x28(%rbp)
jne    135b <main+0x1bb>
fldl   0xcb8(%rip)
fstpt  -0x140(%rbp)
jmp    1367 <main+0x1c7>
fldl   0xc9f(%rip)
fstpt  -0x140(%rbp)
cmpq   $0x3,-0x28(%rbp)
jg     137f <main+0x1df>
movq   $0xffffffffffffffff,-0x38(%rbp)
ff
jmp    1387 <main+0x1e7>
movq   $0xbebc200,-0x38(%rbp)
0b
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
fldt   -0x140(%rbp)
fstps  -0x17c(%rbp)
movss  -0x17c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
mov    -0x38(%rbp),%r9
lea    0xce0(%rip),%rdi
mov    %rdi,-0x1a8(%rbp)
mov    $0x42c1d80,%esi
mov    %rsi,-0x1a0(%rbp)
mov    $0x186a0,%edx
mov    %rdx,-0x198(%rbp)
movsd  0xc37(%rip),%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
mov    $0x2,%al
mov    %al,-0x185(%rbp)
call   1050 <printf@plt>
mov    -0x1a8(%rbp),%rsi
mov    -0x1a0(%rbp),%rdx
mov    -0x198(%rbp),%rcx
movsd  -0x190(%rbp),%xmm0
ff
mov    -0x185(%rbp),%al
mov    -0x168(%rbp),%rdi
mov    -0x20(%rbp),%r8
mov    -0x30(%rbp),%r9
fldt   -0x140(%rbp)
fstps  -0x180(%rbp)
movss  -0x180(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
mov    -0x38(%rbp),%r11
mov    %rsp,%r10
mov    %r11,(%r10)
call   1080 <fprintf@plt>
mov    -0x1a0(%rbp),%rdx
mov    -0x198(%rbp),%rcx
movsd  -0x190(%rbp),%xmm0
ff
mov    -0x185(%rbp),%al
mov    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%r8
mov    -0x30(%rbp),%r9
fldt   -0x140(%rbp)
fstps  -0x184(%rbp)
movss  -0x184(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
mov    -0x38(%rbp),%r10
mov    %rsp,%rsi
mov    %r10,(%rsi)
lea    0xc24(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x168(%rbp),%rdi
mov    -0x170(%rbp),%rsi
mov    -0x158(%rbp),%rdx
mov    -0x160(%rbp),%rcx
mov    -0x30(%rbp),%r8
fldt   -0x140(%rbp)
mov    -0x38(%rbp),%r9
lea    -0x70(%rbp),%r10
lea    -0xb0(%rbp),%r11
lea    -0xf0(%rbp),%rbx
lea    -0x130(%rbp),%r14
mov    %rsp,%rax
mov    %r14,0x28(%rax)
mov    %rbx,0x20(%rax)
mov    %r11,0x18(%rax)
mov    %r10,0x10(%rax)
fstpt  (%rax)
call   10a0 <LocusHistory@plt>
mov    -0x170(%rbp),%rdi
mov    -0xf0(%rbp),%rdx
mov    -0xe8(%rbp),%rcx
mov    -0xe0(%rbp),%r8
mov    -0xd8(%rbp),%r9
mov    -0xd0(%rbp),%r11
mov    -0xc8(%rbp),%r10
mov    -0xc0(%rbp),%rax
lea    0xbaf(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x170(%rbp),%rdi
mov    -0xb0(%rbp),%rdx
mov    -0xa8(%rbp),%rcx
mov    -0xa0(%rbp),%r8
mov    -0x98(%rbp),%r9
mov    -0x90(%rbp),%r11
mov    -0x88(%rbp),%r10
mov    -0x80(%rbp),%rax
lea    0xb5f(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x170(%rbp),%rdi
mov    -0x130(%rbp),%rdx
mov    -0x128(%rbp),%rcx
mov    -0x120(%rbp),%r8
mov    -0x118(%rbp),%r9
mov    -0x110(%rbp),%r11
mov    -0x108(%rbp),%r10
mov    -0x100(%rbp),%rax
lea    0xb2f(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1334 <main+0x194>
jmp    160c <main+0x46c>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1321 <main+0x181>
jmp    1622 <main+0x482>
mov    -0x168(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x170(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x158(%rbp),%rdi
call   1030 <free@plt>
mov    -0x160(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
lea    0xe70(%rip),%rdi
lea    0xe73(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
je     14a8 <main+0x2e8>
lea    0xe5d(%rip),%rdi
lea    0xe54(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     14aa <main+0x2ea>
mov    %rax,%r13
mov    $0x76c1,%edi
mov    $0x10,%esi
call   1080 <calloc@plt>
test   %rax,%rax
je     14af <main+0x2ef>
mov    %rax,%rbx
mov    $0x8f013a9,%edi
mov    $0x10,%esi
call   1080 <calloc@plt>
test   %rax,%rax
je     14ba <main+0x2fa>
mov    %rax,%r12
lea    0xeeb(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1070 <LocusHistoryInit@plt>
cmp    $0xffffffffffffffff,%rax
je     14d6 <main+0x316>
lea    0xedd(%rip),%rdi
call   1040 <puts@plt>
movaps 0xd84(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xd85(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xd86(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
xor    %edi,%edi
call   10a0 <time@plt>
mov    %rbx,0x38(%rsp)
mov    %rax,%rbx
mov    %rax,%rdi
call   10d0 <init_genrand@plt>
lea    0xdd5(%rip),%rbp
fldl   0xd7a(%rip)
fstpt  0x44(%rsp)
xor    %r15d,%r15d
nopl   (%rax)
mov    $0x42c1d80,%esi
mov    $0x186a0,%edx
mov    %rbp,%rdi
movsd  0xd4b(%rip),%xmm0
mov    %r15,%rcx
mov    %rbx,%r8
movsd  0xd45(%rip),%xmm1
mov    $0xffffffffffffffff,%r9
mov    $0x2,%al
call   1060 <printf@plt>
movq   $0xffffffffffffffff,(%rsp)
ff
mov    $0x42c1d80,%edx
mov    $0x186a0,%ecx
mov    %r14,%rdi
mov    %rbp,%rsi
movsd  0xd0f(%rip),%xmm0
mov    %r15,%r8
mov    %rbx,%r9
movsd  0xd09(%rip),%xmm1
mov    $0x2,%al
call   1090 <fprintf@plt>
movq   $0xffffffffffffffff,(%rsp)
ff
mov    $0x42c1d80,%edx
mov    $0x186a0,%ecx
mov    %r13,%rdi
lea    0xd70(%rip),%rsi
movsd  0xcd6(%rip),%xmm0
mov    %r15,%r8
mov    %rbx,%r9
movsd  0xcd0(%rip),%xmm1
mov    $0x2,%al
call   1090 <fprintf@plt>
lea    0x50(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0x90(%rsp),%rax
mov    %rax,0x20(%rsp)
lea    0xd0(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x110(%rsp),%rax
mov    %rax,0x10(%rsp)
fldt   0x44(%rsp)
fstpt  (%rsp)
mov    %r14,%rdi
mov    %r13,%rsi
mov    0x38(%rsp),%rdx
mov    %r12,%rcx
mov    %rbx,%r8
mov    $0xffffffffffffffff,%r9
call   10b0 <LocusHistory@plt>
mov    0x90(%rsp),%rdx
mov    0x98(%rsp),%rcx
mov    0xa0(%rsp),%r8
mov    0xa8(%rsp),%r9
movaps 0xb0(%rsp),%xmm0
mov    0xc0(%rsp),%rax
mov    %rax,0x10(%rsp)
movups %xmm0,(%rsp)
mov    %r13,%rdi
lea    0xce7(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0xd0(%rsp),%rdx
mov    0xd8(%rsp),%rcx
mov    0xe0(%rsp),%r8
mov    0xe8(%rsp),%r9
movaps 0xf0(%rsp),%xmm0
mov    0x100(%rsp),%rax
mov    %rax,0x10(%rsp)
movups %xmm0,(%rsp)
mov    %r13,%rdi
lea    0xc9e(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x50(%rsp),%rdx
mov    0x58(%rsp),%rcx
mov    0x60(%rsp),%r8
mov    0x68(%rsp),%r9
movaps 0x70(%rsp),%xmm0
mov    0x80(%rsp),%rax
mov    %rax,0x10(%rsp)
movups %xmm0,(%rsp)
mov    %r13,%rdi
lea    0xc87(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x1,%r15
cmp    $0x64,%r15
jne    12d0 <main+0x110>
mov    0x38(%rsp),%rbx
jmp    14d6 <main+0x316>
jmp    14d6 <main+0x316>
xor    %r13d,%r13d
jmp    14d6 <main+0x316>
lea    0xbc1(%rip),%rdi
xor    %ebx,%ebx
jmp    14c1 <main+0x301>
lea    0xbc5(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10e0 <fwrite@plt>
xor    %r12d,%r12d
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    %r13,%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [35 x i8] c"PositiveSelectionSimulationF07.out\00"
@.str.3 = [15 x i8] c" No memory-1! \00"
@.str.4 = [15 x i8] c" No memory-2! \00"
@.str.5 = [23 x i8] c" zapolnyayu figushki!\0A\00"
@.str.6 = [22 x i8] c" zapolnila figushki!\0A\00"
@.str.7 = [45 x i8] c" %12ld %10ld %11.9f %5ld %10ld %10.8f %10ld\0A\00"
@.str.8 = [44 x i8] c"%12ld\09%10ld\09%11.9f\09%5ld\09%10ld\09%10.8f\09%10ld\09\00"
@.str.9 = [37 x i8] c"\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09\00"
@.str.10 = [36 x i8] c"%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09\00"
@.str.11 = [36 x i8] c"%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca [6 x i64]
%7 = alloca [7 x i64]
%8 = alloca [7 x i64]
%9 = alloca [7 x i64]
%10 = alloca x86_fp80
%11 = alloca x86_fp80
%12 = alloca [301 x x86_fp80]*
%13 = alloca [1501 x x86_fp80]*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i64
store i32 0, i32* %1
%17 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %17, i32** %14
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %20
19: ; preds = %0
br label %172
20: ; preds = %0
%21 = call i32* @fopen(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %15
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %24
23: ; preds = %20
br label %172
24: ; preds = %20
%25 = call x86_fp80** @calloc(i64 30401, i32 16)
%26 = bitcast x86_fp80** %25 to [301 x x86_fp80]*
store [301 x x86_fp80]* %26, [301 x x86_fp80]** %12
%27 = icmp eq [301 x x86_fp80]* %26, null
br i1 %27, label %28, label %31
28: ; preds = %24
%29 = load i32*, i32** %14
%30 = call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %172
31: ; preds = %24
%32 = call x86_fp80** @calloc(i64 149951401, i32 16)
%33 = bitcast x86_fp80** %32 to [1501 x x86_fp80]*
store [1501 x x86_fp80]* %33, [1501 x x86_fp80]** %13
%34 = icmp eq [1501 x x86_fp80]* %33, null
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = load i32*, i32** %14
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %172
38: ; preds = %31
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%40 = load i32*, i32** %14
%41 = load [301 x x86_fp80]*, [301 x x86_fp80]** %12
%42 = bitcast [301 x x86_fp80]* %41 to x86_fp80**
%43 = load [1501 x x86_fp80]*, [1501 x x86_fp80]** %13
%44 = bitcast [1501 x x86_fp80]* %43 to x86_fp80**
%45 = call i64 @LocusHistoryInit(i32* %40, x86_fp80** %42, x86_fp80** %44)
store i64 %45, i64* %2
%46 = load i64, i64* %2
%47 = icmp eq i64 %46, -1
br i1 %47, label %48, label %49
48: ; preds = %38
br label %172
49: ; preds = %38
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%51 = getelementptr inbounds [6 x i64], [6 x i64]* %6, i64 0, i64 0
store i64 -53800000, i64* %51
%52 = getelementptr inbounds [6 x i64], [6 x i64]* %6, i64 0, i64 1
store i64 -12100000, i64* %52
%53 = getelementptr inbounds [6 x i64], [6 x i64]* %6, i64 0, i64 2
store i64 -10700000, i64* %53
%54 = getelementptr inbounds [6 x i64], [6 x i64]* %6, i64 0, i64 3
store i64 -7200000, i64* %54
%55 = getelementptr inbounds [6 x i64], [6 x i64]* %6, i64 0, i64 4
store i64 -1400000, i64* %55
%56 = getelementptr inbounds [6 x i64], [6 x i64]* %6, i64 0, i64 5
store i64 -700000, i64* %56
%57 = call i64 @time(i32* null)
store i64 %57, i64* %16
%58 = load i64, i64* %16
store i64 %58, i64* %4
%59 = load i64, i64* %4
%60 = call i32 @init_genrand(i64 %59)
store i64 0, i64* %2
br label %61
61: ; preds = %168, %49
%62 = load i64, i64* %2
%63 = icmp ne i64 %62, 100
br i1 %63, label %64, label %171
64: ; preds = %61
store i64 0, i64* %3
br label %65
65: ; preds = %164, %64
%66 = load i64, i64* %3
%67 = icmp ne i64 %66, 1
br i1 %67, label %68, label %167
68: ; preds = %65
%69 = load i64, i64* %3
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %72
71: ; preds = %68
store x86_fp80 0xKBFF8A3D70A3D70A3D800, x86_fp80* %10
br label %73
72: ; preds = %68
store x86_fp80 0xKBFFBCCCCCCCCCCCCD000, x86_fp80* %10
br label %73
73: ; preds = %72, %71
%74 = load i64, i64* %3
%75 = icmp sle i64 %74, 3
br i1 %75, label %76, label %77
76: ; preds = %73
store i64 -1, i64* %5
br label %78
77: ; preds = %73
store i64 200000000, i64* %5
br label %78
78: ; preds = %77, %76
%79 = load i64, i64* %2
%80 = load i64, i64* %4
%81 = load x86_fp80, x86_fp80* %10
%82 = fptrunc x86_fp80 %81 to float
%83 = fpext float %82 to double
%84 = load i64, i64* %5
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 70000000, i64 100000, double 0x3E7AD7F29ABCAF48, i64 %79, i64 %80, double %83, i64 %84)
%86 = load i32*, i32** %14
%87 = load i64, i64* %2
%88 = load i64, i64* %4
%89 = load x86_fp80, x86_fp80* %10
%90 = fptrunc x86_fp80 %89 to float
%91 = fpext float %90 to double
%92 = load i64, i64* %5
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 70000000, i64 100000, double 0x3E7AD7F29ABCAF48, i64 %87, i64 %88, double %91, i64 %92)
%94 = load i32*, i32** %15
%95 = load i64, i64* %2
%96 = load i64, i64* %4
%97 = load x86_fp80, x86_fp80* %10
%98 = fptrunc x86_fp80 %97 to float
%99 = fpext float %98 to double
%100 = load i64, i64* %5
%101 = call i32 (i32*, i8*, ...) @fprintf(i32* %94, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i64 70000000, i64 100000, double 0x3E7AD7F29ABCAF48, i64 %95, i64 %96, double %99, i64 %100)
%102 = load i32*, i32** %14
%103 = load i32*, i32** %15
%104 = load [301 x x86_fp80]*, [301 x x86_fp80]** %12
%105 = bitcast [301 x x86_fp80]* %104 to x86_fp80**
%106 = load [1501 x x86_fp80]*, [1501 x x86_fp80]** %13
%107 = bitcast [1501 x x86_fp80]* %106 to x86_fp80**
%108 = load i64, i64* %4
%109 = load x86_fp80, x86_fp80* %10
%110 = load i64, i64* %5
%111 = getelementptr inbounds [6 x i64], [6 x i64]* %6, i64 0, i64 0
%112 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 0
%113 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 0
%114 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 0
%115 = call i32 @LocusHistory(i32* %102, i32* %103, x86_fp80** %105, x86_fp80** %107, i64 %108, x86_fp80 %109, i64 %110, i64* %111, i64* %112, i64* %113, i64* %114)
%116 = load i32*, i32** %15
%117 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 0
%118 = load i64, i64* %117
%119 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 1
%120 = load i64, i64* %119
%121 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 2
%122 = load i64, i64* %121
%123 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 3
%124 = load i64, i64* %123
%125 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 4
%126 = load i64, i64* %125
%127 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 5
%128 = load i64, i64* %127
%129 = getelementptr inbounds [7 x i64], [7 x i64]* %8, i64 0, i64 6
%130 = load i64, i64* %129
%131 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i64 %118, i64 %120, i64 %122, i64 %124, i64 %126, i64 %128, i64 %130)
%132 = load i32*, i32** %15
%133 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 0
%134 = load i64, i64* %133
%135 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 1
%136 = load i64, i64* %135
%137 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 2
%138 = load i64, i64* %137
%139 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 3
%140 = load i64, i64* %139
%141 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 4
%142 = load i64, i64* %141
%143 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 5
%144 = load i64, i64* %143
%145 = getelementptr inbounds [7 x i64], [7 x i64]* %7, i64 0, i64 6
%146 = load i64, i64* %145
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), i64 %134, i64 %136, i64 %138, i64 %140, i64 %142, i64 %144, i64 %146)
%148 = load i32*, i32** %15
%149 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 0
%150 = load i64, i64* %149
%151 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 1
%152 = load i64, i64* %151
%153 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 2
%154 = load i64, i64* %153
%155 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 3
%156 = load i64, i64* %155
%157 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 4
%158 = load i64, i64* %157
%159 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 5
%160 = load i64, i64* %159
%161 = getelementptr inbounds [7 x i64], [7 x i64]* %9, i64 0, i64 6
%162 = load i64, i64* %161
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %148, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i64 %150, i64 %152, i64 %154, i64 %156, i64 %158, i64 %160, i64 %162)
br label %164
164: ; preds = %78
%165 = load i64, i64* %3
%166 = add nsw i64 %165, 1
store i64 %166, i64* %3
br label %65
167: ; preds = %65
br label %168
168: ; preds = %167
%169 = load i64, i64* %2
%170 = add nsw i64 %169, 1
store i64 %170, i64* %2
br label %61
171: ; preds = %61
br label %172
172: ; preds = %171, %48, %35, %28, %23, %19
%173 = load i32*, i32** %14
%174 = call i32 @fclose(i32* %173)
%175 = load i32*, i32** %15
%176 = call i32 @fclose(i32* %175)
%177 = load [301 x x86_fp80]*, [301 x x86_fp80]** %12
%178 = bitcast [301 x x86_fp80]* %177 to x86_fp80**
%179 = call i32 @free(x86_fp80** %178)
%180 = load [1501 x x86_fp80]*, [1501 x x86_fp80]** %13
%181 = bitcast [1501 x x86_fp80]* %180 to x86_fp80**
%182 = call i32 @free(x86_fp80** %181)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/null\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [35 x i8] c"PositiveSelectionSimulationF07.out\00"
@.str.3 = [15 x i8] c" No memory-1! \00"
@.str.4 = [15 x i8] c" No memory-2! \00"
@.str.7 = [45 x i8] c" %12ld %10ld %11.9f %5ld %10ld %10.8f %10ld\0A\00"
@.str.8 = [44 x i8] c"%12ld\09%10ld\09%11.9f\09%5ld\09%10ld\09%10.8f\09%10ld\09\00"
@.str.9 = [37 x i8] c"\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09\00"
@.str.10 = [36 x i8] c"%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09\00"
@.str.11 = [36 x i8] c"%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\09%7ld\0A\00"
@str = [22 x i8] c" zapolnyayu figushki!\00"
@str.12 = [21 x i8] c" zapolnila figushki!\00"
define i32 @main() {
%1 = alloca [6 x i64]
%2 = alloca [7 x i64]
%3 = alloca [7 x i64]
%4 = alloca [7 x i64]
%5 = bitcast [6 x i64]* %1 to i8*
%6 = bitcast [7 x i64]* %2 to i8*
%7 = bitcast [7 x i64]* %3 to i8*
%8 = bitcast [7 x i64]* %4 to i8*
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %91, label %11
11: ; preds = %0
%12 = tail call i32* @fopen(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %91, label %14
14: ; preds = %11
%15 = tail call x86_fp80** @calloc(i64 30401, i32 16)
%16 = icmp eq x86_fp80** %15, null
br i1 %16, label %87, label %17
17: ; preds = %14
%18 = tail call x86_fp80** @calloc(i64 149951401, i32 16)
%19 = icmp eq x86_fp80** %18, null
br i1 %19, label %87, label %20
20: ; preds = %17
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%22 = tail call i64 @LocusHistoryInit(i32* %9, x86_fp80** %15, x86_fp80** %18)
%23 = icmp eq i64 %22, -1
br i1 %23, label %91, label %24
24: ; preds = %20
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.12, i64 0, i64 0))
%26 = getelementptr inbounds [6 x i64], [6 x i64]* %1, i64 0, i64 0
%27 = bitcast [6 x i64]* %1 to <2 x i64>*
store <2 x i64> <i64 -53800000, i64 -12100000>, <2 x i64>* %27
%28 = getelementptr inbounds [6 x i64], [6 x i64]* %1, i64 0, i64 2
%29 = bitcast i64* %28 to <2 x i64>*
store <2 x i64> <i64 -10700000, i64 -7200000>, <2 x i64>* %29
%30 = getelementptr inbounds [6 x i64], [6 x i64]* %1, i64 0, i64 4
%31 = bitcast i64* %30 to <2 x i64>*
store <2 x i64> <i64 -1400000, i64 -700000>, <2 x i64>* %31
%32 = tail call i64 @time(i32* null)
%33 = tail call i32 @init_genrand(i64 %32)
%34 = getelementptr inbounds [7 x i64], [7 x i64]* %2, i64 0, i64 0
%35 = getelementptr inbounds [7 x i64], [7 x i64]* %3, i64 0, i64 0
%36 = getelementptr inbounds [7 x i64], [7 x i64]* %4, i64 0, i64 0
%37 = getelementptr inbounds [7 x i64], [7 x i64]* %3, i64 0, i64 1
%38 = getelementptr inbounds [7 x i64], [7 x i64]* %3, i64 0, i64 2
%39 = getelementptr inbounds [7 x i64], [7 x i64]* %3, i64 0, i64 3
%40 = getelementptr inbounds [7 x i64], [7 x i64]* %3, i64 0, i64 4
%41 = getelementptr inbounds [7 x i64], [7 x i64]* %3, i64 0, i64 5
%42 = getelementptr inbounds [7 x i64], [7 x i64]* %3, i64 0, i64 6
%43 = getelementptr inbounds [7 x i64], [7 x i64]* %2, i64 0, i64 1
%44 = getelementptr inbounds [7 x i64], [7 x i64]* %2, i64 0, i64 2
%45 = getelementptr inbounds [7 x i64], [7 x i64]* %2, i64 0, i64 3
%46 = getelementptr inbounds [7 x i64], [7 x i64]* %2, i64 0, i64 4
%47 = getelementptr inbounds [7 x i64], [7 x i64]* %2, i64 0, i64 5
%48 = getelementptr inbounds [7 x i64], [7 x i64]* %2, i64 0, i64 6
%49 = getelementptr inbounds [7 x i64], [7 x i64]* %4, i64 0, i64 1
%50 = getelementptr inbounds [7 x i64], [7 x i64]* %4, i64 0, i64 2
%51 = getelementptr inbounds [7 x i64], [7 x i64]* %4, i64 0, i64 3
%52 = getelementptr inbounds [7 x i64], [7 x i64]* %4, i64 0, i64 4
%53 = getelementptr inbounds [7 x i64], [7 x i64]* %4, i64 0, i64 5
%54 = getelementptr inbounds [7 x i64], [7 x i64]* %4, i64 0, i64 6
br label %55
55: ; preds = %24, %55
%56 = phi i64 [ 0, %24 ], [ %85, %55 ]
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 70000000, i64 100000, double 0x3E7AD7F29ABCAF48, i64 %56, i64 %32, double 0xBF847AE140000000, i64 -1)
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 70000000, i64 100000, double 0x3E7AD7F29ABCAF48, i64 %56, i64 %32, double 0xBF847AE140000000, i64 -1)
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i64 70000000, i64 100000, double 0x3E7AD7F29ABCAF48, i64 %56, i64 %32, double 0xBF847AE140000000, i64 -1)
%60 = call i32 @LocusHistory(i32* %9, i32* %12, x86_fp80** %15, x86_fp80** %18, i64 %32, x86_fp80 0xKBFF8A3D70A3D70A3D800, i64 -1, i64* %26, i64* %34, i64* %35, i64* %36)
%61 = load i64, i64* %35
%62 = load i64, i64* %37
%63 = load i64, i64* %38
%64 = load i64, i64* %39
%65 = load i64, i64* %40
%66 = load i64, i64* %41
%67 = load i64, i64* %42
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i64 %61, i64 %62, i64 %63, i64 %64, i64 %65, i64 %66, i64 %67)
%69 = load i64, i64* %34
%70 = load i64, i64* %43
%71 = load i64, i64* %44
%72 = load i64, i64* %45
%73 = load i64, i64* %46
%74 = load i64, i64* %47
%75 = load i64, i64* %48
%76 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0), i64 %69, i64 %70, i64 %71, i64 %72, i64 %73, i64 %74, i64 %75)
%77 = load i64, i64* %36
%78 = load i64, i64* %49
%79 = load i64, i64* %50
%80 = load i64, i64* %51
%81 = load i64, i64* %52
%82 = load i64, i64* %53
%83 = load i64, i64* %54
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i64 %77, i64 %78, i64 %79, i64 %80, i64 %81, i64 %82, i64 %83)
%85 = add nuw nsw i64 %56, 1
%86 = icmp eq i64 %85, 100
br i1 %86, label %91, label %55
87: ; preds = %17, %14
%88 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), %14 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), %17 ]
%89 = phi x86_fp80** [ null, %14 ], [ %15, %17 ]
%90 = tail call i64 @fwrite(i8* %88, i64 14, i64 1, i32* %9)
br label %91
91: ; preds = %55, %87, %20, %11, %0
%92 = phi x86_fp80** [ undef, %0 ], [ undef, %11 ], [ %15, %20 ], [ %89, %87 ], [ %15, %55 ]
%93 = phi x86_fp80** [ undef, %0 ], [ undef, %11 ], [ %18, %20 ], [ null, %87 ], [ %18, %55 ]
%94 = phi i32* [ undef, %0 ], [ null, %11 ], [ %12, %20 ], [ %12, %87 ], [ %12, %55 ]
%95 = call i32 @fclose(i32* %9)
%96 = call i32 @fclose(i32* %94)
%97 = call i32 @free(x86_fp80** %92)
%98 = call i32 @free(x86_fp80** %93)
ret i32 0
}