#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, int *,
                                  int);
void output_vcf_snps(FILE *vcf_file_pointer, char **bases_for_snps,
                     int *snp_locations, int number_of_snps,
                     int number_of_samples, int internal_nodes[], int offset) {
  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, internal_nodes, offset);
  }
}


x86 assembly (clang, -O0):
<output_vcf_snps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
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    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    117e <output_vcf_snps+0x6e>
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
mov    0x10(%rbp),%r9d
call   1030 <output_vcf_row@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1139 <output_vcf_snps+0x29>
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    1166 <output_vcf_snps+0x56>
mov    %r9,%r15
mov    %r8d,%r12d
mov    %rdx,%rbp
mov    %rsi,%rbx
mov    %rdi,%r13
mov    %ecx,%eax
mov    %rax,(%rsp)
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%r14,8),%rsi
mov    0x0(%rbp,%r14,4),%edx
mov    %r13,%rdi
mov    %r12d,%ecx
mov    %r15,%r8
mov    0x40(%rsp),%r9d
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, i32* %5, i32 %6) {
%8 = alloca i32*
%9 = alloca i8**
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %8
store i8** %1, i8*** %9
store i32* %2, i32** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32* %5, i32** %13
store i32 %6, i32* %14
store i32 0, i32* %15
br label %16
16: ; preds = %36, %7
%17 = load i32, i32* %15
%18 = load i32, i32* %11
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %39
20: ; preds = %16
%21 = load i32*, i32** %8
%22 = load i8**, i8*** %9
%23 = load i32, i32* %15
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
%27 = load i32*, i32** %10
%28 = load i32, i32* %15
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %27, i64 %29
%31 = load i32, i32* %30
%32 = load i32, i32* %12
%33 = load i32*, i32** %13
%34 = load i32, i32* %14
%35 = call i32 @output_vcf_row(i32* %21, i8* %26, i32 %31, i32 %32, i32* %33, i32 %34)
br label %36
36: ; preds = %20
%37 = load i32, i32* %15
%38 = add nsw i32 %37, 1
store i32 %38, i32* %15
br label %16
39: ; preds = %16
ret void
}

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