#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__ atof(char *);
long long atoi(char *);
int /*<<< orphan*/ change_ext(char *, char *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ print_error_cds(char *, char *);
int /*<<< orphan*/ print_help_cds();
int /*<<< orphan*/ print_licence_snmf();
int /*<<< orphan*/ strcpy(char *, char *);
void analyse_param_cds(int argc, char *argv[], long long *s, double *e,
                       char *input, char *output_file) {
  int i;
  int g_data = -1;
  int g_e = 0;
  int g_s = 0;
  for (i = 1; i < argc; i++) {
    if (argv[i][0] == '-') {
      switch (argv[i][1]) {
      case 's':
        i++;
        if (argc == i || argv[i][0] == '-')
          print_error_cds("cmd", "s (seed number)");
        *s = atoi(argv[i]);
        g_s = 1;
        break;
      case 'r':
        i++;
        if (argc == i || argv[i][0] == '-')
          print_error_cds("cmd", "r (percentage of masked data)");
        *e = (double)atof(argv[i]);
        if (*e < 0)
          *e = 0;
        if (*e > 1)
          *e = 1;
        g_e = 1;
        break;
      case 'h':
        print_help_cds();
        exit(1);
        break;
      case 'l':
        print_licence_snmf();
        exit(1);
        break;
      case 'x':
        i++;
        if (argc == i || argv[i][0] == '-')
          print_error_cds("cmd", "x (genotype file)");
        g_data = 0;
        strcpy(input, argv[i]);
        break;
      case 'o':
        i++;
        if (argc == i || argv[i][0] == '-')
          print_error_cds("cmd", "o (genotype file with masked genotypes)");
        strcpy(output_file, argv[i]);
        break;
      default:
        print_error_cds("basic", NULL);
      }
    } else {
      print_error_cds("basic", NULL);
    }
  }
  if (g_data == -1)
    print_error_cds("option", "-x genotype_file");
  if (g_s && *s <= 0)
    *s = -1;
  if (g_e && (*e <= 0 || *e >= 1))
    print_error_cds("missing", "");
  change_ext(input, output_file, "_I.geno");
}


x86 assembly (clang, -O0):
<analyse_param_cds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0xffffffff,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1441 <analyse_param_cds+0x2c1>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    141e <analyse_param_cds+0x29e>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
add    $0xffffff98,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x10,%eax
ja     1409 <analyse_param_cds+0x289>
mov    -0x48(%rbp),%rax
lea    0xdfc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     1242 <analyse_param_cds+0xc2>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1255 <analyse_param_cds+0xd5>
lea    0xe03(%rip),%rdi
lea    0xe00(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <atoi@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x40(%rbp)
jmp    1419 <analyse_param_cds+0x299>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     12a9 <analyse_param_cds+0x129>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    12bc <analyse_param_cds+0x13c>
lea    0xd9c(%rip),%rdi
lea    0xda9(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <atof@plt>
cvtsi2sd %rax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    12f6 <analyse_param_cds+0x176>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xcfa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1320 <analyse_param_cds+0x1a0>
mov    -0x20(%rbp),%rax
movsd  0xce4(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x3c(%rbp)
jmp    1419 <analyse_param_cds+0x299>
mov    $0x0,%al
call   1080 <print_help_cds@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1060 <print_licence_snmf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     137b <analyse_param_cds+0x1fb>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    138e <analyse_param_cds+0x20e>
lea    0xcca(%rip),%rdi
lea    0xcf5(%rip),%rsi
call   1050 <print_error_cds@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
jmp    1419 <analyse_param_cds+0x299>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     13dc <analyse_param_cds+0x25c>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    13ef <analyse_param_cds+0x26f>
lea    0xc69(%rip),%rdi
lea    0xca6(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
jmp    1419 <analyse_param_cds+0x299>
lea    0xca8(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <print_error_cds@plt>
jmp    142e <analyse_param_cds+0x2ae>
lea    0xc93(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <print_error_cds@plt>
jmp    1433 <analyse_param_cds+0x2b3>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11bb <analyse_param_cds+0x3b>
cmpl   $0xffffffff,-0x38(%rbp)
jne    145e <analyse_param_cds+0x2de>
lea    0xc6c(%rip),%rdi
lea    0xc6c(%rip),%rsi
call   1050 <print_error_cds@plt>
cmpl   $0x0,-0x40(%rbp)
je     1481 <analyse_param_cds+0x301>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jg     1481 <analyse_param_cds+0x301>
mov    -0x18(%rbp),%rax
movq   $0xffffffffffffffff,(%rax)
cmpl   $0x0,-0x3c(%rbp)
je     14c9 <analyse_param_cds+0x349>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jae    14b6 <analyse_param_cds+0x336>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xb54(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     14c9 <analyse_param_cds+0x349>
lea    0xc19(%rip),%rdi
lea    0xbb9(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
lea    0xc06(%rip),%rdx
call   1070 <change_ext@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analyse_param_cds>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,0x28(%rsp)
mov    %rcx,0x20(%rsp)
mov    %rdx,0x10(%rsp)
xor    %r14d,%r14d
mov    $0x0,%r15d
cmp    $0x2,%edi
jl     135f <analyse_param_cds+0x1df>
mov    %rsi,%rbx
mov    %edi,%ebp
mov    $0x1,%r14d
movl   $0xffffffff,0x8(%rsp)
ff
xor    %eax,%eax
mov    %rax,0x18(%rsp)
lea    0xee3(%rip),%r15
lea    0xe2c(%rip),%r13
movl   $0x0,0xc(%rsp)
jmp    1207 <analyse_param_cds+0x87>
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %esi,%esi
call   1050 <print_error_cds@plt>
add    $0x1,%r14d
cmp    %ebp,%r14d
jge    134e <analyse_param_cds+0x1ce>
movslq %r14d,%rax
mov    (%rbx,%rax,8),%rax
cmpb   $0x2d,(%rax)
jne    11f0 <analyse_param_cds+0x70>
movsbl 0x1(%rax),%eax
add    $0xffffff98,%eax
cmp    $0x10,%eax
ja     11f0 <analyse_param_cds+0x70>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
add    $0x1,%r14d
movslq %r14d,%r12
cmp    %ebp,%r14d
je     123e <analyse_param_cds+0xbe>
mov    (%rbx,%r12,8),%rsi
cmpb   $0x2d,(%rsi)
jne    1255 <analyse_param_cds+0xd5>
lea    0xe07(%rip),%rdi
lea    0xe44(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    (%rbx,%r12,8),%rsi
mov    0x30(%rsp),%rdi
call   1030 <strcpy@plt>
jmp    11fa <analyse_param_cds+0x7a>
add    $0x1,%r14d
movslq %r14d,%r12
cmp    %ebp,%r14d
je     1276 <analyse_param_cds+0xf6>
mov    (%rbx,%r12,8),%rdi
cmpb   $0x2d,(%rdi)
jne    128d <analyse_param_cds+0x10d>
lea    0xdcf(%rip),%rdi
lea    0xddc(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    (%rbx,%r12,8),%rdi
call   1040 <atof@plt>
test   %rax,%rax
jns    1299 <analyse_param_cds+0x119>
xor    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xd57(%rip),%xmm1
minsd  %xmm0,%xmm1
mov    0x20(%rsp),%rax
movsd  %xmm1,(%rax)
movl   $0x1,0xc(%rsp)
jmp    11fa <analyse_param_cds+0x7a>
add    $0x1,%r14d
movslq %r14d,%r12
cmp    %ebp,%r14d
je     12d8 <analyse_param_cds+0x158>
mov    (%rbx,%r12,8),%rdi
cmpb   $0x2d,(%rdi)
jne    12ef <analyse_param_cds+0x16f>
lea    0xd6d(%rip),%rdi
lea    0xd6a(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    (%rbx,%r12,8),%rdi
call   1090 <atoi@plt>
mov    0x10(%rsp),%rcx
mov    %rax,(%rcx)
mov    $0x1,%eax
mov    %rax,0x18(%rsp)
jmp    11fa <analyse_param_cds+0x7a>
add    $0x1,%r14d
movslq %r14d,%r12
cmp    %ebp,%r14d
je     1320 <analyse_param_cds+0x1a0>
mov    (%rbx,%r12,8),%rsi
cmpb   $0x2d,(%rsi)
jne    1337 <analyse_param_cds+0x1b7>
lea    0xd25(%rip),%rdi
lea    0xd50(%rip),%rsi
call   1050 <print_error_cds@plt>
mov    (%rbx,%r12,8),%rsi
mov    0x28(%rsp),%rdi
call   1030 <strcpy@plt>
movl   $0x0,0x8(%rsp)
jmp    11fa <analyse_param_cds+0x7a>
cmpl   $0xffffffff,0x8(%rsp)
mov    0x18(%rsp),%r14
mov    0xc(%rsp),%r15d
jne    1372 <analyse_param_cds+0x1f2>
lea    0xd58(%rip),%rdi
lea    0xd58(%rip),%rsi
call   1050 <print_error_cds@plt>
test   %r14d,%r14d
je     138e <analyse_param_cds+0x20e>
mov    0x10(%rsp),%rax
cmpq   $0x0,(%rax)
jg     138e <analyse_param_cds+0x20e>
mov    0x10(%rsp),%rax
movq   $0xffffffffffffffff,(%rax)
test   %r15d,%r15d
je     13c3 <analyse_param_cds+0x243>
mov    0x20(%rsp),%rax
movsd  (%rax),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    13b0 <analyse_param_cds+0x230>
ucomisd 0xc52(%rip),%xmm0
jb     13c3 <analyse_param_cds+0x243>
lea    0xd1f(%rip),%rdi
lea    0xcbf(%rip),%rsi
call   1050 <print_error_cds@plt>
lea    0xd14(%rip),%rdx
mov    0x28(%rsp),%rdi
mov    0x30(%rsp),%rsi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <change_ext@plt>
xor    %eax,%eax
call   1060 <print_licence_snmf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
xor    %eax,%eax
call   1080 <print_help_cds@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cmd\00"
@.str.1 = [16 x i8] c"s (seed number)\00"
@.str.2 = [30 x i8] c"r (percentage of masked data)\00"
@.str.3 = [18 x i8] c"x (genotype file)\00"
@.str.4 = [40 x i8] c"o (genotype file with masked genotypes)\00"
@.str.5 = [6 x i8] c"basic\00"
@.str.6 = [7 x i8] c"option\00"
@.str.7 = [17 x i8] c"-x genotype_file\00"
@.str.8 = [8 x i8] c"missing\00"
@.str.9 = [1 x i8] zeroinitializer
@.str.10 = [8 x i8] c"_I.geno\00"
define void @analyse_param_cds(i32 %0, i8** %1, i64* %2, double* %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i64*
%10 = alloca double*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %7
store i8** %1, i8*** %8
store i64* %2, i64** %9
store double* %3, double** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
store i32 -1, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 1, i32* %13
br label %17
17: ; preds = %169, %6
%18 = load i32, i32* %13
%19 = load i32, i32* %7
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %172
21: ; preds = %17
%22 = load i8**, i8*** %8
%23 = load i32, i32* %13
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 45
br i1 %30, label %31, label %166
31: ; preds = %21
%32 = load i8**, i8*** %8
%33 = load i32, i32* %13
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
switch i32 %39, label %163 [
i32 115, label %40
i32 114, label %66
i32 104, label %105
i32 108, label %108
i32 120, label %111
i32 111, label %137
]
40: ; preds = %31
%41 = load i32, i32* %13
%42 = add nsw i32 %41, 1
store i32 %42, i32* %13
%43 = load i32, i32* %7
%44 = load i32, i32* %13
%45 = icmp eq i32 %43, %44
br i1 %45, label %56, label %46
46: ; preds = %40
%47 = load i8**, i8*** %8
%48 = load i32, i32* %13
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %47, i64 %49
%51 = load i8*, i8** %50
%52 = getelementptr inbounds i8, i8* %51, i64 0
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 45
br i1 %55, label %56, label %58
56: ; preds = %46, %40
%57 = call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %58
58: ; preds = %56, %46
%59 = load i8**, i8*** %8
%60 = load i32, i32* %13
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8*, i8** %59, i64 %61
%63 = load i8*, i8** %62
%64 = call i64 @atoi(i8* %63)
%65 = load i64*, i64** %9
store i64 %64, i64* %65
store i32 1, i32* %16
br label %165
66: ; preds = %31
%67 = load i32, i32* %13
%68 = add nsw i32 %67, 1
store i32 %68, i32* %13
%69 = load i32, i32* %7
%70 = load i32, i32* %13
%71 = icmp eq i32 %69, %70
br i1 %71, label %82, label %72
72: ; preds = %66
%73 = load i8**, i8*** %8
%74 = load i32, i32* %13
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8*, i8** %73, i64 %75
%77 = load i8*, i8** %76
%78 = getelementptr inbounds i8, i8* %77, i64 0
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp eq i32 %80, 45
br i1 %81, label %82, label %84
82: ; preds = %72, %66
%83 = call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %84
84: ; preds = %82, %72
%85 = load i8**, i8*** %8
%86 = load i32, i32* %13
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8*, i8** %85, i64 %87
%89 = load i8*, i8** %88
%90 = call i64 @atof(i8* %89)
%91 = sitofp i64 %90 to double
%92 = load double*, double** %10
store double %91, double* %92
%93 = load double*, double** %10
%94 = load double, double* %93
%95 = fcmp olt double %94, 0.000000e+00
br i1 %95, label %96, label %98
96: ; preds = %84
%97 = load double*, double** %10
store double 0.000000e+00, double* %97
br label %98
98: ; preds = %96, %84
%99 = load double*, double** %10
%100 = load double, double* %99
%101 = fcmp ogt double %100, 1.000000e+00
br i1 %101, label %102, label %104
102: ; preds = %98
%103 = load double*, double** %10
store double 1.000000e+00, double* %103
br label %104
104: ; preds = %102, %98
store i32 1, i32* %15
br label %165
105: ; preds = %31
%106 = call i32 (...) @print_help_cds()
%107 = call i32 @exit(i32 1)
unreachable
108: ; preds = %31
%109 = call i32 (...) @print_licence_snmf()
%110 = call i32 @exit(i32 1)
unreachable
111: ; preds = %31
%112 = load i32, i32* %13
%113 = add nsw i32 %112, 1
store i32 %113, i32* %13
%114 = load i32, i32* %7
%115 = load i32, i32* %13
%116 = icmp eq i32 %114, %115
br i1 %116, label %127, label %117
117: ; preds = %111
%118 = load i8**, i8*** %8
%119 = load i32, i32* %13
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8*, i8** %118, i64 %120
%122 = load i8*, i8** %121
%123 = getelementptr inbounds i8, i8* %122, i64 0
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 45
br i1 %126, label %127, label %129
127: ; preds = %117, %111
%128 = call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %129
129: ; preds = %127, %117
store i32 0, i32* %14
%130 = load i8*, i8** %11
%131 = load i8**, i8*** %8
%132 = load i32, i32* %13
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8*, i8** %131, i64 %133
%135 = load i8*, i8** %134
%136 = call i32 @strcpy(i8* %130, i8* %135)
br label %165
137: ; preds = %31
%138 = load i32, i32* %13
%139 = add nsw i32 %138, 1
store i32 %139, i32* %13
%140 = load i32, i32* %7
%141 = load i32, i32* %13
%142 = icmp eq i32 %140, %141
br i1 %142, label %153, label %143
143: ; preds = %137
%144 = load i8**, i8*** %8
%145 = load i32, i32* %13
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i8*, i8** %144, i64 %146
%148 = load i8*, i8** %147
%149 = getelementptr inbounds i8, i8* %148, i64 0
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp eq i32 %151, 45
br i1 %152, label %153, label %155
153: ; preds = %143, %137
%154 = call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
br label %155
155: ; preds = %153, %143
%156 = load i8*, i8** %12
%157 = load i8**, i8*** %8
%158 = load i32, i32* %13
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i8*, i8** %157, i64 %159
%161 = load i8*, i8** %160
%162 = call i32 @strcpy(i8* %156, i8* %161)
br label %165
163: ; preds = %31
%164 = call i32 @print_error_cds(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* null)
br label %165
165: ; preds = %163, %155, %129, %104, %58
br label %168
166: ; preds = %21
%167 = call i32 @print_error_cds(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* null)
br label %168
168: ; preds = %166, %165
br label %169
169: ; preds = %168
%170 = load i32, i32* %13
%171 = add nsw i32 %170, 1
store i32 %171, i32* %13
br label %17
172: ; preds = %17
%173 = load i32, i32* %14
%174 = icmp eq i32 %173, -1
br i1 %174, label %175, label %177
175: ; preds = %172
%176 = call i32 @print_error_cds(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %177
177: ; preds = %175, %172
%178 = load i32, i32* %16
%179 = icmp ne i32 %178, 0
br i1 %179, label %180, label %186
180: ; preds = %177
%181 = load i64*, i64** %9
%182 = load i64, i64* %181
%183 = icmp sle i64 %182, 0
br i1 %183, label %184, label %186
184: ; preds = %180
%185 = load i64*, i64** %9
store i64 -1, i64* %185
br label %186
186: ; preds = %184, %180, %177
%187 = load i32, i32* %15
%188 = icmp ne i32 %187, 0
br i1 %188, label %189, label %199
189: ; preds = %186
%190 = load double*, double** %10
%191 = load double, double* %190
%192 = fcmp ole double %191, 0.000000e+00
br i1 %192, label %197, label %193
193: ; preds = %189
%194 = load double*, double** %10
%195 = load double, double* %194
%196 = fcmp oge double %195, 1.000000e+00
br i1 %196, label %197, label %199
197: ; preds = %193, %189
%198 = call i32 @print_error_cds(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
br label %199
199: ; preds = %197, %193, %186
%200 = load i8*, i8** %11
%201 = load i8*, i8** %12
%202 = call i32 @change_ext(i8* %200, i8* %201, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cmd\00"
@.str.1 = [16 x i8] c"s (seed number)\00"
@.str.2 = [30 x i8] c"r (percentage of masked data)\00"
@.str.3 = [18 x i8] c"x (genotype file)\00"
@.str.4 = [40 x i8] c"o (genotype file with masked genotypes)\00"
@.str.5 = [6 x i8] c"basic\00"
@.str.6 = [7 x i8] c"option\00"
@.str.7 = [17 x i8] c"-x genotype_file\00"
@.str.8 = [8 x i8] c"missing\00"
@.str.9 = [1 x i8] zeroinitializer
@.str.10 = [8 x i8] c"_I.geno\00"
define void @analyse_param_cds(i32 %0, i8** nocapture %1, i64* nocapture %2, double* nocapture %3, i8* %4, i8* %5) {
%7 = icmp sgt i32 %0, 1
br i1 %7, label %8, label %110
8: ; preds = %6, %101
%9 = phi i32 [ %105, %101 ], [ 0, %6 ]
%10 = phi i32 [ %104, %101 ], [ 0, %6 ]
%11 = phi i32 [ %103, %101 ], [ -1, %6 ]
%12 = phi i32 [ %106, %101 ], [ 1, %6 ]
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %1, i64 %13
%15 = load i8*, i8** %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 45
br i1 %17, label %18, label %99
18: ; preds = %8
%19 = getelementptr inbounds i8, i8* %15, i64 1
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
switch i32 %21, label %97 [
i32 115, label %22
i32 114, label %38
i32 104, label %59
i32 108, label %62
i32 120, label %65
i32 111, label %81
]
22: ; preds = %18
%23 = add nsw i32 %12, 1
%24 = icmp eq i32 %23, %0
%25 = sext i32 %23 to i64
br i1 %24, label %31, label %26
26: ; preds = %22
%27 = getelementptr inbounds i8*, i8** %1, i64 %25
%28 = load i8*, i8** %27
%29 = load i8, i8* %28
%30 = icmp eq i8 %29, 45
br i1 %30, label %31, label %35
31: ; preds = %22, %26
%32 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%33 = getelementptr inbounds i8*, i8** %1, i64 %25
%34 = load i8*, i8** %33
br label %35
35: ; preds = %31, %26
%36 = phi i8* [ %34, %31 ], [ %28, %26 ]
%37 = tail call i64 @atoi(i8* %36)
store i64 %37, i64* %2
br label %101
38: ; preds = %18
%39 = add nsw i32 %12, 1
%40 = icmp eq i32 %39, %0
%41 = sext i32 %39 to i64
br i1 %40, label %47, label %42
42: ; preds = %38
%43 = getelementptr inbounds i8*, i8** %1, i64 %41
%44 = load i8*, i8** %43
%45 = load i8, i8* %44
%46 = icmp eq i8 %45, 45
br i1 %46, label %47, label %51
47: ; preds = %38, %42
%48 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%49 = getelementptr inbounds i8*, i8** %1, i64 %41
%50 = load i8*, i8** %49
br label %51
51: ; preds = %47, %42
%52 = phi i8* [ %50, %47 ], [ %44, %42 ]
%53 = tail call i64 @atof(i8* %52)
%54 = icmp sgt i64 %53, 0
%55 = select i1 %54, i64 %53, i64 0
%56 = sitofp i64 %55 to double
%57 = fcmp ogt double %56, 1.000000e+00
%58 = select i1 %57, double 1.000000e+00, double %56
store double %58, double* %3
br label %101
59: ; preds = %18
%60 = tail call i32 (...) @print_help_cds()
%61 = tail call i32 @exit(i32 1)
unreachable
62: ; preds = %18
%63 = tail call i32 (...) @print_licence_snmf()
%64 = tail call i32 @exit(i32 1)
unreachable
65: ; preds = %18
%66 = add nsw i32 %12, 1
%67 = icmp eq i32 %66, %0
%68 = sext i32 %66 to i64
br i1 %67, label %74, label %69
69: ; preds = %65
%70 = getelementptr inbounds i8*, i8** %1, i64 %68
%71 = load i8*, i8** %70
%72 = load i8, i8* %71
%73 = icmp eq i8 %72, 45
br i1 %73, label %74, label %78
74: ; preds = %65, %69
%75 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%76 = getelementptr inbounds i8*, i8** %1, i64 %68
%77 = load i8*, i8** %76
br label %78
78: ; preds = %74, %69
%79 = phi i8* [ %77, %74 ], [ %71, %69 ]
%80 = tail call i32 @strcpy(i8* %4, i8* %79)
br label %101
81: ; preds = %18
%82 = add nsw i32 %12, 1
%83 = icmp eq i32 %82, %0
%84 = sext i32 %82 to i64
br i1 %83, label %90, label %85
85: ; preds = %81
%86 = getelementptr inbounds i8*, i8** %1, i64 %84
%87 = load i8*, i8** %86
%88 = load i8, i8* %87
%89 = icmp eq i8 %88, 45
br i1 %89, label %90, label %94
90: ; preds = %81, %85
%91 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%92 = getelementptr inbounds i8*, i8** %1, i64 %84
%93 = load i8*, i8** %92
br label %94
94: ; preds = %90, %85
%95 = phi i8* [ %93, %90 ], [ %87, %85 ]
%96 = tail call i32 @strcpy(i8* %5, i8* %95)
br label %101
97: ; preds = %18
%98 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* null)
br label %101
99: ; preds = %8
%100 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* null)
br label %101
101: ; preds = %99, %97, %94, %78, %51, %35
%102 = phi i32 [ %12, %97 ], [ %82, %94 ], [ %66, %78 ], [ %39, %51 ], [ %23, %35 ], [ %12, %99 ]
%103 = phi i32 [ %11, %97 ], [ %11, %94 ], [ 0, %78 ], [ %11, %51 ], [ %11, %35 ], [ %11, %99 ]
%104 = phi i32 [ %10, %97 ], [ %10, %94 ], [ %10, %78 ], [ 1, %51 ], [ %10, %35 ], [ %10, %99 ]
%105 = phi i32 [ %9, %97 ], [ %9, %94 ], [ %9, %78 ], [ %9, %51 ], [ 1, %35 ], [ %9, %99 ]
%106 = add nsw i32 %102, 1
%107 = icmp slt i32 %106, %0
br i1 %107, label %8, label %108
108: ; preds = %101
%109 = icmp eq i32 %103, -1
br i1 %109, label %110, label %114
110: ; preds = %6, %108
%111 = phi i32 [ %105, %108 ], [ 0, %6 ]
%112 = phi i32 [ %104, %108 ], [ 0, %6 ]
%113 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %114
114: ; preds = %110, %108
%115 = phi i32 [ %111, %110 ], [ %105, %108 ]
%116 = phi i32 [ %112, %110 ], [ %104, %108 ]
%117 = icmp eq i32 %115, 0
br i1 %117, label %122, label %118
118: ; preds = %114
%119 = load i64, i64* %2
%120 = icmp slt i64 %119, 1
br i1 %120, label %121, label %122
121: ; preds = %118
store i64 -1, i64* %2
br label %122
122: ; preds = %121, %118, %114
%123 = icmp eq i32 %116, 0
br i1 %123, label %131, label %124
124: ; preds = %122
%125 = load double, double* %3
%126 = fcmp ugt double %125, 0.000000e+00
%127 = fcmp ult double %125, 1.000000e+00
%128 = and i1 %126, %127
br i1 %128, label %131, label %129
129: ; preds = %124
%130 = tail call i32 @print_error_cds(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.9, i64 0, i64 0))
br label %131
131: ; preds = %124, %129, %122
%132 = tail call i32 @change_ext(i8* %4, i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
ret void
}