#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*/ evolve1D(double *, double *, double *, int, int, int, int,
                            int, int);
int /*<<< orphan*/ printf(char *);
int burninPop(double *Pops, double *OutsidePop, double *AF, int burnin,
              int npop, int n1, int n2, int m1, int m2, int minf, int nSNP,
              int Ne) {
  int i;
  int Loss = 0;
  printf("Burnin...\n");
  for (i = 0; i < burnin; i++) {
    evolve1D(Pops, OutsidePop, AF, npop, nSNP, m1, minf, Ne, Loss);
  }
  return i;
}


x86 assembly (clang, -O0):
<burninPop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11b9 <burninPop+0x99>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%ecx
mov    0x30(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x28(%rbp),%r11d
mov    0x38(%rbp),%r10d
mov    -0x2c(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <evolve1D@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    116b <burninPop+0x4b>
mov    -0x28(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<burninPop>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r15d
mov    %ecx,%r13d
mov    %rdx,%r12
mov    %rsi,%rbp
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
test   %r13d,%r13d
jle    1199 <burninPop+0x79>
mov    0x48(%rsp),%r14d
mov    %r13d,0x4(%rsp)
cs nopw 0x0(%rax,%rax,1)
nop
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    0x68(%rsp),%r8d
mov    %r14d,%r9d
push   $0x0
mov    0x78(%rsp),%eax
push   %rax
mov    0x70(%rsp),%eax
push   %rax
call   1030 <evolve1D@plt>
add    $0x20,%rsp
add    $0xffffffff,%r13d
jne    1160 <burninPop+0x40>
mov    0x4(%rsp),%eax
jmp    119b <burninPop+0x7b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Burnin...\0A\00"
define i32 @burninPop(double* %0, double* %1, double* %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca i32
%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
store double* %0, double** %13
store double* %1, double** %14
store double* %2, double** %15
store i32 %3, i32* %16
store i32 %4, i32* %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32 %10, i32* %23
store i32 %11, i32* %24
store i32 0, i32* %26
%27 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %25
br label %28
28: ; preds = %43, %12
%29 = load i32, i32* %25
%30 = load i32, i32* %16
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %46
32: ; preds = %28
%33 = load double*, double** %13
%34 = load double*, double** %14
%35 = load double*, double** %15
%36 = load i32, i32* %17
%37 = load i32, i32* %23
%38 = load i32, i32* %20
%39 = load i32, i32* %22
%40 = load i32, i32* %24
%41 = load i32, i32* %26
%42 = call i32 @evolve1D(double* %33, double* %34, double* %35, i32 %36, i32 %37, i32 %38, i32 %39, i32 %40, i32 %41)
br label %43
43: ; preds = %32
%44 = load i32, i32* %25
%45 = add nsw i32 %44, 1
store i32 %45, i32* %25
br label %28
46: ; preds = %28
%47 = load i32, i32* %25
ret i32 %47
}

LLVM IR (-O2):
@str = [10 x i8] c"Burnin...\00"
define i32 @burninPop(double* %0, double* %1, double* %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11) {
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%14 = icmp sgt i32 %3, 0
br i1 %14, label %15, label %20
15: ; preds = %12, %15
%16 = phi i32 [ %18, %15 ], [ 0, %12 ]
%17 = tail call i32 @evolve1D(double* %0, double* %1, double* %2, i32 %4, i32 %10, i32 %7, i32 %9, i32 %11, i32 0)
%18 = add nuw nsw i32 %16, 1
%19 = icmp eq i32 %18, %3
br i1 %19, label %20, label %15
20: ; preds = %15, %12
%21 = phi i32 [ 0, %12 ], [ %3, %15 ]
ret i32 %21
}