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

/* Variables and functions */
int /*<<< orphan*/ output_vcf_row(int /*<<< orphan*/ *, char *, int, int,
                                  char *);
void output_vcf_snps(FILE *vcf_file_pointer, char **bases_for_snps,
                     int *snp_locations, int number_of_snps,
                     int number_of_samples, char pseudo_reference_sequence[]) {
  int i;
  for (i = 0; i < number_of_snps; i++) {
    output_vcf_row(vcf_file_pointer, bases_for_snps[i], snp_locations[i],
                   number_of_samples, pseudo_reference_sequence);
  }
}


x86 assembly (clang, -O0):
<output_vcf_snps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1177 <output_vcf_snps+0x67>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x20(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   1030 <output_vcf_row@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1136 <output_vcf_snps+0x26>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_vcf_snps>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %ecx,%ecx
jle    1161 <output_vcf_snps+0x51>
mov    %r9,%r15
mov    %r8d,%r12d
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %ecx,%eax
mov    %rax,(%rsp)
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%r14,8),%rsi
mov    0x0(%r13,%r14,4),%edx
mov    %rbp,%rdi
mov    %r12d,%ecx
mov    %r15,%r8
call   1030 <output_vcf_row@plt>
add    $0x1,%r14
cmp    %r14,(%rsp)
jne    1140 <output_vcf_snps+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @output_vcf_snps(i32* %0, i8** %1, i32* %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca i32*
%8 = alloca i8**
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
store i32* %0, i32** %7
store i8** %1, i8*** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
store i32 0, i32* %13
br label %14
14: ; preds = %33, %6
%15 = load i32, i32* %13
%16 = load i32, i32* %10
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %36
18: ; preds = %14
%19 = load i32*, i32** %7
%20 = load i8**, i8*** %8
%21 = load i32, i32* %13
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = load i32*, i32** %9
%26 = load i32, i32* %13
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
%29 = load i32, i32* %28
%30 = load i32, i32* %11
%31 = load i8*, i8** %12
%32 = call i32 @output_vcf_row(i32* %19, i8* %24, i32 %29, i32 %30, i8* %31)
br label %33
33: ; preds = %18
%34 = load i32, i32* %13
%35 = add nsw i32 %34, 1
store i32 %35, i32* %13
br label %14
36: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @output_vcf_snps(i32* %0, i8** nocapture %1, i32* nocapture %2, i32 %3, i32 %4, i8* %5) {
%7 = icmp sgt i32 %3, 0
br i1 %7, label %8, label %19
8: ; preds = %6
%9 = zext i32 %3 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %17, %10 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i32, i32* %2, i64 %11
%15 = load i32, i32* %14
%16 = tail call i32 @output_vcf_row(i32* %0, i8* %13, i32 %15, i32 %4, i8* %5)
%17 = add nuw nsw i64 %11, 1
%18 = icmp eq i64 %17, %9
br i1 %18, label %19, label %10
19: ; preds = %10, %6
ret void
}