#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ abort();
size_t atoi(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int getopt(int, char **, char *);
int /*<<< orphan*/ isprint(char);
char *optarg;
int optind;
char optopt;
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
void get_files(char **inputfile, char **outputfile, int argc, char *argv[],
               size_t filename_length, int *opt_l, size_t *line_num,
               char **line_highlight_file_h, char **line_highlight_file_v) {
  int index;
  int c;
  while ((c = getopt(argc, argv, "i:o:l:h:v:")) != -1) {
    switch (c) {
    case 'i':
      *inputfile = optarg;
      break;
    case 'o':
      *outputfile = optarg;
      break;
    case 'l':
      *opt_l = 1;
      *line_num = atoi(optarg);
      break;
    case 'h':
      *line_highlight_file_h = optarg;
      break;
    case 'v':
      *line_highlight_file_v = optarg;
      break;
    case '?':
      if (optopt == 'i' | optopt == 'o' | optopt == 'l' | optopt == 'h' |
          optopt == 'v')
        fprintf(stderr, "Option -%c requires an argument.\n", optopt);
      else if (isprint(optopt))
        fprintf(stderr, "Unknown option `-%c'.\n", optopt);
      else
        fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt);
      exit(1);
    default:
      abort();
    }
  }
  for (index = optind; index < argc; index++) {
    printf("Non-option argument %s\n", argv[index]);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<get_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
lea    0xf37(%rip),%rdx
call   1070 <getopt@plt>
mov    %eax,-0x38(%rbp)
cmp    $0xffffffff,%eax
je     137b <get_files+0x20b>
mov    -0x38(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x37,%eax
ja     136f <get_files+0x1ff>
mov    -0x40(%rbp),%rax
lea    0xe26(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e0e(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1376 <get_files+0x206>
mov    0x2df8(%rip),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    1376 <get_files+0x206>
mov    -0x30(%rbp),%rax
movl   $0x1,(%rax)
mov    0x2dd8(%rip),%rax
mov    (%rax),%rdi
call   1080 <atoi@plt>
mov    %rax,%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    1376 <get_files+0x206>
mov    0x2dba(%rip),%rax
mov    (%rax),%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    1376 <get_files+0x206>
mov    0x2da4(%rip),%rax
mov    (%rax),%rcx
mov    0x20(%rbp),%rax
mov    %rcx,(%rax)
jmp    1376 <get_files+0x206>
mov    0x2d76(%rip),%rax
movsbl (%rax),%eax
cmp    $0x69,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    0x2d61(%rip),%rcx
movsbl (%rcx),%ecx
cmp    $0x6f,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    0x2d49(%rip),%rcx
movsbl (%rcx),%ecx
cmp    $0x6c,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    0x2d31(%rip),%rcx
movsbl (%rcx),%ecx
cmp    $0x68,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    0x2d19(%rip),%rcx
movsbl (%rcx),%ecx
cmp    $0x76,%ecx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
je     1305 <get_files+0x195>
mov    0x2ce0(%rip),%rax
mov    (%rax),%edi
lea    0xdfa(%rip),%rsi
mov    0x2ce8(%rip),%rax
movsbl (%rax),%edx
call   1050 <fprintf@plt>
jmp    1365 <get_files+0x1f5>
mov    0x2cd4(%rip),%rax
movsbl (%rax),%edi
call   1060 <isprint@plt>
cmp    $0x0,%eax
je     1341 <get_files+0x1d1>
mov    0x2ca4(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
mov    0x2cac(%rip),%rax
movsbl (%rax),%edx
call   1050 <fprintf@plt>
jmp    1360 <get_files+0x1f0>
mov    0x2c80(%rip),%rax
mov    (%rax),%edi
lea    0xdd3(%rip),%rsi
mov    0x2c88(%rip),%rax
movsbl (%rax),%edx
call   1050 <fprintf@plt>
jmp    1365 <get_files+0x1f5>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    119b <get_files+0x2b>
mov    0x2c56(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13b5 <get_files+0x245>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xda0(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_files>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,0x10(%rsp)
mov    %rcx,%rbx
mov    %edx,%ebp
mov    %rsi,0x8(%rsp)
mov    %rdi,%r12
lea    0xf49(%rip),%r13
lea    0xe62(%rip),%r14
mov    0x2e53(%rip),%r15
jmp    11c0 <get_files+0x50>
mov    (%r15),%rax
mov    0x60(%rsp),%rcx
mov    %rax,(%rcx)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1070 <getopt@plt>
lea    -0x3f(%rax),%ecx
cmp    $0x37,%ecx
ja     121e <get_files+0xae>
movslq (%r14,%rcx,4),%rax
add    %r14,%rax
jmp    *%rax
mov    (%r15),%rax
mov    0x58(%rsp),%rcx
mov    %rax,(%rcx)
jmp    11c0 <get_files+0x50>
mov    (%r15),%rax
mov    %rax,(%r12)
jmp    11c0 <get_files+0x50>
mov    0x10(%rsp),%rax
movl   $0x1,(%rax)
mov    (%r15),%rdi
call   1080 <atoi@plt>
mov    0x50(%rsp),%rcx
mov    %rax,(%rcx)
jmp    11c0 <get_files+0x50>
mov    (%r15),%rax
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx)
jmp    11c0 <get_files+0x50>
cmp    $0xffffffff,%eax
jne    1240 <get_files+0xd0>
mov    0x2dae(%rip),%rax
movslq (%rax),%rax
cmp    %ebp,%eax
jl     12a8 <get_files+0x138>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1030 <abort@plt>
mov    0x2d92(%rip),%rbx
mov    (%rbx),%al
lea    -0x68(%rax),%ecx
cmp    $0xe,%cl
ja     1288 <get_files+0x118>
movzbl %cl,%ecx
mov    $0x4093,%edx
bt     %rcx,%rdx
jae    1288 <get_files+0x118>
lea    0xe7e(%rip),%rsi
mov    0x2d54(%rip),%rcx
mov    (%rcx),%edi
movsbl %al,%edx
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
movsbl %al,%edi
call   1060 <isprint@plt>
test   %eax,%eax
mov    (%rbx),%al
lea    0xe89(%rip),%rcx
lea    0xe6b(%rip),%rsi
cmove  %rcx,%rsi
jmp    126d <get_files+0xfd>
mov    (%rbx,%rax,8),%rsi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"i:o:l:h:v:\00"
@optarg = global i8* null
@optopt = global i8 0
@stderr = global i32 0
@.str.1 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.2 = [23 x i8] c"Unknown option `-%c'.\0A\00"
@.str.3 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@optind = global i32 0
@.str.4 = [24 x i8] c"Non-option argument %s\0A\00"
define void @get_files(i8** %0, i8** %1, i32 %2, i8** %3, i64 %4, i32* %5, i64* %6, i8** %7, i8** %8) {
%10 = alloca i8**
%11 = alloca i8**
%12 = alloca i32
%13 = alloca i8**
%14 = alloca i64
%15 = alloca i32*
%16 = alloca i64*
%17 = alloca i8**
%18 = alloca i8**
%19 = alloca i32
%20 = alloca i32
store i8** %0, i8*** %10
store i8** %1, i8*** %11
store i32 %2, i32* %12
store i8** %3, i8*** %13
store i64 %4, i64* %14
store i32* %5, i32** %15
store i64* %6, i64** %16
store i8** %7, i8*** %17
store i8** %8, i8*** %18
br label %21
21: ; preds = %92, %9
%22 = load i32, i32* %12
%23 = load i8**, i8*** %13
%24 = call i32 @getopt(i32 %22, i8** %23, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 %24, i32* %20
%25 = icmp ne i32 %24, -1
br i1 %25, label %26, label %93
26: ; preds = %21
%27 = load i32, i32* %20
switch i32 %27, label %90 [
i32 105, label %28
i32 111, label %31
i32 108, label %34
i32 104, label %39
i32 118, label %42
i32 63, label %45
]
28: ; preds = %26
%29 = load i8*, i8** @optarg
%30 = load i8**, i8*** %10
store i8* %29, i8** %30
br label %92
31: ; preds = %26
%32 = load i8*, i8** @optarg
%33 = load i8**, i8*** %11
store i8* %32, i8** %33
br label %92
34: ; preds = %26
%35 = load i32*, i32** %15
store i32 1, i32* %35
%36 = load i8*, i8** @optarg
%37 = call i64 @atoi(i8* %36)
%38 = load i64*, i64** %16
store i64 %37, i64* %38
br label %92
39: ; preds = %26
%40 = load i8*, i8** @optarg
%41 = load i8**, i8*** %17
store i8* %40, i8** %41
br label %92
42: ; preds = %26
%43 = load i8*, i8** @optarg
%44 = load i8**, i8*** %18
store i8* %43, i8** %44
br label %92
45: ; preds = %26
%46 = load i8, i8* @optopt
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 105
%49 = zext i1 %48 to i32
%50 = load i8, i8* @optopt
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 111
%53 = zext i1 %52 to i32
%54 = or i32 %49, %53
%55 = load i8, i8* @optopt
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 108
%58 = zext i1 %57 to i32
%59 = or i32 %54, %58
%60 = load i8, i8* @optopt
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 104
%63 = zext i1 %62 to i32
%64 = or i32 %59, %63
%65 = load i8, i8* @optopt
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 118
%68 = zext i1 %67 to i32
%69 = or i32 %64, %68
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %75
71: ; preds = %45
%72 = load i32, i32* @stderr
%73 = load i8, i8* @optopt
%74 = call i32 @fprintf(i32 %72, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8 signext %73)
br label %88
75: ; preds = %45
%76 = load i8, i8* @optopt
%77 = call i32 @isprint(i8 signext %76)
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %83
79: ; preds = %75
%80 = load i32, i32* @stderr
%81 = load i8, i8* @optopt
%82 = call i32 @fprintf(i32 %80, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8 signext %81)
br label %87
83: ; preds = %75
%84 = load i32, i32* @stderr
%85 = load i8, i8* @optopt
%86 = call i32 @fprintf(i32 %84, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8 signext %85)
br label %87
87: ; preds = %83, %79
br label %88
88: ; preds = %87, %71
%89 = call i32 @exit(i32 1)
unreachable
90: ; preds = %26
%91 = call i32 (...) @abort()
unreachable
92: ; preds = %42, %39, %34, %31, %28
br label %21
93: ; preds = %21
%94 = load i32, i32* @optind
store i32 %94, i32* %19
br label %95
95: ; preds = %107, %93
%96 = load i32, i32* %19
%97 = load i32, i32* %12
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %110
99: ; preds = %95
%100 = load i8**, i8*** %13
%101 = load i32, i32* %19
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i8*, i8** %100, i64 %102
%104 = load i8*, i8** %103
%105 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* %104)
%106 = call i32 @exit(i32 1)
unreachable
107: ; No predecessors!
%108 = load i32, i32* %19
%109 = add nsw i32 %108, 1
store i32 %109, i32* %19
br label %95
110: ; preds = %95
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"i:o:l:h:v:\00"
@optarg = global i8* null
@optopt = global i8 0
@stderr = global i32 0
@.str.1 = [34 x i8] c"Option -%c requires an argument.\0A\00"
@.str.2 = [23 x i8] c"Unknown option `-%c'.\0A\00"
@.str.3 = [34 x i8] c"Unknown option character `\\x%x'.\0A\00"
@optind = global i32 0
@.str.4 = [24 x i8] c"Non-option argument %s\0A\00"
define void @get_files(i8** nocapture writeonly %0, i8** nocapture writeonly %1, i32 %2, i8** %3, i64 %4, i32* nocapture writeonly %5, i64* nocapture writeonly %6, i8** nocapture writeonly %7, i8** nocapture writeonly %8) {
br label %10
10: ; preds = %23, %9
%11 = tail call i32 @getopt(i32 %2, i8** %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
switch i32 %11, label %37 [
i32 -1, label %39
i32 105, label %12
i32 111, label %14
i32 108, label %16
i32 104, label %19
i32 118, label %21
i32 63, label %24
]
12: ; preds = %10
%13 = load i8*, i8** @optarg
store i8* %13, i8** %0
br label %23
14: ; preds = %10
%15 = load i8*, i8** @optarg
store i8* %15, i8** %1
br label %23
16: ; preds = %10
store i32 1, i32* %5
%17 = load i8*, i8** @optarg
%18 = tail call i64 @atoi(i8* %17)
store i64 %18, i64* %6
br label %23
19: ; preds = %10
%20 = load i8*, i8** @optarg
store i8* %20, i8** %7
br label %23
21: ; preds = %10
%22 = load i8*, i8** @optarg
store i8* %22, i8** %8
br label %23
23: ; preds = %21, %19, %16, %14, %12
br label %10
24: ; preds = %10
%25 = load i8, i8* @optopt
switch i8 %25, label %26 [
i8 118, label %31
i8 111, label %31
i8 108, label %31
i8 105, label %31
i8 104, label %31
]
26: ; preds = %24
%27 = tail call i32 @isprint(i8 signext %25)
%28 = icmp eq i32 %27, 0
%29 = load i8, i8* @optopt
%30 = select i1 %28, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0)
br label %31
31: ; preds = %24, %24, %24, %24, %24, %26
%32 = phi i8 [ %29, %26 ], [ %25, %24 ], [ %25, %24 ], [ %25, %24 ], [ %25, %24 ], [ %25, %24 ]
%33 = phi i8* [ %30, %26 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), %24 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), %24 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), %24 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), %24 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), %24 ]
%34 = load i32, i32* @stderr
%35 = tail call i32 @fprintf(i32 %34, i8* %33, i8 signext %32)
%36 = tail call i32 @exit(i32 1)
unreachable
37: ; preds = %10
%38 = tail call i32 (...) @abort()
unreachable
39: ; preds = %10
%40 = load i32, i32* @optind
%41 = icmp slt i32 %40, %2
br i1 %41, label %42, label %48
42: ; preds = %39
%43 = sext i32 %40 to i64
%44 = getelementptr inbounds i8*, i8** %3, i64 %43
%45 = load i8*, i8** %44
%46 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* %45)
%47 = tail call i32 @exit(i32 1)
unreachable
48: ; preds = %39
ret void
}