#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*/ create_tree_statistics_file(char *, int /*<<< orphan*/,
                                               int /*<<< orphan*/);
int /*<<< orphan*/ extract_sequences(char *, char *, char *, int, char *, int,
                                     int);
int /*<<< orphan*/ freeup_memory();
int /*<<< orphan*/ get_sample_statistics();
int /*<<< orphan*/ load_sequences_from_multifasta_file(char *);
int /*<<< orphan*/ number_of_samples_from_parse_phylip();
void run_gubbins(char vcf_filename[], char tree_filename[],
                 char multi_fasta_filename[], int min_snps,
                 char original_multi_fasta_filename[], int window_min,
                 int window_max) {
  load_sequences_from_multifasta_file(multi_fasta_filename);
  extract_sequences(vcf_filename, tree_filename, multi_fasta_filename, min_snps,
                    original_multi_fasta_filename, window_min, window_max);
  create_tree_statistics_file(tree_filename, get_sample_statistics(),
                              number_of_samples_from_parse_phylip());
  freeup_memory();
}


x86 assembly (clang, -O0):
<run_gubbins>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <load_sequences_from_multifasta_file@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1070 <extract_sequences@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   1060 <get_sample_statistics@plt>
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1050 <number_of_samples_from_parse_phylip@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%esi
mov    %eax,%edx
call   1030 <create_tree_statistics_file@plt>
mov    $0x0,%al
call   1080 <freeup_memory@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_gubbins>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,0x14(%rsp)
mov    %r8,%r15
mov    %ecx,%r12d
mov    %rdx,%rbp
mov    %rsi,%r13
mov    %rdi,%rbx
mov    0x50(%rsp),%r14d
mov    %rdx,%rdi
call   1040 <load_sequences_from_multifasta_file@plt>
mov    %r14d,(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r12d,%ecx
mov    %r15,%r8
mov    0x14(%rsp),%r9d
call   1070 <extract_sequences@plt>
xor    %eax,%eax
call   1060 <get_sample_statistics@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <number_of_samples_from_parse_phylip@plt>
mov    %r13,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <create_tree_statistics_file@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <freeup_memory@plt>

LLVM IR (-O0):
define void @run_gubbins(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i8*, i8** %10
%16 = call i32 @load_sequences_from_multifasta_file(i8* %15)
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = load i8*, i8** %10
%20 = load i32, i32* %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = call i32 @extract_sequences(i8* %17, i8* %18, i8* %19, i32 %20, i8* %21, i32 %22, i32 %23)
%25 = load i8*, i8** %9
%26 = call i32 (...) @get_sample_statistics()
%27 = call i32 (...) @number_of_samples_from_parse_phylip()
%28 = call i32 @create_tree_statistics_file(i8* %25, i32 %26, i32 %27)
%29 = call i32 (...) @freeup_memory()
ret void
}

LLVM IR (-O2):
define void @run_gubbins(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5, i32 %6) {
%8 = tail call i32 @load_sequences_from_multifasta_file(i8* %2)
%9 = tail call i32 @extract_sequences(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5, i32 %6)
%10 = tail call i32 (...) @get_sample_statistics()
%11 = tail call i32 (...) @number_of_samples_from_parse_phylip()
%12 = tail call i32 @create_tree_statistics_file(i8* %1, i32 %10, i32 %11)
%13 = tail call i32 (...) @freeup_memory()
ret void
}