#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int getopt(int, char **, char *);
char *optarg;
int optind;
int /*<<< orphan*/ output_mib(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ output_raw(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
scalar_t__ read_mac(char *, unsigned char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  unsigned char macaddr[6];
  int mib = 0;
  char *outfile = "mac.dat";
  FILE *fp;
  int c, err;
  err = 0;
  while ((c = getopt(argc, argv, "bmo:")) != -1) {
    switch (c) {
    case 'b':
      mib = 0;
      break;
    case 'm':
      mib = 1;
      break;
    case 'o':
      outfile = optarg;
      break;
    default:
      err++;
    }
  }
  if (optind >= argc) {
    fprintf(stderr, "Expected MAC address\n");
    err++;
  }
  if (err) {
    fprintf(stderr, "Usage:\n");
    fprintf(stderr, "    genmacmib [options] xx:xx:xx:xx:xx:xx\n");
    fprintf(stderr,
            "        Generate a binary containing the given MAC address\n");
    fprintf(stderr, "        The file can be raw binary or a UniFi MIB\n");
    fprintf(stderr, "    Options:\n");
    fprintf(stderr, "        -b        Generate a raw binary file (default)\n");
    fprintf(stderr, "        -m        Generate a MIB file\n");
    fprintf(stderr, "        -o file   Send output to file\n");
    exit(1);
  }
  if (read_mac(argv[optind], macaddr)) {
    fprintf(stderr, "Badly formatted MAC address\n");
    exit(1);
  }
  if (outfile) {
    fp = fopen(outfile, "w");
    if (!fp) {
      perror("Failed to open output file");
      exit(2);
    }
  } else {
    fprintf(stderr, "Unspecified Output file.\n");
    exit(1);
  }
  if (mib) {
    output_mib(macaddr, fp);
  } else {
    output_raw(macaddr, fp);
  }
  if (outfile) {
    fclose(fp);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xe4c(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe3b(%rip),%rdx
call   1080 <getopt@plt>
mov    %eax,-0x34(%rbp)
cmp    $0xffffffff,%eax
je     124d <main+0xbd>
mov    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
sub    $0x62,%eax
je     1214 <main+0x84>
jmp    11f2 <main+0x62>
mov    -0x3c(%rbp),%eax
sub    $0x6d,%eax
je     1220 <main+0x90>
jmp    1203 <main+0x73>
mov    -0x3c(%rbp),%eax
sub    $0x6f,%eax
je     122c <main+0x9c>
jmp    123f <main+0xaf>
movl   $0x0,-0x1c(%rbp)
jmp    1248 <main+0xb8>
movl   $0x1,-0x1c(%rbp)
jmp    1248 <main+0xb8>
mov    0x2dc5(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    1248 <main+0xb8>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11bf <main+0x2f>
mov    0x2d8c(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     127d <main+0xed>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
lea    0xd9e(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     1339 <main+0x1a9>
mov    0x2d42(%rip),%rax
mov    (%rax),%edi
lea    0xd8c(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d2d(%rip),%rax
mov    (%rax),%edi
lea    0xd7f(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d18(%rip),%rax
mov    (%rax),%edi
lea    0xd95(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
lea    0xdbc(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
lea    0xdda(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2cd9(%rip),%rax
mov    (%rax),%edi
lea    0xdd3(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
lea    0xdf6(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2caf(%rip),%rax
mov    (%rax),%edi
lea    0xe08(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x2c9c(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x16(%rbp),%rsi
call   1040 <read_mac@plt>
cmp    $0x0,%rax
je     137d <main+0x1ed>
mov    0x2c6b(%rip),%rax
mov    (%rax),%edi
lea    0xdeb(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
cmpq   $0x0,-0x28(%rbp)
je     13c2 <main+0x232>
mov    -0x28(%rbp),%rdi
lea    0xde3(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    13bd <main+0x22d>
lea    0xdca(%rip),%rdi
call   1070 <perror@plt>
mov    $0x2,%edi
call   10a0 <exit@plt>
jmp    13e1 <main+0x251>
mov    0x2c07(%rip),%rax
mov    (%rax),%edi
lea    0xdc1(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
cmpl   $0x0,-0x1c(%rbp)
je     13fd <main+0x26d>
lea    -0x16(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   10b0 <output_mib@plt>
jmp    140a <main+0x27a>
lea    -0x16(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1090 <output_raw@plt>
cmpq   $0x0,-0x28(%rbp)
je     141e <main+0x28e>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r13
mov    %edi,%ebp
xor    %r12d,%r12d
lea    0xe56(%rip),%r14
lea    0xe57(%rip),%r15
xor    %ebx,%ebx
jmp    11c3 <main+0x33>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
mov    %ebp,%edi
mov    %r13,%rsi
mov    %r15,%rdx
call   1080 <getopt@plt>
cmp    $0x6c,%eax
jg     11f0 <main+0x60>
cmp    $0xffffffff,%eax
je     120e <main+0x7e>
cmp    $0x62,%eax
jne    11c0 <main+0x30>
xor    %r12d,%r12d
jmp    11c3 <main+0x33>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0x6f,%eax
je     1202 <main+0x72>
cmp    $0x6d,%eax
jne    11c0 <main+0x30>
mov    $0x1,%r12d
jmp    11c3 <main+0x33>
mov    0x2def(%rip),%rax
mov    (%rax),%r14
jmp    11c3 <main+0x33>
mov    0x2dcb(%rip),%r15
cmp    %ebp,(%r15)
jl     1232 <main+0xa2>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
lea    0xde3(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x1,%ebx
test   %ebx,%ebx
jne    12a7 <main+0x117>
movslq (%r15),%rax
mov    0x0(%r13,%rax,8),%rdi
lea    0x2(%rsp),%rsi
call   1040 <read_mac@plt>
test   %rax,%rax
jne    131b <main+0x18b>
test   %r14,%r14
je     132d <main+0x19d>
lea    0xf15(%rip),%rsi
mov    %r14,%rdi
call   1060 <fopen@plt>
test   %rax,%rax
je     134c <main+0x1bc>
mov    %rax,%rbx
lea    0x2(%rsp),%rdi
mov    %rax,%rsi
test   %r12d,%r12d
je     1289 <main+0xf9>
call   10b0 <output_mib@plt>
jmp    128e <main+0xfe>
call   1090 <output_raw@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2d22(%rip),%rbx
mov    (%rbx),%edi
lea    0xd6c(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xd66(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xd83(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdb1(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdd6(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdd6(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe00(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe19(%rip),%rsi
jmp    133d <main+0x1ad>
mov    0x2cae(%rip),%rax
mov    (%rax),%edi
lea    0xe2e(%rip),%rsi
jmp    133d <main+0x1ad>
mov    0x2c9c(%rip),%rax
mov    (%rax),%edi
lea    0xe56(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0xe25(%rip),%rdi
call   1070 <perror@plt>
mov    $0x2,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"mac.dat\00"
@.str.1 = [5 x i8] c"bmo:\00"
@optarg = global i8* null
@optind = global i32 0
@stderr = global i32 0
@.str.2 = [22 x i8] c"Expected MAC address\0A\00"
@.str.3 = [8 x i8] c"Usage:\0A\00"
@.str.4 = [43 x i8] c" genmacmib [options] xx:xx:xx:xx:xx:xx\0A\00"
@.str.5 = [60 x i8] c" Generate a binary containing the given MAC address\0A\00"
@.str.6 = [51 x i8] c" The file can be raw binary or a UniFi MIB\0A\00"
@.str.7 = [14 x i8] c" Options:\0A\00"
@.str.8 = [56 x i8] c" -b Generate a raw binary file (default)\0A\00"
@.str.9 = [39 x i8] c" -m Generate a MIB file\0A\00"
@.str.10 = [39 x i8] c" -o file Send output to file\0A\00"
@.str.11 = [29 x i8] c"Badly formatted MAC address\0A\00"
@.str.12 = [2 x i8] c"w\00"
@.str.13 = [27 x i8] c"Failed to open output file\00"
@.str.14 = [26 x i8] c"Unspecified Output file.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i8]
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %8
store i32 0, i32* %11
br label %12
12: ; preds = %26, %2
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @getopt(i32 %13, i8** %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32 %15, i32* %10
%16 = icmp ne i32 %15, -1
br i1 %16, label %17, label %27
17: ; preds = %12
%18 = load i32, i32* %10
switch i32 %18, label %23 [
i32 98, label %19
i32 109, label %20
i32 111, label %21
]
19: ; preds = %17
store i32 0, i32* %7
br label %26
20: ; preds = %17
store i32 1, i32* %7
br label %26
21: ; preds = %17
%22 = load i8*, i8** @optarg
store i8* %22, i8** %8
br label %26
23: ; preds = %17
%24 = load i32, i32* %11
%25 = add nsw i32 %24, 1
store i32 %25, i32* %11
br label %26
26: ; preds = %23, %21, %20, %19
br label %12
27: ; preds = %12
%28 = load i32, i32* @optind
%29 = load i32, i32* %4
%30 = icmp sge i32 %28, %29
br i1 %30, label %31, label %36
31: ; preds = %27
%32 = load i32, i32* @stderr
%33 = call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %36
36: ; preds = %31, %27
%37 = load i32, i32* %11
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %57
39: ; preds = %36
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%42 = load i32, i32* @stderr
%43 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%44 = load i32, i32* @stderr
%45 = call i32 @fprintf(i32 %44, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0))
%46 = load i32, i32* @stderr
%47 = call i32 @fprintf(i32 %46, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
%48 = load i32, i32* @stderr
%49 = call i32 @fprintf(i32 %48, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%50 = load i32, i32* @stderr
%51 = call i32 @fprintf(i32 %50, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.8, i64 0, i64 0))
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%54 = load i32, i32* @stderr
%55 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%56 = call i32 @exit(i32 1)
unreachable
57: ; preds = %36
%58 = load i8**, i8*** %5
%59 = load i32, i32* @optind
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8*, i8** %58, i64 %60
%62 = load i8*, i8** %61
%63 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%64 = call i64 @read_mac(i8* %62, i8* %63)
%65 = icmp ne i64 %64, 0
br i1 %65, label %66, label %70
66: ; preds = %57
%67 = load i32, i32* @stderr
%68 = call i32 @fprintf(i32 %67, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%69 = call i32 @exit(i32 1)
unreachable
70: ; preds = %57
%71 = load i8*, i8** %8
%72 = icmp ne i8* %71, null
br i1 %72, label %73, label %82
73: ; preds = %70
%74 = load i8*, i8** %8
%75 = call i32* @fopen(i8* %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
store i32* %75, i32** %9
%76 = load i32*, i32** %9
%77 = icmp ne i32* %76, null
br i1 %77, label %81, label %78
78: ; preds = %73
%79 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%80 = call i32 @exit(i32 2)
unreachable
81: ; preds = %73
br label %86
82: ; preds = %70
%83 = load i32, i32* @stderr
%84 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0))
%85 = call i32 @exit(i32 1)
unreachable
86: ; preds = %81
%87 = load i32, i32* %7
%88 = icmp ne i32 %87, 0
br i1 %88, label %89, label %93
89: ; preds = %86
%90 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%91 = load i32*, i32** %9
%92 = call i32 @output_mib(i8* %90, i32* %91)
br label %97
93: ; preds = %86
%94 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%95 = load i32*, i32** %9
%96 = call i32 @output_raw(i8* %94, i32* %95)
br label %97
97: ; preds = %93, %89
%98 = load i8*, i8** %8
%99 = icmp ne i8* %98, null
br i1 %99, label %100, label %103
100: ; preds = %97
%101 = load i32*, i32** %9
%102 = call i32 @fclose(i32* %101)
br label %103
103: ; preds = %100, %97
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"mac.dat\00"
@.str.1 = [5 x i8] c"bmo:\00"
@optarg = global i8* null
@optind = global i32 0
@stderr = global i32 0
@.str.2 = [22 x i8] c"Expected MAC address\0A\00"
@.str.3 = [8 x i8] c"Usage:\0A\00"
@.str.4 = [43 x i8] c" genmacmib [options] xx:xx:xx:xx:xx:xx\0A\00"
@.str.5 = [60 x i8] c" Generate a binary containing the given MAC address\0A\00"
@.str.6 = [51 x i8] c" The file can be raw binary or a UniFi MIB\0A\00"
@.str.7 = [14 x i8] c" Options:\0A\00"
@.str.8 = [56 x i8] c" -b Generate a raw binary file (default)\0A\00"
@.str.9 = [39 x i8] c" -m Generate a MIB file\0A\00"
@.str.10 = [39 x i8] c" -o file Send output to file\0A\00"
@.str.11 = [29 x i8] c"Badly formatted MAC address\0A\00"
@.str.12 = [2 x i8] c"w\00"
@.str.13 = [27 x i8] c"Failed to open output file\00"
@.str.14 = [26 x i8] c"Unspecified Output file.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %18, %2
%6 = phi i8* [ %19, %18 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %2 ]
%7 = phi i32 [ %10, %18 ], [ 0, %2 ]
%8 = phi i32 [ %13, %18 ], [ 0, %2 ]
br label %9
9: ; preds = %16, %5
%10 = phi i32 [ %7, %5 ], [ %17, %16 ]
%11 = phi i32 [ %8, %5 ], [ %13, %16 ]
br label %12
12: ; preds = %9, %20
%13 = phi i32 [ %21, %20 ], [ %11, %9 ]
%14 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
switch i32 %14, label %20 [
i32 -1, label %22
i32 98, label %16
i32 109, label %15
i32 111, label %18
]
15: ; preds = %12
br label %16
16: ; preds = %12, %15
%17 = phi i32 [ 1, %15 ], [ 0, %12 ]
br label %9
18: ; preds = %12
%19 = load i8*, i8** @optarg
br label %5
20: ; preds = %12
%21 = add nsw i32 %13, 1
br label %12
22: ; preds = %12
%23 = load i32, i32* @optind
%24 = icmp slt i32 %23, %0
br i1 %24, label %29, label %25
25: ; preds = %22
%26 = load i32, i32* @stderr
%27 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%28 = add nsw i32 %13, 1
br label %29
29: ; preds = %25, %22
%30 = phi i32 [ %28, %25 ], [ %13, %22 ]
%31 = icmp eq i32 %30, 0
br i1 %31, label %50, label %32
32: ; preds = %29
%33 = load i32, i32* @stderr
%34 = tail call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%35 = load i32, i32* @stderr
%36 = tail call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%37 = load i32, i32* @stderr
%38 = tail call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0))
%39 = load i32, i32* @stderr
%40 = tail call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
%41 = load i32, i32* @stderr
%42 = tail call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
%43 = load i32, i32* @stderr
%44 = tail call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.8, i64 0, i64 0))
%45 = load i32, i32* @stderr
%46 = tail call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%47 = load i32, i32* @stderr
%48 = tail call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%49 = tail call i32 @exit(i32 1)
unreachable
50: ; preds = %29
%51 = load i32, i32* @optind
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %1, i64 %52
%54 = load i8*, i8** %53
%55 = call i64 @read_mac(i8* %54, i8* %4)
%56 = icmp eq i64 %55, 0
br i1 %56, label %61, label %57
57: ; preds = %50
%58 = load i32, i32* @stderr
%59 = call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%60 = call i32 @exit(i32 1)
unreachable
61: ; preds = %50
%62 = icmp eq i8* %6, null
br i1 %62, label %69, label %63
63: ; preds = %61
%64 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%65 = icmp eq i32* %64, null
br i1 %65, label %66, label %73
66: ; preds = %63
%67 = call i32 @perror(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0))
%68 = call i32 @exit(i32 2)
unreachable
69: ; preds = %61
%70 = load i32, i32* @stderr
%71 = call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0))
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %63
%74 = icmp eq i32 %10, 0
br i1 %74, label %77, label %75
75: ; preds = %73
%76 = call i32 @output_mib(i8* %4, i32* %64)
br label %79
77: ; preds = %73
%78 = call i32 @output_raw(i8* %4, i32* %64)
br label %79
79: ; preds = %75, %77
%80 = call i32 @fclose(i32* %64)
ret i32 0
}