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

/* Variables and functions */
int getopt_long(int, char **, char *, struct option *, int *);
int /*<<< orphan*/ grintf(char *, char *);
char *optarg;
int optind;
int /*<<< orphan*/ printf(char *, ...);
void getopt_long_test(int argc, char **argv) {
  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", 1, 0, 0},     {"append", 0, 0, 0},   {"delete", 1, 0, 0},
        {"verbose", 0, 0, 0}, {"create", 1, 0, 'c'}, {"file", 1, 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 '?':
      break;
    default:
      printf("?? getopt returned character code 0%o ??\n", c);
    }
  }
  if (optind < argc) {
    printf("non-option ARGV-elements: ");
    while (optind < argc)
      grintf("%s ", argv[optind++]);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<getopt_long_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    0x2e93(%rip),%rax
cmpl   $0x0,(%rax)
je     1167 <getopt_long_test+0x37>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    1174 <getopt_long_test+0x44>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1174 <getopt_long_test+0x44>
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe97(%rip),%rdx
lea    0x2eaa(%rip),%rcx
lea    -0x20(%rbp),%r8
call   1040 <getopt_long@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    11b1 <getopt_long_test+0x81>
jmp    1348 <getopt_long_test+0x218>
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
test   %eax,%eax
je     122d <getopt_long_test+0xfd>
jmp    11c4 <getopt_long_test+0x94>
mov    -0x28(%rbp),%eax
add    $0xffffffd0,%eax
sub    $0x3,%eax
jb     128d <getopt_long_test+0x15d>
jmp    11d8 <getopt_long_test+0xa8>
mov    -0x28(%rbp),%eax
sub    $0x3f,%eax
je     132d <getopt_long_test+0x1fd>
jmp    11e9 <getopt_long_test+0xb9>
mov    -0x28(%rbp),%eax
sub    $0x61,%eax
je     12cd <getopt_long_test+0x19d>
jmp    11fa <getopt_long_test+0xca>
mov    -0x28(%rbp),%eax
sub    $0x62,%eax
je     12e0 <getopt_long_test+0x1b0>
jmp    120b <getopt_long_test+0xdb>
mov    -0x28(%rbp),%eax
sub    $0x63,%eax
je     12f3 <getopt_long_test+0x1c3>
jmp    121c <getopt_long_test+0xec>
mov    -0x28(%rbp),%eax
sub    $0x64,%eax
je     1310 <getopt_long_test+0x1e0>
jmp    1332 <getopt_long_test+0x202>
movslq -0x20(%rbp),%rcx
lea    0x2e08(%rip),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rsi
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2da0(%rip),%rax
cmpq   $0x0,(%rax)
je     127a <getopt_long_test+0x14a>
mov    0x2d8f(%rip),%rax
mov    (%rax),%rsi
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe2b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1343 <getopt_long_test+0x213>
cmpl   $0x0,-0x18(%rbp)
je     12b1 <getopt_long_test+0x181>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     12b1 <getopt_long_test+0x181>
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xdb4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1343 <getopt_long_test+0x213>
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1343 <getopt_long_test+0x213>
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1343 <getopt_long_test+0x213>
mov    0x2cfe(%rip),%rax
mov    (%rax),%rsi
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1343 <getopt_long_test+0x213>
mov    0x2ce1(%rip),%rax
mov    (%rax),%rsi
lea    0xd8d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1343 <getopt_long_test+0x213>
jmp    1343 <getopt_long_test+0x213>
mov    -0x14(%rbp),%esi
lea    0xd8c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1146 <getopt_long_test+0x16>
mov    0x2c91(%rip),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
jge    13bb <getopt_long_test+0x28b>
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2c71(%rip),%rax
mov    (%rax),%eax
cmp    -0x4(%rbp),%eax
jge    13ad <getopt_long_test+0x27d>
mov    -0x10(%rbp),%rax
mov    0x2c5b(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    0x2c4d(%rip),%rdx
mov    %esi,(%rdx)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd6a(%rip),%rdi
call   1030 <grintf@plt>
jmp    1368 <getopt_long_test+0x238>
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e7e(%rip),%rax
xor    %r15d,%r15d
jmp    118d <getopt_long_test+0x3d>
nopw   0x0(%rax,%rax,1)
lea    0xfa4(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12d,%r15d
mov    %rbx,%rax
mov    %rbp,%rsi
mov    %r14d,%edi
mov    %rax,%rbx
mov    (%rax),%r12d
test   %r12d,%r12d
mov    $0x1,%eax
cmove  %eax,%r12d
movl   $0x0,0x4(%rsp)
mov    %edi,%r14d
mov    %rsi,%rbp
lea    0xf46(%rip),%rdx
lea    0x2e95(%rip),%rcx
lea    0x4(%rsp),%r8
call   1060 <getopt_long@plt>
mov    %eax,%r13d
lea    -0x30(%r13),%eax
cmp    $0x34,%eax
ja     11fc <getopt_long_test+0xac>
lea    0xe28(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
test   %r15d,%r15d
je     1170 <getopt_long_test+0x20>
cmp    %r12d,%r15d
je     1170 <getopt_long_test+0x20>
lea    0xfc3(%rip),%rdi
call   1040 <puts@plt>
jmp    1170 <getopt_long_test+0x20>
test   %r13d,%r13d
je     126b <getopt_long_test+0x11b>
cmp    $0xffffffff,%r13d
je     12ba <getopt_long_test+0x16a>
lea    0xf48(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1184 <getopt_long_test+0x34>
lea    0xf84(%rip),%rdi
jmp    1231 <getopt_long_test+0xe1>
lea    0xf72(%rip),%rdi
call   1040 <puts@plt>
jmp    1184 <getopt_long_test+0x34>
mov    0x2db6(%rip),%rax
mov    (%rax),%rsi
lea    0xeda(%rip),%rdi
jmp    125f <getopt_long_test+0x10f>
mov    0x2da3(%rip),%rax
mov    (%rax),%rsi
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1184 <getopt_long_test+0x34>
movslq 0x4(%rsp),%rax
shl    $0x5,%rax
lea    0x2dd5(%rip),%rcx
mov    0x10(%rax,%rcx,1),%rsi
lea    0xe7d(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2d63(%rip),%rax
mov    (%rax),%rsi
test   %rsi,%rsi
je     12ab <getopt_long_test+0x15b>
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1184 <getopt_long_test+0x34>
cmp    %r14d,(%rbx)
jge    1305 <getopt_long_test+0x1b5>
mov    %r14d,%r15d
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    (%rbx),%eax
cmp    %r14d,%eax
jge    12fb <getopt_long_test+0x1ab>
lea    0xec1(%rip),%r14
xchg   %ax,%ax
lea    0x1(%rax),%ecx
mov    %ecx,(%rbx)
cltq
mov    0x0(%rbp,%rax,8),%rsi
mov    %r14,%rdi
call   1050 <grintf@plt>
mov    (%rbx),%eax
cmp    %r15d,%eax
jl     12e0 <getopt_long_test+0x190>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option = type { i8*, i32, i8, i8*, i32 }
@optind = global i32 0
@getopt_long_test.long_options = internal global [7 x %struct.option] [%struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 1, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i32 0, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i32 1, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i32 0, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i32 1, i8 0, i8* inttoptr (i64 99 to i8*), i32 0 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i32 1, i8 0, i8* null, 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 = [10 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"
@.str.16 = [42 x i8] c"?? getopt returned character code 0%o ??\0A\00"
@.str.17 = [27 x i8] c"non-option ARGV-elements: \00"
@.str.18 = [4 x i8] c"%s \00"
define void @getopt_long_test(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %6
br label %9
9: ; preds = %2, %66
%10 = load i32, i32* @optind
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* @optind
br label %15
14: ; preds = %9
br label %15
15: ; preds = %14, %12
%16 = phi i32 [ %13, %12 ], [ 1, %14 ]
store i32 %16, i32* %7
store i32 0, i32* %8
%17 = load i32, i32* %3
%18 = load i8**, i8*** %4
%19 = call i32 @getopt_long(i32 %17, i8** %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), %struct.option* getelementptr inbounds ([7 x %struct.option], [7 x %struct.option]* @getopt_long_test.long_options, i64 0, i64 0), i32* %8)
store i32 %19, i32* %5
%20 = load i32, i32* %5
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %23
22: ; preds = %15
br label %67
23: ; preds = %15
%24 = load i32, i32* %5
switch i32 %24, label %63 [
i32 0, label %25
i32 48, label %39
i32 49, label %39
i32 50, label %39
i32 97, label %52
i32 98, label %54
i32 99, label %56
i32 100, label %59
i32 63, label %62
]
25: ; preds = %23
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [7 x %struct.option], [7 x %struct.option]* @getopt_long_test.long_options, i64 0, i64 %27
%29 = getelementptr inbounds %struct.option, %struct.option* %28, i32 0, i32 3
%30 = load i8*, i8** %29
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %30)
%32 = load i8*, i8** @optarg
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %37
34: ; preds = %25
%35 = load i8*, i8** @optarg
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* %35)
br label %37
37: ; preds = %34, %25
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %66
39: ; preds = %23, %23, %23
%40 = load i32, i32* %6
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %48
42: ; preds = %39
%43 = load i32, i32* %6
%44 = load i32, i32* %7
%45 = icmp ne i32 %43, %44
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0))
br label %48
48: ; preds = %46, %42, %39
%49 = load i32, i32* %7
store i32 %49, i32* %6
%50 = load i32, i32* %5
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %50)
br label %66
52: ; preds = %23
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
br label %66
54: ; preds = %23
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %66
56: ; preds = %23
%57 = load i8*, i8** @optarg
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i8* %57)
br label %66
59: ; preds = %23
%60 = load i8*, i8** @optarg
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0), i8* %60)
br label %66
62: ; preds = %23
br label %66
63: ; preds = %23
%64 = load i32, i32* %5
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.16, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %63, %62, %59, %56, %54, %52, %48, %37
br label %9
67: ; preds = %22
%68 = load i32, i32* @optind
%69 = load i32, i32* %3
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %87
71: ; preds = %67
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0))
br label %73
73: ; preds = %77, %71
%74 = load i32, i32* @optind
%75 = load i32, i32* %3
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %85
77: ; preds = %73
%78 = load i8**, i8*** %4
%79 = load i32, i32* @optind
%80 = add nsw i32 %79, 1
store i32 %80, i32* @optind
%81 = sext i32 %79 to i64
%82 = getelementptr inbounds i8*, i8** %78, i64 %81
%83 = load i8*, i8** %82
%84 = call i32 @grintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* %83)
br label %73
85: ; preds = %73
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %87
87: ; preds = %85, %67
ret void
}

