#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 */
scalar_t__ atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ vcf2geno(char *, char *, int *, int *, char *, char *,
                            int *);
int main(int argc, char *argv[]) {
  char input[512];
  char output[512];
  int N, M, removed;
  int test_N, test_M, test_removed;
  char snp_file[512];
  char removed_file[512];
  strcpy(input, argv[1]);
  N = (int)atoi(argv[2]);
  M = (int)atoi(argv[3]);
  removed = (int)atoi(argv[4]);
  strcpy(output, argv[5]);
  strcpy(snp_file, argv[6]);
  strcpy(removed_file, argv[7]);
  vcf2geno(input, output, &test_N, &test_M, snp_file, removed_file,
           &test_removed);
  if (test_N != N) {
    printf("Test Error: N false %d instead of %d!\n", test_N, N);
    exit(1);
  }
  if (test_M != M) {
    printf("Test Error: M false %d instead of %d!\n", test_M, M);
    exit(1);
  }
  if (test_removed != removed) {
    printf("Test Error: 'removed' false %d instead of %d!\n", test_removed,
           removed);
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x414(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x418(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x41c(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x630(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x830(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x210(%rbp),%rdi
lea    -0x410(%rbp),%rsi
lea    -0x630(%rbp),%r8
lea    -0x830(%rbp),%r9
lea    -0x420(%rbp),%rdx
lea    -0x424(%rbp),%rcx
lea    -0x428(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <vcf2geno@plt>
mov    -0x420(%rbp),%eax
cmp    -0x414(%rbp),%eax
je     1260 <main+0x110>
mov    -0x420(%rbp),%esi
mov    -0x414(%rbp),%edx
lea    0xdaf(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x424(%rbp),%eax
cmp    -0x418(%rbp),%eax
je     1294 <main+0x144>
mov    -0x424(%rbp),%esi
mov    -0x418(%rbp),%edx
lea    0xda2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x428(%rbp),%eax
cmp    -0x41c(%rbp),%eax
je     12c8 <main+0x178>
mov    -0x428(%rbp),%esi
mov    -0x41c(%rbp),%edx
lea    0xd95(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
xor    %eax,%eax
add    $0x840,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0x20(%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x10(%rbx),%rdi
call   1060 <atoi@plt>
mov    %rax,%r14
mov    0x18(%rbx),%rdi
call   1060 <atoi@plt>
mov    %rax,%r13
mov    0x20(%rbx),%rdi
call   1060 <atoi@plt>
mov    %rax,%r15
mov    0x28(%rbx),%rsi
lea    0x620(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <strcpy@plt>
mov    0x30(%rbx),%rsi
lea    0x420(%rsp),%r12
mov    %r12,%rdi
call   1030 <strcpy@plt>
mov    0x38(%rbx),%rsi
lea    0x220(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x20(%rsp),%rdi
mov    %rbp,%rsi
mov    %r12,%r8
mov    %rbx,%r9
call   1050 <vcf2geno@plt>
mov    0x1c(%rsp),%esi
cmp    %r14d,%esi
jne    1227 <main+0xd7>
mov    0x18(%rsp),%esi
cmp    %r13d,%esi
jne    1233 <main+0xe3>
mov    0x14(%rsp),%esi
cmp    %r15d,%esi
jne    123f <main+0xef>
xor    %eax,%eax
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdd2(%rip),%rdi
mov    %r14d,%edx
jmp    1249 <main+0xf9>
lea    0xded(%rip),%rdi
mov    %r13d,%edx
jmp    1249 <main+0xf9>
lea    0xe08(%rip),%rdi
mov    %r15d,%edx
call   1040 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Test Error: N false %d instead of %d!\0A\00"
@.str.1 = [39 x i8] c"Test Error: M false %d instead of %d!\0A\00"
@.str.2 = [47 x i8] c"Test Error: 'removed' false %d instead of %d!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [512 x i8]
%15 = alloca [512 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @strcpy(i8* %16, i8* %19)
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 2
%23 = load i8*, i8** %22
%24 = call i64 @atoi(i8* %23)
%25 = trunc i64 %24 to i32
store i32 %25, i32* %8
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 3
%28 = load i8*, i8** %27
%29 = call i64 @atoi(i8* %28)
%30 = trunc i64 %29 to i32
store i32 %30, i32* %9
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 4
%33 = load i8*, i8** %32
%34 = call i64 @atoi(i8* %33)
%35 = trunc i64 %34 to i32
store i32 %35, i32* %10
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 5
%39 = load i8*, i8** %38
%40 = call i32 @strcpy(i8* %36, i8* %39)
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %14, i64 0, i64 0
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 6
%44 = load i8*, i8** %43
%45 = call i32 @strcpy(i8* %41, i8* %44)
%46 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i64 0, i64 0
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 7
%49 = load i8*, i8** %48
%50 = call i32 @strcpy(i8* %46, i8* %49)
%51 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%52 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%53 = getelementptr inbounds [512 x i8], [512 x i8]* %14, i64 0, i64 0
%54 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i64 0, i64 0
%55 = call i32 @vcf2geno(i8* %51, i8* %52, i32* %11, i32* %12, i8* %53, i8* %54, i32* %13)
%56 = load i32, i32* %11
%57 = load i32, i32* %8
%58 = icmp ne i32 %56, %57
br i1 %58, label %59, label %64
59: ; preds = %2
%60 = load i32, i32* %11
%61 = load i32, i32* %8
%62 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %60, i32 %61)
%63 = call i32 @exit(i32 1)
unreachable
64: ; preds = %2
%65 = load i32, i32* %12
%66 = load i32, i32* %9
%67 = icmp ne i32 %65, %66
br i1 %67, label %68, label %73
68: ; preds = %64
%69 = load i32, i32* %12
%70 = load i32, i32* %9
%71 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %69, i32 %70)
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %64
%74 = load i32, i32* %13
%75 = load i32, i32* %10
%76 = icmp ne i32 %74, %75
br i1 %76, label %77, label %82
77: ; preds = %73
%78 = load i32, i32* %13
%79 = load i32, i32* %10
%80 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %78, i32 %79)
%81 = call i32 @exit(i32 1)
unreachable
82: ; preds = %73
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Test Error: N false %d instead of %d!\0A\00"
@.str.1 = [39 x i8] c"Test Error: M false %d instead of %d!\0A\00"
@.str.2 = [47 x i8] c"Test Error: 'removed' false %d instead of %d!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %8, i64 0, i64 0
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @strcpy(i8* %10, i8* %18)
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = call i64 @atoi(i8* %21)
%23 = trunc i64 %22 to i32
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = call i64 @atoi(i8* %25)
%27 = trunc i64 %26 to i32
%28 = getelementptr inbounds i8*, i8** %1, i64 4
%29 = load i8*, i8** %28
%30 = call i64 @atoi(i8* %29)
%31 = trunc i64 %30 to i32
%32 = getelementptr inbounds i8*, i8** %1, i64 5
%33 = load i8*, i8** %32
%34 = call i32 @strcpy(i8* %11, i8* %33)
%35 = getelementptr inbounds i8*, i8** %1, i64 6
%36 = load i8*, i8** %35
%37 = call i32 @strcpy(i8* %15, i8* %36)
%38 = getelementptr inbounds i8*, i8** %1, i64 7
%39 = load i8*, i8** %38
%40 = call i32 @strcpy(i8* %16, i8* %39)
%41 = call i32 @vcf2geno(i8* %10, i8* %11, i32* %5, i32* %6, i8* %15, i8* %16, i32* %7)
%42 = load i32, i32* %5
%43 = icmp eq i32 %42, %23
br i1 %43, label %47, label %44
44: ; preds = %2
%45 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %42, i32 %23)
%46 = call i32 @exit(i32 1)
unreachable
47: ; preds = %2
%48 = load i32, i32* %6
%49 = icmp eq i32 %48, %27
br i1 %49, label %53, label %50
50: ; preds = %47
%51 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %48, i32 %27)
%52 = call i32 @exit(i32 1)
unreachable
53: ; preds = %47
%54 = load i32, i32* %7
%55 = icmp eq i32 %54, %31
br i1 %55, label %59, label %56
56: ; preds = %53
%57 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %54, i32 %31)
%58 = call i32 @exit(i32 1)
unreachable
59: ; preds = %53
ret i32 0
}