#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*/ analyse_param_convert(int, char **, char *, char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ print_convert(int, int);
int /*<<< orphan*/ printf(char *, ...);
char *remove_ext(char *, char, char);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ vcf2geno(char *, char *, int *, int *, char *, char *,
                            int *);
int main(int argc, char *argv[]) {
  int M;
  int N;
  int removed;
  char input_file[512];
  char output_file[512];
  char snp_bp_file[512];
  char removed_bp_file[512];
  char *tmp;
  analyse_param_convert(argc, argv, input_file, output_file, "geno");
  tmp = remove_ext(output_file, '.', '/');
  strcpy(snp_bp_file, tmp);
  strcat(snp_bp_file, ".vcfsnp");
  strcpy(removed_bp_file, tmp);
  strcat(removed_bp_file, ".removed");
  vcf2geno(input_file, output_file, &N, &M, snp_bp_file, removed_bp_file,
           &removed);
  print_convert(N, M);
  printf("For SNP info, please check %s.\n\n", snp_bp_file);
  printf("%d line(s) were removed because these are not SNPs.\n", removed);
  printf("Please, check %s file, for more informations.\n\n", removed_bp_file);
  free(tmp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x830,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x220(%rbp),%rdx
lea    -0x420(%rbp),%rcx
lea    0xe4b(%rip),%r8
call   10a0 <analyse_param_convert@plt>
lea    -0x420(%rbp),%rdi
mov    $0x2e,%esi
mov    $0x2f,%edx
call   1050 <remove_ext@plt>
mov    %rax,-0x828(%rbp)
lea    -0x620(%rbp),%rdi
mov    -0x828(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x620(%rbp),%rdi
lea    0xe0d(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x820(%rbp),%rdi
mov    -0x828(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x820(%rbp),%rdi
lea    0xdef(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x220(%rbp),%rdi
lea    -0x420(%rbp),%rsi
lea    -0x620(%rbp),%r8
lea    -0x820(%rbp),%r9
lea    -0x18(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x1c(%rbp),%rax
mov    %rax,(%rsp)
call   1080 <vcf2geno@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1070 <print_convert@plt>
lea    -0x620(%rbp),%rsi
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x820(%rbp),%rsi
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x828(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x820,%rsp
lea    0xe69(%rip),%r8
lea    0x620(%rsp),%r12
lea    0x420(%rsp),%r13
mov    %r12,%rdx
mov    %r13,%rcx
call   10a0 <analyse_param_convert@plt>
mov    %r13,%rdi
mov    $0x2e,%esi
mov    $0x2f,%edx
call   1050 <remove_ext@plt>
mov    %rax,%rbx
lea    0x220(%rsp),%r15
mov    %r15,%rdi
mov    %rax,%rsi
call   1040 <strcpy@plt>
lea    0xe24(%rip),%rsi
mov    %r15,%rdi
call   1090 <strcat@plt>
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0xe0d(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcat@plt>
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
lea    0x18(%rsp),%rdx
lea    0x1c(%rsp),%rcx
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r15,%r8
mov    %r14,%r9
call   1080 <vcf2geno@plt>
mov    0x18(%rsp),%edi
mov    0x1c(%rsp),%esi
call   1070 <print_convert@plt>
lea    0xdd6(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xde2(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe09(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x820,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"geno\00"
@.str.1 = [8 x i8] c".vcfsnp\00"
@.str.2 = [9 x i8] c".removed\00"
@.str.3 = [33 x i8] c"For SNP info, please check %s.\0A\0A\00"
@.str.4 = [53 x i8] c"%d line(s) were removed because these are not SNPs.\0A\00"
@.str.5 = [48 x i8] c"Please, check %s file, for more informations.\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [512 x i8]
%10 = alloca [512 x i8]
%11 = alloca [512 x i8]
%12 = alloca [512 x i8]
%13 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%18 = call i32 @analyse_param_convert(i32 %14, i8** %15, i8* %16, i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%20 = call i8* @remove_ext(i8* %19, i8 signext 46, i8 signext 47)
store i8* %20, i8** %13
%21 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%22 = load i8*, i8** %13
%23 = call i32 @strcpy(i8* %21, i8* %22)
%24 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%25 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%26 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%27 = load i8*, i8** %13
%28 = call i32 @strcpy(i8* %26, i8* %27)
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%30 = call i32 @strcat(i8* %29, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%31 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%32 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%33 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%34 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%35 = call i32 @vcf2geno(i8* %31, i8* %32, i32* %7, i32* %6, i8* %33, i8* %34, i32* %8)
%36 = load i32, i32* %7
%37 = load i32, i32* %6
%38 = call i32 @print_convert(i32 %36, i32 %37)
%39 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %39)
%41 = load i32, i32* %8
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0), i8* %43)
%45 = load i8*, i8** %13
%46 = call i32 @free(i8* %45)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"geno\00"
@.str.1 = [8 x i8] c".vcfsnp\00"
@.str.2 = [9 x i8] c".removed\00"
@.str.3 = [33 x i8] c"For SNP info, please check %s.\0A\0A\00"
@.str.4 = [53 x i8] c"%d line(s) were removed because these are not SNPs.\0A\00"
@.str.5 = [48 x i8] c"Please, check %s file, for more informations.\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = alloca [512 x i8]
%9 = alloca [512 x i8]
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%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 = call i32 @analyse_param_convert(i32 %0, i8** %1, i8* %13, i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%18 = call i8* @remove_ext(i8* %14, i8 signext 46, i8 signext 47)
%19 = call i32 @strcpy(i8* %15, i8* %18)
%20 = call i32 @strcat(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @strcpy(i8* %16, i8* %18)
%22 = call i32 @strcat(i8* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @vcf2geno(i8* %13, i8* %14, i32* %4, i32* %3, i8* %15, i8* %16, i32* %5)
%24 = load i32, i32* %4
%25 = load i32, i32* %3
%26 = call i32 @print_convert(i32 %24, i32 %25)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%28 = load i32, i32* %5
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0), i32 %28)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0), i8* %16)
%31 = call i32 @free(i8* %18)
ret i32 0
}