LLVM IR (-O2):
%struct.option = type { i8*, i32, i8, i8*, i32 }
@optind = global i32 0
@getopt_long_test.long_options = internal global [7 x %struct.option] [%struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 1, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i32 0, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0), i32 1, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i32 0, i8 0, i8* null, i32 0 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i32 1, i8 0, i8* inttoptr (i64 99 to i8*), i32 0 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i32 1, i8 0, i8* null, 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 = [10 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"
@.str.16 = [42 x i8] c"?? getopt returned character code 0%o ??\0A\00"
@.str.17 = [27 x i8] c"non-option ARGV-elements: \00"
@.str.18 = [4 x i8] c"%s \00"
@str = [9 x i8] c"option b\00"
@str.19 = [9 x i8] c"option a\00"
@str.20 = [45 x i8] c"digits occur in two different argv-elements.\00"
define void @getopt_long_test(i32 %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
br label %5
5: ; preds = %43, %2
%6 = phi i32 [ 0, %2 ], [ %44, %43 ]
%7 = load i32, i32* @optind
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 1, i32 %7
store i32 0, i32* %3
%10 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), %struct.option* getelementptr inbounds ([7 x %struct.option], [7 x %struct.option]* @getopt_long_test.long_options, i64 0, i64 0), i32* %3)
switch i32 %10, label %41 [
i32 -1, label %45
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 %43
]
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]* @getopt_long_test.long_options, i64 0, i64 %13, i32 3
%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 %43
23: ; preds = %5, %5, %5
%24 = icmp eq i32 %6, 0
%25 = icmp eq i32 %6, %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.20, 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 %43
31: ; preds = %5
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.19, i64 0, i64 0))
br label %43
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 %43
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 %43
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 %43
41: ; preds = %5
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.16, i64 0, i64 0), i32 %10)
br label %43
43: ; preds = %21, %29, %31, %33, %35, %38, %41, %5
%44 = phi i32 [ %6, %41 ], [ %6, %38 ], [ %6, %35 ], [ %6, %33 ], [ %6, %31 ], [ %9, %29 ], [ %6, %21 ], [ %6, %5 ]
br label %5
45: ; preds = %5
%46 = load i32, i32* @optind
%47 = icmp slt i32 %46, %0
br i1 %47, label %48, label %63
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0))
%50 = load i32, i32* @optind
%51 = icmp slt i32 %50, %0
br i1 %51, label %52, label %61
52: ; preds = %48, %52
%53 = phi i32 [ %59, %52 ], [ %50, %48 ]
%54 = add nsw i32 %53, 1
store i32 %54, i32* @optind
%55 = sext i32 %53 to i64
%56 = getelementptr inbounds i8*, i8** %1, i64 %55
%57 = load i8*, i8** %56
%58 = call i32 @grintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* %57)
%59 = load i32, i32* @optind
%60 = icmp slt i32 %59, %0
br i1 %60, label %52, label %61
61: ; preds = %52, %48
%62 = call i32 @putchar(i32 10)
br label %63
63: ; preds = %61, %45
ret void
}