#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 */
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ const member_1;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt_long(int, char **, char *, struct option *, int *);
int /*<<< orphan*/ help();
int /*<<< orphan*/ optarg;
#define required_argument 128
int sscanf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int parseinput(int argc, char **argv, int *d, int *L, double *T, int *nmeas,
               unsigned long int *nmcs, unsigned long int *seed, int *ieq,
               int *TypeDyn, int *printstate) {
  int c;
  int itmp;
  unsigned long int ulitmp;
  double dtmp;
  while (1) {
    static struct option long_options[] = {{"d", required_argument, 0, 'D'},
                                           {"L", required_argument, 0, 'L'},
                                           {"T", required_argument, 0, 'T'},
                                           {"nmeas", required_argument, 0, 'm'},
                                           {"nmcs", required_argument, 0, 'c'},
                                           {"S", required_argument, 0, 's'},
                                           {"ieq", required_argument, 0, 'e'},
                                           {"dyn", required_argument, 0, 'y'},
                                           {"help", 0, 0, 'h'},
                                           {"print-state", 0, 0, 'p'},
                                           {0, 0, 0, 0}};
    int option_index = 0;
    c = getopt_long(argc, argv, "hpD:d:l:L:T:t:m:c:s:y:", long_options,
                    &option_index);
    if (c == -1)
      break;
    switch (c) {
    case 'y':
      if (sscanf(optarg, "%d", &itmp) != 1)
        fprintf(stderr, "Error parsing --dyn option\n");
      else if (itmp < 0 || itmp > 4)
        fprintf(stderr, "--dyn option should be 0-4\n");
      else
        *TypeDyn = itmp;
      break;
    case 'D':
    case 'd':
      if (sscanf(optarg, "%d", &itmp) != 1)
        fprintf(stderr, "Error parsing -d option\n");
      else
        *d = itmp;
      break;
    case 'L':
    case 'l':
      if (sscanf(optarg, "%d", &itmp) != 1)
        fprintf(stderr, "Error parsing -L option\n");
      else
        *L = itmp;
      break;
    case 'T':
    case 't':
      if (sscanf(optarg, "%lf", &dtmp) != 1)
        fprintf(stderr, "Error parsing -T option\n");
      else
        *T = dtmp;
      break;
    case 'm':
      if (sscanf(optarg, "%i", &itmp) != 1)
        fprintf(stderr, "Error parsing -m option\n");
      else
        *nmeas = itmp;
      break;
    case 'c':
      if (sscanf(optarg, "%lud", &ulitmp) != 1)
        fprintf(stderr, "Error parsing --nmcs option\n");
      else
        *nmcs = ulitmp;
      break;
    case 's':
      if (sscanf(optarg, "%lui", &ulitmp) != 1)
        fprintf(stderr, "Error parsing -s option\n");
      else
        *seed = ulitmp;
      break;
    case 'e':
      if (sscanf(optarg, "%i", &itmp) != 1)
        fprintf(stderr, "Error parsing --ieq option\n");
      else
        *ieq = itmp;
      break;
    case 'p':
      *printstate = 1;
      break;
    case 'h':
      help();
      exit(-1);
      break;
    case '?':
      break;
    default:
      abort();
    }
  }
  if (*d != 2 && *printstate == 1) {
    fprintf(stderr,
            "States will not be printed as dimension is %d and not 2,\n", *d);
    *printstate = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<parseinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
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   $0x0,-0x4c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xf6e(%rip),%rdx
lea    0x2eb1(%rip),%rcx
lea    -0x4c(%rbp),%r8
call   1040 <getopt_long@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
jne    11ca <parseinput+0x6a>
jmp    14d1 <parseinput+0x371>
mov    -0x34(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x3a,%eax
ja     14c5 <parseinput+0x365>
mov    -0x58(%rbp),%rax
lea    0xe16(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2dfe(%rip),%rax
mov    (%rax),%edi
lea    0xf2a(%rip),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1233 <parseinput+0xd3>
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
lea    0xf09(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1271 <parseinput+0x111>
cmpl   $0x0,-0x38(%rbp)
jl     1247 <parseinput+0xe7>
cmpl   $0x4,-0x38(%rbp)
jle    1263 <parseinput+0x103>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
lea    0xef5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    126c <parseinput+0x10c>
mov    -0x38(%rbp),%ecx
mov    0x28(%rbp),%rax
mov    %ecx,(%rax)
jmp    1271 <parseinput+0x111>
jmp    14cc <parseinput+0x36c>
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     12b6 <parseinput+0x156>
mov    0x2d37(%rip),%rax
mov    (%rax),%edi
lea    0xebe(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    12bf <parseinput+0x15f>
mov    -0x38(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14cc <parseinput+0x36c>
mov    0x2d2d(%rip),%rax
mov    (%rax),%edi
lea    0xe59(%rip),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1304 <parseinput+0x1a4>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    130d <parseinput+0x1ad>
mov    -0x38(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    14cc <parseinput+0x36c>
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
lea    0xe78(%rip),%rsi
lea    -0x48(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1352 <parseinput+0x1f2>
mov    0x2c9b(%rip),%rax
mov    (%rax),%edi
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    135f <parseinput+0x1ff>
movsd  -0x48(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14cc <parseinput+0x36c>
mov    0x2c8d(%rip),%rax
mov    (%rax),%edi
lea    0xe43(%rip),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     13a4 <parseinput+0x244>
mov    0x2c49(%rip),%rax
mov    (%rax),%edi
lea    0xe22(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13ad <parseinput+0x24d>
mov    -0x38(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
jmp    14cc <parseinput+0x36c>
mov    0x2c3f(%rip),%rax
mov    (%rax),%edi
lea    0xe11(%rip),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     13f2 <parseinput+0x292>
mov    0x2bfb(%rip),%rax
mov    (%rax),%edi
lea    0xdf2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13fd <parseinput+0x29d>
mov    -0x40(%rbp),%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    14cc <parseinput+0x36c>
mov    0x2bef(%rip),%rax
mov    (%rax),%edi
lea    0xde3(%rip),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1442 <parseinput+0x2e2>
mov    0x2bab(%rip),%rax
mov    (%rax),%edi
lea    0xdc4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    144d <parseinput+0x2ed>
mov    -0x40(%rbp),%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    14cc <parseinput+0x36c>
mov    0x2b9f(%rip),%rax
mov    (%rax),%edi
lea    0xd55(%rip),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x1,%eax
je     1492 <parseinput+0x332>
mov    0x2b5b(%rip),%rax
mov    (%rax),%edi
lea    0xd8d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    149b <parseinput+0x33b>
mov    -0x38(%rbp),%ecx
mov    0x20(%rbp),%rax
mov    %ecx,(%rax)
jmp    14cc <parseinput+0x36c>
mov    0x30(%rbp),%rax
movl   $0x1,(%rax)
jmp    14cc <parseinput+0x36c>
mov    $0x0,%al
call   1070 <help@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
jmp    14cc <parseinput+0x36c>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1193 <parseinput+0x33>
mov    -0x18(%rbp),%rax
cmpl   $0x2,(%rax)
je     1512 <parseinput+0x3b2>
mov    0x30(%rbp),%rax
cmpl   $0x1,(%rax)
jne    1512 <parseinput+0x3b2>
mov    0x2ae6(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xd2e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x30(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseinput>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x38(%rsp)
mov    %rcx,0x30(%rsp)
mov    %rdx,0x20(%rsp)
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x1088(%rip),%r14
lea    0x2ecb(%rip),%r15
lea    0x1c(%rsp),%r12
lea    0xe5f(%rip),%r13
jmp    11c7 <parseinput+0x67>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
lea    0x10eb(%rip),%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1050 <fprintf@plt>
movl   $0x0,0x1c(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r12,%r8
call   1040 <getopt_long@plt>
add    $0x1,%eax
cmp    $0x7a,%eax
ja     14c4 <parseinput+0x364>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
mov    0x2df9(%rip),%rax
mov    (%rax),%edi
lea    0x1025(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    13d3 <parseinput+0x273>
mov    0xc(%rsp),%eax
mov    0x20(%rsp),%rcx
mov    %eax,(%rcx)
jmp    11c7 <parseinput+0x67>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edi
lea    0xff3(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    13e8 <parseinput+0x288>
mov    0xc(%rsp),%eax
mov    0x30(%rsp),%rcx
mov    %eax,(%rcx)
jmp    11c7 <parseinput+0x67>
mov    0x2d92(%rip),%rax
mov    (%rax),%edi
lea    0x102b(%rip),%rsi
lea    0x40(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    11a3 <parseinput+0x43>
movsd  0x40(%rsp),%xmm0
mov    0x38(%rsp),%rax
movsd  %xmm0,(%rax)
jmp    11c7 <parseinput+0x67>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
lea    0x102b(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    13fd <parseinput+0x29d>
mov    0x10(%rsp),%rax
mov    0x80(%rsp),%rcx
mov    %rax,(%rcx)
jmp    11c7 <parseinput+0x67>
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
lea    0xfd5(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    1412 <parseinput+0x2b2>
mov    0xc(%rsp),%eax
mov    0x90(%rsp),%rcx
mov    %eax,(%rcx)
jmp    11c7 <parseinput+0x67>
mov    0x2ce7(%rip),%rax
mov    (%rax),%edi
lea    0xf9d(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    1427 <parseinput+0x2c7>
mov    0xc(%rsp),%eax
mov    0x28(%rsp),%rcx
mov    %eax,(%rcx)
jmp    11c7 <parseinput+0x67>
mov    0xa0(%rsp),%rax
movl   $0x1,(%rax)
jmp    11c7 <parseinput+0x67>
mov    0x2c9f(%rip),%rax
mov    (%rax),%edi
lea    0xf93(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    143c <parseinput+0x2dc>
mov    0x10(%rsp),%rax
mov    0x88(%rsp),%rcx
mov    %rax,(%rcx)
jmp    11c7 <parseinput+0x67>
mov    0x2c65(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x1,%eax
jne    1451 <parseinput+0x2f1>
mov    0xc(%rsp),%eax
cmp    $0x5,%eax
jb     1466 <parseinput+0x306>
mov    0x2c13(%rip),%rax
mov    (%rax),%edi
lea    0xe7e(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x2bfe(%rip),%rax
mov    (%rax),%edi
lea    0xe85(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x2be9(%rip),%rax
mov    (%rax),%edi
lea    0xe89(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x2bd4(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x2bbf(%rip),%rax
mov    (%rax),%edi
lea    0xef1(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x2baa(%rip),%rax
mov    (%rax),%edi
lea    0xe83(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x2b95(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x2b80(%rip),%rax
mov    (%rax),%edi
lea    0xdcf(%rip),%rsi
jmp    11c0 <parseinput+0x60>
mov    0x98(%rsp),%rcx
mov    %eax,(%rcx)
jmp    11c7 <parseinput+0x67>
mov    0x20(%rsp),%rax
mov    (%rax),%edx
cmp    $0x2,%edx
je     14b3 <parseinput+0x353>
mov    0xa0(%rsp),%rax
cmpl   $0x1,(%rax)
jne    14b3 <parseinput+0x353>
mov    0x2b43(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0xa0(%rsp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1030 <abort@plt>
xor    %eax,%eax
call   1070 <help@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32, i32 }
@parseinput.long_options = internal global [11 x %struct.option] [%struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8 -128, i32 0, i32 68 }, %struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8 -128, i32 0, i32 76 }, %struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 84 }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8 -128, i32 0, i32 109 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8 -128, i32 0, i32 99 }, %struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8 -128, i32 0, i32 115 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8 -128, i32 0, i32 101 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8 -128, i32 0, i32 121 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8 0, i32 0, i32 104 }, %struct.option { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i32 0, i32 0), i8 0, i32 0, i32 112 }, %struct.option zeroinitializer]
@.str = [2 x i8] c"d\00"
@.str.1 = [2 x i8] c"L\00"
@.str.2 = [2 x i8] c"T\00"
@.str.3 = [6 x i8] c"nmeas\00"
@.str.4 = [5 x i8] c"nmcs\00"
@.str.5 = [2 x i8] c"S\00"
@.str.6 = [4 x i8] c"ieq\00"
@.str.7 = [4 x i8] c"dyn\00"
@.str.8 = [5 x i8] c"help\00"
@.str.9 = [12 x i8] c"print-state\00"
@.str.10 = [23 x i8] c"hpD:d:l:L:T:t:m:c:s:y:\00"
@optarg = global i32 0
@.str.11 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.12 = [28 x i8] c"Error parsing --dyn option\0A\00"
@.str.13 = [28 x i8] c"--dyn option should be 0-4\0A\00"
@.str.14 = [25 x i8] c"Error parsing -d option\0A\00"
@.str.15 = [25 x i8] c"Error parsing -L option\0A\00"
@.str.16 = [4 x i8] c"%lf\00"
@.str.17 = [25 x i8] c"Error parsing -T option\0A\00"
@.str.18 = [3 x i8] c"%i\00"
@.str.19 = [25 x i8] c"Error parsing -m option\0A\00"
@.str.20 = [5 x i8] c"%lud\00"
@.str.21 = [29 x i8] c"Error parsing --nmcs option\0A\00"
@.str.22 = [5 x i8] c"%lui\00"
@.str.23 = [25 x i8] c"Error parsing -s option\0A\00"
@.str.24 = [28 x i8] c"Error parsing --ieq option\0A\00"
@.str.25 = [58 x i8] c"States will not be printed as dimension is %d and not 2,\0A\00"
define i32 @parseinput(i32 %0, i8** %1, i32* %2, i32* %3, double* %4, i32* %5, i64* %6, i64* %7, i32* %8, i32* %9, i32* %10) {
%12 = alloca i32
%13 = alloca i8**
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca double*
%17 = alloca i32*
%18 = alloca i64*
%19 = alloca i64*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i64
%26 = alloca double
%27 = alloca i32
store i32 %0, i32* %12
store i8** %1, i8*** %13
store i32* %2, i32** %14
store i32* %3, i32** %15
store double* %4, double** %16
store i32* %5, i32** %17
store i64* %6, i64** %18
store i64* %7, i64** %19
store i32* %8, i32** %20
store i32* %9, i32** %21
store i32* %10, i32** %22
br label %28
28: ; preds = %11, %143
store i32 0, i32* %27
%29 = load i32, i32* %12
%30 = load i8**, i8*** %13
%31 = call i32 @getopt_long(i32 %29, i8** %30, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), %struct.option* getelementptr inbounds ([11 x %struct.option], [11 x %struct.option]* @parseinput.long_options, i64 0, i64 0), i32* %27)
store i32 %31, i32* %23
%32 = load i32, i32* %23
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %35
34: ; preds = %28
br label %144
35: ; preds = %28
%36 = load i32, i32* %23
switch i32 %36, label %141 [
i32 121, label %37
i32 68, label %58
i32 100, label %58
i32 76, label %69
i32 108, label %69
i32 84, label %80
i32 116, label %80
i32 109, label %91
i32 99, label %102
i32 115, label %113
i32 101, label %124
i32 112, label %135
i32 104, label %137
i32 63, label %140
]
37: ; preds = %35
%38 = load i32, i32* @optarg
%39 = call i32 (i32, i8*, ...) @sscanf(i32 %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %24)
%40 = icmp ne i32 %39, 1
br i1 %40, label %41, label %44
41: ; preds = %37
%42 = load i32, i32* @stderr
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %57
44: ; preds = %37
%45 = load i32, i32* %24
%46 = icmp slt i32 %45, 0
br i1 %46, label %50, label %47
47: ; preds = %44
%48 = load i32, i32* %24
%49 = icmp sgt i32 %48, 4
br i1 %49, label %50, label %53
50: ; preds = %47, %44
%51 = load i32, i32* @stderr
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
br label %56
53: ; preds = %47
%54 = load i32, i32* %24
%55 = load i32*, i32** %21
store i32 %54, i32* %55
br label %56
56: ; preds = %53, %50
br label %57
57: ; preds = %56, %41
br label %143
58: ; preds = %35, %35
%59 = load i32, i32* @optarg
%60 = call i32 (i32, i8*, ...) @sscanf(i32 %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %24)
%61 = icmp ne i32 %60, 1
br i1 %61, label %62, label %65
62: ; preds = %58
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
br label %68
65: ; preds = %58
%66 = load i32, i32* %24
%67 = load i32*, i32** %14
store i32 %66, i32* %67
br label %68
68: ; preds = %65, %62
br label %143
69: ; preds = %35, %35
%70 = load i32, i32* @optarg
%71 = call i32 (i32, i8*, ...) @sscanf(i32 %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %24)
%72 = icmp ne i32 %71, 1
br i1 %72, label %73, label %76
73: ; preds = %69
%74 = load i32, i32* @stderr
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
br label %79
76: ; preds = %69
%77 = load i32, i32* %24
%78 = load i32*, i32** %15
store i32 %77, i32* %78
br label %79
79: ; preds = %76, %73
br label %143
80: ; preds = %35, %35
%81 = load i32, i32* @optarg
%82 = call i32 (i32, i8*, ...) @sscanf(i32 %81, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), double* %26)
%83 = icmp ne i32 %82, 1
br i1 %83, label %84, label %87
84: ; preds = %80
%85 = load i32, i32* @stderr
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %85, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0))
br label %90
87: ; preds = %80
%88 = load double, double* %26
%89 = load double*, double** %16
store double %88, double* %89
br label %90
90: ; preds = %87, %84
br label %143
91: ; preds = %35
%92 = load i32, i32* @optarg
%93 = call i32 (i32, i8*, ...) @sscanf(i32 %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32* %24)
%94 = icmp ne i32 %93, 1
br i1 %94, label %95, label %98
95: ; preds = %91
%96 = load i32, i32* @stderr
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
br label %101
98: ; preds = %91
%99 = load i32, i32* %24
%100 = load i32*, i32** %17
store i32 %99, i32* %100
br label %101
101: ; preds = %98, %95
br label %143
102: ; preds = %35
%103 = load i32, i32* @optarg
%104 = call i32 (i32, i8*, ...) @sscanf(i32 %103, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i64* %25)
%105 = icmp ne i32 %104, 1
br i1 %105, label %106, label %109
106: ; preds = %102
%107 = load i32, i32* @stderr
%108 = call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0))
br label %112
109: ; preds = %102
%110 = load i64, i64* %25
%111 = load i64*, i64** %18
store i64 %110, i64* %111
br label %112
112: ; preds = %109, %106
br label %143
113: ; preds = %35
%114 = load i32, i32* @optarg
%115 = call i32 (i32, i8*, ...) @sscanf(i32 %114, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), i64* %25)
%116 = icmp ne i32 %115, 1
br i1 %116, label %117, label %120
117: ; preds = %113
%118 = load i32, i32* @stderr
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %118, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.23, i64 0, i64 0))
br label %123
120: ; preds = %113
%121 = load i64, i64* %25
%122 = load i64*, i64** %19
store i64 %121, i64* %122
br label %123
123: ; preds = %120, %117
br label %143
124: ; preds = %35
%125 = load i32, i32* @optarg
%126 = call i32 (i32, i8*, ...) @sscanf(i32 %125, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32* %24)
%127 = icmp ne i32 %126, 1
br i1 %127, label %128, label %131
128: ; preds = %124
%129 = load i32, i32* @stderr
%130 = call i32 (i32, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.24, i64 0, i64 0))
br label %134
131: ; preds = %124
%132 = load i32, i32* %24
%133 = load i32*, i32** %20
store i32 %132, i32* %133
br label %134
134: ; preds = %131, %128
br label %143
135: ; preds = %35
%136 = load i32*, i32** %22
store i32 1, i32* %136
br label %143
137: ; preds = %35
%138 = call i32 (...) @help()
%139 = call i32 @exit(i32 -1)
unreachable
140: ; preds = %35
br label %143
141: ; preds = %35
%142 = call i32 (...) @abort()
unreachable
143: ; preds = %140, %135, %134, %123, %112, %101, %90, %79, %68, %57
br label %28
144: ; preds = %34
%145 = load i32*, i32** %14
%146 = load i32, i32* %145
%147 = icmp ne i32 %146, 2
br i1 %147, label %148, label %158
148: ; preds = %144
%149 = load i32*, i32** %22
%150 = load i32, i32* %149
%151 = icmp eq i32 %150, 1
br i1 %151, label %152, label %158
152: ; preds = %148
%153 = load i32, i32* @stderr
%154 = load i32*, i32** %14
%155 = load i32, i32* %154
%156 = call i32 (i32, i8*, ...) @fprintf(i32 %153, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.25, i64 0, i64 0), i32 %155)
%157 = load i32*, i32** %22
store i32 0, i32* %157
br label %158
158: ; preds = %152, %148, %144
ret i32 0
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32, i32 }
@parseinput.long_options = internal global [11 x %struct.option] [%struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8 -128, i32 0, i32 68 }, %struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8 -128, i32 0, i32 76 }, %struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 84 }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8 -128, i32 0, i32 109 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8 -128, i32 0, i32 99 }, %struct.option { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8 -128, i32 0, i32 115 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8 -128, i32 0, i32 101 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8 -128, i32 0, i32 121 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8 0, i32 0, i32 104 }, %struct.option { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i32 0, i32 0), i8 0, i32 0, i32 112 }, %struct.option zeroinitializer]
@.str = [2 x i8] c"d\00"
@.str.1 = [2 x i8] c"L\00"
@.str.2 = [2 x i8] c"T\00"
@.str.3 = [6 x i8] c"nmeas\00"
@.str.4 = [5 x i8] c"nmcs\00"
@.str.5 = [2 x i8] c"S\00"
@.str.6 = [4 x i8] c"ieq\00"
@.str.7 = [4 x i8] c"dyn\00"
@.str.8 = [5 x i8] c"help\00"
@.str.9 = [12 x i8] c"print-state\00"
@.str.10 = [23 x i8] c"hpD:d:l:L:T:t:m:c:s:y:\00"
@optarg = global i32 0
@.str.11 = [3 x i8] c"%d\00"
@stderr = global i32 0
@.str.12 = [28 x i8] c"Error parsing --dyn option\0A\00"
@.str.13 = [28 x i8] c"--dyn option should be 0-4\0A\00"
@.str.14 = [25 x i8] c"Error parsing -d option\0A\00"
@.str.15 = [25 x i8] c"Error parsing -L option\0A\00"
@.str.16 = [4 x i8] c"%lf\00"
@.str.17 = [25 x i8] c"Error parsing -T option\0A\00"
@.str.18 = [3 x i8] c"%i\00"
@.str.19 = [25 x i8] c"Error parsing -m option\0A\00"
@.str.20 = [5 x i8] c"%lud\00"
@.str.21 = [29 x i8] c"Error parsing --nmcs option\0A\00"
@.str.22 = [5 x i8] c"%lui\00"
@.str.23 = [25 x i8] c"Error parsing -s option\0A\00"
@.str.24 = [28 x i8] c"Error parsing --ieq option\0A\00"
@.str.25 = [58 x i8] c"States will not be printed as dimension is %d and not 2,\0A\00"
define i32 @parseinput(i32 %0, i8** %1, i32* nocapture %2, i32* nocapture writeonly %3, double* nocapture writeonly %4, i32* nocapture writeonly %5, i64* nocapture writeonly %6, i64* nocapture writeonly %7, i32* nocapture writeonly %8, i32* nocapture writeonly %9, i32* nocapture %10) {
%12 = alloca i32
%13 = alloca i64
%14 = alloca double
%15 = alloca i32
%16 = bitcast i32* %12 to i8*
%17 = bitcast i64* %13 to i8*
%18 = bitcast double* %14 to i8*
%19 = bitcast i32* %15 to i8*
br label %20
20: ; preds = %105, %11
store i32 0, i32* %15
%21 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), %struct.option* getelementptr inbounds ([11 x %struct.option], [11 x %struct.option]* @parseinput.long_options, i64 0, i64 0), i32* %15)
switch i32 %21, label %103 [
i32 -1, label %106
i32 121, label %22
i32 68, label %36
i32 100, label %36
i32 76, label %45
i32 108, label %45
i32 84, label %54
i32 116, label %54
i32 109, label %63
i32 99, label %72
i32 115, label %81
i32 101, label %90
i32 112, label %99
i32 104, label %100
i32 63, label %105
]
22: ; preds = %20
%23 = load i32, i32* @optarg
%24 = call i32 (i32, i8*, ...) @sscanf(i32 %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %12)
%25 = icmp eq i32 %24, 1
br i1 %25, label %29, label %26
26: ; preds = %22
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
br label %105
29: ; preds = %22
%30 = load i32, i32* %12
%31 = icmp ugt i32 %30, 4
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
br label %105
35: ; preds = %29
store i32 %30, i32* %9
br label %105
36: ; preds = %20, %20
%37 = load i32, i32* @optarg
%38 = call i32 (i32, i8*, ...) @sscanf(i32 %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %12)
%39 = icmp eq i32 %38, 1
br i1 %39, label %43, label %40
40: ; preds = %36
%41 = load i32, i32* @stderr
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0))
br label %105
43: ; preds = %36
%44 = load i32, i32* %12
store i32 %44, i32* %2
br label %105
45: ; preds = %20, %20
%46 = load i32, i32* @optarg
%47 = call i32 (i32, i8*, ...) @sscanf(i32 %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %12)
%48 = icmp eq i32 %47, 1
br i1 %48, label %52, label %49
49: ; preds = %45
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
br label %105
52: ; preds = %45
%53 = load i32, i32* %12
store i32 %53, i32* %3
br label %105
54: ; preds = %20, %20
%55 = load i32, i32* @optarg
%56 = call i32 (i32, i8*, ...) @sscanf(i32 %55, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), double* %14)
%57 = icmp eq i32 %56, 1
br i1 %57, label %61, label %58
58: ; preds = %54
%59 = load i32, i32* @stderr
%60 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0))
br label %105
61: ; preds = %54
%62 = load double, double* %14
store double %62, double* %4
br label %105
63: ; preds = %20
%64 = load i32, i32* @optarg
%65 = call i32 (i32, i8*, ...) @sscanf(i32 %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32* %12)
%66 = icmp eq i32 %65, 1
br i1 %66, label %70, label %67
67: ; preds = %63
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
br label %105
70: ; preds = %63
%71 = load i32, i32* %12
store i32 %71, i32* %5
br label %105
72: ; preds = %20
%73 = load i32, i32* @optarg
%74 = call i32 (i32, i8*, ...) @sscanf(i32 %73, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i64* %13)
%75 = icmp eq i32 %74, 1
br i1 %75, label %79, label %76
76: ; preds = %72
%77 = load i32, i32* @stderr
%78 = call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.21, i64 0, i64 0))
br label %105
79: ; preds = %72
%80 = load i64, i64* %13
store i64 %80, i64* %6
br label %105
81: ; preds = %20
%82 = load i32, i32* @optarg
%83 = call i32 (i32, i8*, ...) @sscanf(i32 %82, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), i64* %13)
%84 = icmp eq i32 %83, 1
br i1 %84, label %88, label %85
85: ; preds = %81
%86 = load i32, i32* @stderr
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.23, i64 0, i64 0))
br label %105
88: ; preds = %81
%89 = load i64, i64* %13
store i64 %89, i64* %7
br label %105
90: ; preds = %20
%91 = load i32, i32* @optarg
%92 = call i32 (i32, i8*, ...) @sscanf(i32 %91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32* %12)
%93 = icmp eq i32 %92, 1
br i1 %93, label %97, label %94
94: ; preds = %90
%95 = load i32, i32* @stderr
%96 = call i32 (i32, i8*, ...) @fprintf(i32 %95, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.24, i64 0, i64 0))
br label %105
97: ; preds = %90
%98 = load i32, i32* %12
store i32 %98, i32* %8
br label %105
99: ; preds = %20
store i32 1, i32* %10
br label %105
100: ; preds = %20
%101 = call i32 (...) @help()
%102 = call i32 @exit(i32 -1)
unreachable
103: ; preds = %20
%104 = call i32 (...) @abort()
unreachable
105: ; preds = %99, %32, %35, %26, %43, %40, %52, %49, %61, %58, %70, %67, %79, %76, %88, %85, %97, %94, %20
br label %20
106: ; preds = %20
%107 = load i32, i32* %2
%108 = icmp eq i32 %107, 2
br i1 %108, label %115, label %109
109: ; preds = %106
%110 = load i32, i32* %10
%111 = icmp eq i32 %110, 1
br i1 %111, label %112, label %115
112: ; preds = %109
%113 = load i32, i32* @stderr
%114 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.25, i64 0, i64 0), i32 %107)
store i32 0, i32* %10
br label %115
115: ; preds = %112, %109, %106
ret i32 0
}