#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;
  char *name;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ const member_1;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt_long(int, char *const *, char *, struct option *, int *);
#define no_argument 129
char *optarg;
scalar_t__ opterr;
int optind;
int optopt;
int /*<<< orphan*/ printf(char *, ...);
#define required_argument 128
int /*<<< orphan*/ stderr;
int main(int argc, char *const *argv) {
  opterr = 0;
  optind = 0;
  int c;
  int digit_optind = 0;
  while (1) {
    int this_option_optind = optind ? optind : 1;
    int option_index = 0;
    static struct option long_options[] = {
        {"add", required_argument, 0, 0},
        {"append", no_argument, 0, 0},
        {"delete", required_argument, 0, 0},
        {"verbose", no_argument, 0, 0},
        {"create", required_argument, 0, 'c'},
        {"file", required_argument, 0, 0},
        {0, 0, 0, 0}};
    c = getopt_long(argc, argv, "-:abc:d:012", long_options, &option_index);
    if (c == -1)
      break;
    switch (c) {
    case 0:
      printf("option %s", long_options[option_index].name);
      if (optarg)
        printf(" with arg %s", optarg);
      printf("\n");
      break;
    case '0':
    case '1':
    case '2':
      if (digit_optind != 0 && digit_optind != this_option_optind)
        printf("digits occur in two different argv-elements.\n");
      digit_optind = this_option_optind;
      printf("option %c\n", c);
      break;
    case 'a':
      printf("option a\n");
      break;
    case 'b':
      printf("option b\n");
      break;
    case 'c':
      printf("option c with value '%s'\n", optarg);
      break;
    case 'd':
      printf("option d with value '%s'\n", optarg);
      break;
    case '?':
      fprintf(stderr, "Unrecognized option `%c' (%d).\n", optopt, (int)optopt);
      break;
    case ':':
      fprintf(stderr, "Missed option argument.\n");
      break;
    case 01:
      printf("Positional argument: \"%s\".\n", optarg);
      break;
    default:
      printf("?? getopt returned character code 0%o ??\n", c);
    }
  }
  if (optind < argc) {
    printf("non-option ARGV-elements: ");
    while (optind < argc)
      printf("%s ", argv[optind++]);
    printf("\n");
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e63(%rip),%rax
movq   $0x0,(%rax)
mov    0x2e6d(%rip),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x18(%rbp)
mov    0x2e59(%rip),%rax
cmpl   $0x0,(%rax)
je     1199 <main+0x59>
mov    0x2e49(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    11a6 <main+0x66>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a6 <main+0x66>
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xff9(%rip),%rdx
lea    0x2e88(%rip),%rcx
lea    -0x20(%rbp),%r8
call   1030 <getopt_long@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    11e3 <main+0xa3>
jmp    1385 <main+0x245>
mov    -0x14(%rbp),%eax
mov    %rax,-0x30(%rbp)
sub    $0x64,%rax
ja     136f <main+0x22f>
mov    -0x30(%rbp),%rax
lea    0xe01(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq -0x20(%rbp),%rcx
lea    0x2e3d(%rip),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rsi
lea    0xfa1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dc5(%rip),%rax
cmpq   $0x0,(%rax)
je     1255 <main+0x115>
mov    0x2db4(%rip),%rax
mov    (%rax),%rsi
lea    0xf82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfe6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1380 <main+0x240>
cmpl   $0x0,-0x18(%rbp)
je     128c <main+0x14c>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     128c <main+0x14c>
lea    0xf58(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xf6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1380 <main+0x240>
lea    0xf67(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1380 <main+0x240>
lea    0xf5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1380 <main+0x240>
mov    0x2d23(%rip),%rax
mov    (%rax),%rsi
lea    0xf4b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1380 <main+0x240>
mov    0x2d06(%rip),%rax
mov    (%rax),%rsi
lea    0xf48(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1380 <main+0x240>
mov    0x2cb9(%rip),%rax
mov    (%rax),%edi
mov    0x2cc8(%rip),%rax
mov    (%rax),%edx
mov    0x2cbf(%rip),%rax
mov    (%rax),%ecx
lea    0xf34(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1380 <main+0x240>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
lea    0xf38(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1380 <main+0x240>
mov    0x2c9f(%rip),%rax
mov    (%rax),%rsi
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1380 <main+0x240>
mov    -0x14(%rbp),%esi
lea    0xf3a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1178 <main+0x38>
mov    0x2c4c(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    13fa <main+0x2ba>
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2c2c(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    13ec <main+0x2ac>
mov    -0x10(%rbp),%rax
mov    0x2c16(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    0x2c08(%rip),%rdx
mov    %esi,(%rdx)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13a5 <main+0x265>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2bb7(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e49(%rip),%rax
movq   $0x0,(%rax)
mov    0x2e53(%rip),%rax
movl   $0x0,(%rax)
lea    0xe6e(%rip),%r14
xor    %eax,%eax
xor    %r15d,%r15d
jmp    11c0 <main+0x60>
mov    0x2e58(%rip),%rax
mov    (%rax),%rsi
lea    0x1042(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15d,%r12d
mov    0x2e1d(%rip),%rax
mov    (%rax),%eax
mov    %r12d,%r15d
test   %eax,%eax
mov    %eax,%r12d
mov    $0x1,%eax
cmove  %eax,%r12d
movl   $0x0,0x4(%rsp)
mov    %ebp,%edi
mov    %rbx,%rsi
lea    0xfdc(%rip),%rdx
lea    0x2e77(%rip),%rcx
lea    0x4(%rsp),%r8
call   1050 <getopt_long@plt>
mov    %eax,%r13d
add    $0x1,%eax
cmp    $0x65,%eax
ja     1299 <main+0x139>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
test   %r15d,%r15d
je     1221 <main+0xc1>
cmp    %r12d,%r15d
je     1221 <main+0xc1>
lea    0x10b4(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb9(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    11b4 <main+0x54>
movslq 0x4(%rsp),%rax
shl    $0x5,%rax
lea    0x2e1c(%rip),%rcx
mov    0x10(%rax,%rcx,1),%rsi
lea    0xf7a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%rsi
test   %rsi,%rsi
je     1274 <main+0x114>
lea    0xf67(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11b1 <main+0x51>
mov    0x2d6e(%rip),%rax
mov    (%rax),%rsi
lea    0xfc5(%rip),%rdi
jmp    11aa <main+0x4a>
lea    0xfd5(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    11b1 <main+0x51>
mov    0x2d12(%rip),%rax
mov    (%rax),%edi
lea    0xf81(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    11b1 <main+0x51>
mov    0x2cf6(%rip),%rax
mov    (%rax),%edi
mov    0x2d05(%rip),%rax
mov    (%rax),%ecx
lea    0xf3c(%rip),%rsi
mov    %ecx,%edx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    11b1 <main+0x51>
lea    0xfce(%rip),%rdi
call   1040 <puts@plt>
jmp    11b1 <main+0x51>
lea    0xfb4(%rip),%rdi
call   1040 <puts@plt>
jmp    11b1 <main+0x51>
mov    0x2cdd(%rip),%rax
mov    (%rax),%rsi
lea    0xee1(%rip),%rdi
jmp    11aa <main+0x4a>
mov    0x2ca7(%rip),%r15
cmp    %ebp,(%r15)
jge    1387 <main+0x227>
lea    0xf62(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r15),%eax
cmp    %ebp,%eax
jge    137d <main+0x21d>
lea    0xf68(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rax),%ecx
mov    %ecx,(%r15)
cltq
mov    (%rbx,%rax,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    (%r15),%eax
cmp    %ebp,%eax
jl     1360 <main+0x200>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2c2a(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

LLVM IR (-O0):
%struct.option = type { i8*, i8, i8*, i32, i32 }
@opterr = global i64 0
@optind = global i32 0
@main.long_options = internal global [7 x %struct.option] [%struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8 -128, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8 -127, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8 -128, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8 -127, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8 -128, i8* null, i32 99, i32 0 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8 -128, i8* null, i32 0, i32 0 }, %struct.option zeroinitializer]
@.str = [4 x i8] c"add\00"
@.str.1 = [7 x i8] c"append\00"
@.str.2 = [7 x i8] c"delete\00"
@.str.3 = [8 x i8] c"verbose\00"
@.str.4 = [7 x i8] c"create\00"
@.str.5 = [5 x i8] c"file\00"
@.str.6 = [12 x i8] c"-:abc:d:012\00"
@.str.7 = [10 x i8] c"option %s\00"
@optarg = global i8* null
@.str.8 = [13 x i8] c" with arg %s\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [46 x i8] c"digits occur in two different argv-elements.\0A\00"
@.str.11 = [11 x i8] c"option %c\0A\00"
@.str.12 = [10 x i8] c"option a\0A\00"
@.str.13 = [10 x i8] c"option b\0A\00"
@.str.14 = [26 x i8] c"option c with value '%s'\0A\00"
@.str.15 = [26 x i8] c"option d with value '%s'\0A\00"
@stderr = global i32 0
@.str.16 = [32 x i8] c"Unrecognized option `%c' (%d).\0A\00"
@optopt = global i32 0
@.str.17 = [25 x i8] c"Missed option argument.\0A\00"
@.str.18 = [28 x i8] c"Positional argument: \22%s\22.\0A\00"
@.str.19 = [42 x i8] c"?? getopt returned character code 0%o ??\0A\00"
@.str.20 = [27 x i8] c"non-option ARGV-elements: \00"
@.str.21 = [4 x i8] c"%s \00"
@EXIT_SUCCESS = global i32 0
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 i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 0, i64* @opterr
store i32 0, i32* @optind
store i32 0, i32* %7
br label %10
10: ; preds = %2, %77
%11 = load i32, i32* @optind
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* @optind
br label %16
15: ; preds = %10
br label %16
16: ; preds = %15, %13
%17 = phi i32 [ %14, %13 ], [ 1, %15 ]
store i32 %17, i32* %8
store i32 0, i32* %9
%18 = load i32, i32* %4
%19 = load i8**, i8*** %5
%20 = call i32 @getopt_long(i32 %18, i8** %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), %struct.option* getelementptr inbounds ([7 x %struct.option], [7 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %9)
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = icmp eq i32 %21, -1
br i1 %22, label %23, label %24
23: ; preds = %16
br label %78
24: ; preds = %16
%25 = load i32, i32* %6
switch i32 %25, label %74 [
i32 0, label %26
i32 48, label %40
i32 49, label %40
i32 50, label %40
i32 97, label %53
i32 98, label %55
i32 99, label %57
i32 100, label %60
i32 63, label %63
i32 58, label %68
i32 1, label %71
]
26: ; preds = %24
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [7 x %struct.option], [7 x %struct.option]* @main.long_options, i64 0, i64 %28
%30 = getelementptr inbounds %struct.option, %struct.option* %29, i32 0, i32 2
%31 = load i8*, i8** %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %31)
%33 = load i8*, i8** @optarg
%34 = icmp ne i8* %33, null
br i1 %34, label %35, label %38
35: ; preds = %26
%36 = load i8*, i8** @optarg
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* %36)
br label %38
38: ; preds = %35, %26
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %77
40: ; preds = %24, %24, %24
%41 = load i32, i32* %7
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = load i32, i32* %7
%45 = load i32, i32* %8
%46 = icmp ne i32 %44, %45
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0))
br label %49
49: ; preds = %47, %43, %40
%50 = load i32, i32* %8
store i32 %50, i32* %7
%51 = load i32, i32* %6
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %51)
br label %77
53: ; preds = %24
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
br label %77
55: ; preds = %24
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %77
57: ; preds = %24
%58 = load i8*, i8** @optarg
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i8* %58)
br label %77
60: ; preds = %24
%61 = load i8*, i8** @optarg
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i8* %61)
br label %77
63: ; preds = %24
%64 = load i32, i32* @stderr
%65 = load i32, i32* @optopt
%66 = load i32, i32* @optopt
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0), i32 %65, i32 %66)
br label %77
68: ; preds = %24
%69 = load i32, i32* @stderr
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0))
br label %77
71: ; preds = %24
%72 = load i8*, i8** @optarg
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.18, i64 0, i64 0), i8* %72)
br label %77
74: ; preds = %24
%75 = load i32, i32* %6
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.19, i64 0, i64 0), i32 %75)
br label %77
77: ; preds = %74, %71, %68, %63, %60, %57, %55, %53, %49, %38
br label %10
78: ; preds = %23
%79 = load i32, i32* @optind
%80 = load i32, i32* %4
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %98
82: ; preds = %78
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0))
br label %84
84: ; preds = %88, %82
%85 = load i32, i32* @optind
%86 = load i32, i32* %4
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %96
88: ; preds = %84
%89 = load i8**, i8*** %5
%90 = load i32, i32* @optind
%91 = add nsw i32 %90, 1
store i32 %91, i32* @optind
%92 = sext i32 %90 to i64
%93 = getelementptr inbounds i8*, i8** %89, i64 %92
%94 = load i8*, i8** %93
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i8* %94)
br label %84
96: ; preds = %84
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %98
98: ; preds = %96, %78
%99 = load i32, i32* @EXIT_SUCCESS
%100 = call i32 @exit(i32 %99)
unreachable
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i8*, i32, i32 }
@opterr = global i64 0
@optind = global i32 0
@main.long_options = internal global [7 x %struct.option] [%struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8 -128, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8 -127, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i8 -128, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8 -127, i8* null, i32 0, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8 -128, i8* null, i32 99, i32 0 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8 -128, i8* null, i32 0, i32 0 }, %struct.option zeroinitializer]
@.str = [4 x i8] c"add\00"
@.str.1 = [7 x i8] c"append\00"
@.str.2 = [7 x i8] c"delete\00"
@.str.3 = [8 x i8] c"verbose\00"
@.str.4 = [7 x i8] c"create\00"
@.str.5 = [5 x i8] c"file\00"
@.str.6 = [12 x i8] c"-:abc:d:012\00"
@.str.7 = [10 x i8] c"option %s\00"
@optarg = global i8* null
@.str.8 = [13 x i8] c" with arg %s\00"
@.str.11 = [11 x i8] c"option %c\0A\00"
@.str.14 = [26 x i8] c"option c with value '%s'\0A\00"
@.str.15 = [26 x i8] c"option d with value '%s'\0A\00"
@stderr = global i32 0
@.str.16 = [32 x i8] c"Unrecognized option `%c' (%d).\0A\00"
@optopt = global i32 0
@.str.17 = [25 x i8] c"Missed option argument.\0A\00"
@.str.18 = [28 x i8] c"Positional argument: \22%s\22.\0A\00"
@.str.19 = [42 x i8] c"?? getopt returned character code 0%o ??\0A\00"
@.str.20 = [27 x i8] c"non-option ARGV-elements: \00"
@.str.21 = [4 x i8] c"%s \00"
@EXIT_SUCCESS = global i32 0
@str = [9 x i8] c"option b\00"
@str.22 = [9 x i8] c"option a\00"
@str.23 = [45 x i8] c"digits occur in two different argv-elements.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
store i64 0, i64* @opterr
store i32 0, i32* @optind
%4 = bitcast i32* %3 to i8*
br label %5
5: ; preds = %53, %2
%6 = phi i32 [ 0, %2 ], [ %55, %53 ]
%7 = phi i32 [ 0, %2 ], [ %54, %53 ]
%8 = icmp eq i32 %6, 0
%9 = select i1 %8, i32 1, i32 %6
store i32 0, i32* %3
%10 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), %struct.option* getelementptr inbounds ([7 x %struct.option], [7 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %3)
switch i32 %10, label %51 [
i32 -1, label %56
i32 0, label %11
i32 48, label %23
i32 49, label %23
i32 50, label %23
i32 97, label %31
i32 98, label %33
i32 99, label %35
i32 100, label %38
i32 63, label %41
i32 58, label %45
i32 1, label %48
]
11: ; preds = %5
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [7 x %struct.option], [7 x %struct.option]* @main.long_options, i64 0, i64 %13, i32 2
%15 = load i8*, i8** %14
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** @optarg
%18 = icmp eq i8* %17, null
br i1 %18, label %21, label %19
19: ; preds = %11
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* %17)
br label %21
21: ; preds = %19, %11
%22 = call i32 @putchar(i32 10)
br label %53
23: ; preds = %5, %5, %5
%24 = icmp eq i32 %7, 0
%25 = icmp eq i32 %7, %9
%26 = select i1 %24, i1 true, i1 %25
br i1 %26, label %29, label %27
27: ; preds = %23
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.23, i64 0, i64 0))
br label %29
29: ; preds = %27, %23
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %10)
br label %53
31: ; preds = %5
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.22, i64 0, i64 0))
br label %53
33: ; preds = %5
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %53
35: ; preds = %5
%36 = load i8*, i8** @optarg
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i8* %36)
br label %53
38: ; preds = %5
%39 = load i8*, i8** @optarg
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i8* %39)
br label %53
41: ; preds = %5
%42 = load i32, i32* @stderr
%43 = load i32, i32* @optopt
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0), i32 %43, i32 %43)
br label %53
45: ; preds = %5
%46 = load i32, i32* @stderr
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.17, i64 0, i64 0))
br label %53
48: ; preds = %5
%49 = load i8*, i8** @optarg
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.18, i64 0, i64 0), i8* %49)
br label %53
51: ; preds = %5
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.19, i64 0, i64 0), i32 %10)
br label %53
53: ; preds = %21, %29, %31, %33, %35, %38, %41, %45, %48, %51
%54 = phi i32 [ %7, %51 ], [ %7, %48 ], [ %7, %45 ], [ %7, %41 ], [ %7, %38 ], [ %7, %35 ], [ %7, %33 ], [ %7, %31 ], [ %9, %29 ], [ %7, %21 ]
%55 = load i32, i32* @optind
br label %5
56: ; preds = %5
%57 = load i32, i32* @optind
%58 = icmp slt i32 %57, %0
br i1 %58, label %59, label %74
59: ; preds = %56
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0))
%61 = load i32, i32* @optind
%62 = icmp slt i32 %61, %0
br i1 %62, label %63, label %72
63: ; preds = %59, %63
%64 = phi i32 [ %70, %63 ], [ %61, %59 ]
%65 = add nsw i32 %64, 1
store i32 %65, i32* @optind
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds i8*, i8** %1, i64 %66
%68 = load i8*, i8** %67
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i8* %68)
%70 = load i32, i32* @optind
%71 = icmp slt i32 %70, %0
br i1 %71, label %63, label %72
72: ; preds = %63, %59
%73 = call i32 @putchar(i32 10)
br label %74
74: ; preds = %72, %56
%75 = load i32, i32* @EXIT_SUCCESS
%76 = call i32 @exit(i32 %75)
unreachable
}