#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*/ SEEK_CUR;
int /*<<< orphan*/ bin2asm(int /*<<< orphan*/ *, int /*<<< orphan*/ *, long);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int /*<<< orphan*/ help();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdout;
int /*<<< orphan*/ strcmp(char *, char const *);
int /*<<< orphan*/ strncmp(char *, char const *, int);
long strtol(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ usage();
int /*<<< orphan*/ version();
int main(int argc, char **argv) {
  long offset = -1;
  long length = -1;
  const char *input_filename = 0;
  const char *output_filename = 0;
  {
    char *p;
    while ((p = *(++argv))) {
      if (!strncmp("--", p, 2)) {
        const char *opt = &p[2];
        if (!strncmp("offset=", opt, 7)) {
          offset = strtol(&opt[7], 0, 0);
        } else if (!strncmp("length=", opt, 7)) {
          length = strtol(&opt[7], 0, 0);
        } else if (!strncmp("output=", opt, 7)) {
          output_filename = &opt[7];
        } else if (!strcmp("help", opt)) {
          help();
        } else if (!strcmp("usage", opt)) {
          usage();
        } else if (!strcmp("version", opt)) {
          version();
        } else {
          fprintf(stderr, "unrecognized option `%s'\n", p);
          return (-1);
        }
      } else {
        input_filename = p;
      }
    }
  }
  if (!input_filename) {
    fprintf(stderr, "bin2asm: no filename given\n");
    return (-1);
  }
  {
    FILE *out;
    if (!output_filename)
      out = stdout;
    else {
      out = fopen(output_filename, "wt");
      if (!out) {
        fprintf(stderr, "bin2asm: failed to open `%s' for writing\n",
                output_filename);
        return (-1);
      }
    }
    FILE *in = fopen(input_filename, "rb");
    if (!in) {
      fprintf(stderr, "bin2asm: failed to open `%s' for reading\n",
              input_filename);
      return (-1);
    }
    if (offset != -1)
      fseek(in, offset, SEEK_CUR);
    bin2asm(in, out, length);
    fclose(in);
    fclose(out);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
movq   $0xffffffffffffffff,-0x20(%rbp)
ff
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     1391 <main+0x1e1>
mov    -0x38(%rbp),%rsi
lea    0xdee(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1384 <main+0x1d4>
mov    -0x38(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
lea    0xdc7(%rip),%rdi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1269 <main+0xb9>
mov    -0x40(%rbp),%rdi
add    $0x7,%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1070 <strtol@plt>
mov    %rax,-0x18(%rbp)
jmp    137f <main+0x1cf>
mov    -0x40(%rbp),%rsi
lea    0xd97(%rip),%rdi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12a1 <main+0xf1>
mov    -0x40(%rbp),%rdi
add    $0x7,%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1070 <strtol@plt>
mov    %rax,-0x20(%rbp)
jmp    137a <main+0x1ca>
mov    -0x40(%rbp),%rsi
lea    0xd67(%rip),%rdi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12d0 <main+0x120>
mov    -0x40(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x30(%rbp)
jmp    1375 <main+0x1c5>
mov    -0x40(%rbp),%rsi
lea    0xd40(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    12f5 <main+0x145>
mov    $0x0,%al
call   10d0 <help@plt>
jmp    1370 <main+0x1c0>
mov    -0x40(%rbp),%rsi
lea    0xd20(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    131a <main+0x16a>
mov    $0x0,%al
call   10b0 <usage@plt>
jmp    136b <main+0x1bb>
mov    -0x40(%rbp),%rsi
lea    0xd01(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    133f <main+0x18f>
mov    $0x0,%al
call   1080 <version@plt>
jmp    1366 <main+0x1b6>
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
lea    0xcdb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14b9 <main+0x309>
jmp    136b <main+0x1bb>
jmp    1370 <main+0x1c0>
jmp    1375 <main+0x1c5>
jmp    137a <main+0x1ca>
jmp    137f <main+0x1cf>
jmp    138c <main+0x1dc>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    11e6 <main+0x36>
cmpq   $0x0,-0x28(%rbp)
jne    13bf <main+0x20f>
mov    0x2c35(%rip),%rax
mov    (%rax),%edi
lea    0xc9c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14b9 <main+0x309>
cmpq   $0x0,-0x30(%rbp)
jne    13dd <main+0x22d>
mov    0x2bff(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
jmp    1428 <main+0x278>
mov    -0x30(%rbp),%rdi
lea    0xc7c(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1423 <main+0x273>
mov    0x2bd5(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rdx
lea    0xc57(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14b9 <main+0x309>
jmp    1428 <main+0x278>
mov    -0x28(%rbp),%rdi
lea    0xc5e(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    146e <main+0x2be>
mov    0x2b8a(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xc39(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14b9 <main+0x309>
cmpq   $0xffffffffffffffff,-0x18(%rbp)
je     148f <main+0x2df>
mov    -0x50(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2b60(%rip),%rax
mov    (%rax),%edx
call   10a0 <fseek@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1090 <bin2asm@plt>
mov    -0x50(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x48(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x8(%rsi),%r13
test   %r13,%r13
je     134e <main+0x19e>
mov    %rsi,%rbx
add    $0x10,%rbx
movq   $0xffffffffffffffff,0x10(%rsp)
ff ff
lea    0xe1e(%rip),%rbp
lea    0xe1a(%rip),%r14
xor    %eax,%eax
mov    %rax,(%rsp)
xor    %r12d,%r12d
movq   $0xffffffffffffffff,0x8(%rsp)
ff ff
jmp    1213 <main+0x63>
nopl   (%rax)
mov    %r13,%r12
mov    (%rbx),%r13
add    $0x8,%rbx
test   %r13,%r13
je     1311 <main+0x161>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1200 <main+0x50>
lea    0x2(%r13),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     12b8 <main+0x108>
lea    0xdc5(%rip),%rdi
mov    %r15,%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     12d2 <main+0x122>
lea    0xdb5(%rip),%rdi
mov    %r15,%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     12ec <main+0x13c>
lea    0xda5(%rip),%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     12f9 <main+0x149>
lea    0xd97(%rip),%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1305 <main+0x155>
lea    0xd8a(%rip),%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    13f6 <main+0x246>
xor    %eax,%eax
call   1080 <version@plt>
jmp    1203 <main+0x53>
add    $0x9,%r13
mov    %r13,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %rax,0x10(%rsp)
jmp    1203 <main+0x53>
add    $0x9,%r13
mov    %r13,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %rax,0x8(%rsp)
jmp    1203 <main+0x53>
add    $0x9,%r13
mov    %r13,(%rsp)
jmp    1203 <main+0x53>
xor    %eax,%eax
call   10d0 <help@plt>
jmp    1203 <main+0x53>
xor    %eax,%eax
call   10b0 <usage@plt>
jmp    1203 <main+0x53>
test   %r12,%r12
je     134e <main+0x19e>
mov    (%rsp),%rbp
test   %rbp,%rbp
je     1367 <main+0x1b7>
lea    0xd3e(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1371 <main+0x1c1>
mov    0x2c9b(%rip),%rax
mov    (%rax),%edi
lea    0xd21(%rip),%rsi
mov    %rbp,%rdx
jmp    13db <main+0x22b>
mov    0x2c83(%rip),%rax
mov    (%rax),%edi
lea    0xcea(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    13e2 <main+0x232>
mov    0x2c62(%rip),%rax
mov    (%rax),%rbx
lea    0xd19(%rip),%rsi
mov    %r12,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     13c8 <main+0x218>
mov    %rax,%rbp
mov    0x10(%rsp),%rsi
cmp    $0xffffffffffffffff,%rsi
je     13a4 <main+0x1f4>
mov    0x2c4e(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
call   10a0 <fseek@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    0x8(%rsp),%rdx
call   1090 <bin2asm@plt>
mov    %rbp,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
jmp    13e7 <main+0x237>
mov    0x2c09(%rip),%rax
mov    (%rax),%edi
lea    0xcbc(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bdb(%rip),%rax
mov    (%rax),%edi
lea    0xc28(%rip),%rsi
mov    %r13,%rdx
jmp    13db <main+0x22b>

LLVM IR (-O0):
@.str = [3 x i8] c"--\00"
@.str.1 = [8 x i8] c"offset=\00"
@.str.2 = [8 x i8] c"length=\00"
@.str.3 = [8 x i8] c"output=\00"
@.str.4 = [5 x i8] c"help\00"
@.str.5 = [6 x i8] c"usage\00"
@.str.6 = [8 x i8] c"version\00"
@stderr = global i32 0
@.str.7 = [26 x i8] c"unrecognized option `%s'\0A\00"
@.str.8 = [28 x i8] c"bin2asm: no filename given\0A\00"
@stdout = global i32* null
@.str.9 = [3 x i8] c"wt\00"
@.str.10 = [42 x i8] c"bin2asm: failed to open `%s' for writing\0A\00"
@.str.11 = [3 x i8] c"rb\00"
@.str.12 = [42 x i8] c"bin2asm: failed to open `%s' for reading\0A\00"
@SEEK_CUR = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 -1, i64* %6
store i64 -1, i64* %7
store i8* null, i8** %8
store i8* null, i8** %9
br label %14
14: ; preds = %78, %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i32 1
store i8** %16, i8*** %5
%17 = load i8*, i8** %16
store i8* %17, i8** %10
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %79
19: ; preds = %14
%20 = load i8*, i8** %10
%21 = call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %20, i32 2)
%22 = icmp ne i32 %21, 0
br i1 %22, label %76, label %23
23: ; preds = %19
%24 = load i8*, i8** %10
%25 = getelementptr inbounds i8, i8* %24, i64 2
store i8* %25, i8** %11
%26 = load i8*, i8** %11
%27 = call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %26, i32 7)
%28 = icmp ne i32 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %23
%30 = load i8*, i8** %11
%31 = getelementptr inbounds i8, i8* %30, i64 7
%32 = call i64 @strtol(i8* %31, i32 0, i32 0)
store i64 %32, i64* %6
br label %75
33: ; preds = %23
%34 = load i8*, i8** %11
%35 = call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %34, i32 7)
%36 = icmp ne i32 %35, 0
br i1 %36, label %41, label %37
37: ; preds = %33
%38 = load i8*, i8** %11
%39 = getelementptr inbounds i8, i8* %38, i64 7
%40 = call i64 @strtol(i8* %39, i32 0, i32 0)
store i64 %40, i64* %7
br label %74
41: ; preds = %33
%42 = load i8*, i8** %11
%43 = call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %42, i32 7)
%44 = icmp ne i32 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %41
%46 = load i8*, i8** %11
%47 = getelementptr inbounds i8, i8* %46, i64 7
store i8* %47, i8** %9
br label %73
48: ; preds = %41
%49 = load i8*, i8** %11
%50 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %49)
%51 = icmp ne i32 %50, 0
br i1 %51, label %54, label %52
52: ; preds = %48
%53 = call i32 (...) @help()
br label %72
54: ; preds = %48
%55 = load i8*, i8** %11
%56 = call i32 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %55)
%57 = icmp ne i32 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %54
%59 = call i32 (...) @usage()
br label %71
60: ; preds = %54
%61 = load i8*, i8** %11
%62 = call i32 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %61)
%63 = icmp ne i32 %62, 0
br i1 %63, label %66, label %64
64: ; preds = %60
%65 = call i32 (...) @version()
br label %70
66: ; preds = %60
%67 = load i32, i32* @stderr
%68 = load i8*, i8** %10
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8* %68)
store i32 -1, i32* %3
br label %126
70: ; preds = %64
br label %71
71: ; preds = %70, %58
br label %72
72: ; preds = %71, %52
br label %73
73: ; preds = %72, %45
br label %74
74: ; preds = %73, %37
br label %75
75: ; preds = %74, %29
br label %78
76: ; preds = %19
%77 = load i8*, i8** %10
store i8* %77, i8** %8
br label %78
78: ; preds = %76, %75
br label %14
79: ; preds = %14
%80 = load i8*, i8** %8
%81 = icmp ne i8* %80, null
br i1 %81, label %85, label %82
82: ; preds = %79
%83 = load i32, i32* @stderr
%84 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0))
store i32 -1, i32* %3
br label %126
85: ; preds = %79
%86 = load i8*, i8** %9
%87 = icmp ne i8* %86, null
br i1 %87, label %90, label %88
88: ; preds = %85
%89 = load i32*, i32** @stdout
store i32* %89, i32** %12
br label %100
90: ; preds = %85
%91 = load i8*, i8** %9
%92 = call i32* @fopen(i8* %91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
store i32* %92, i32** %12
%93 = load i32*, i32** %12
%94 = icmp ne i32* %93, null
br i1 %94, label %99, label %95
95: ; preds = %90
%96 = load i32, i32* @stderr
%97 = load i8*, i8** %9
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0), i8* %97)
store i32 -1, i32* %3
br label %126
99: ; preds = %90
br label %100
100: ; preds = %99, %88
%101 = load i8*, i8** %8
%102 = call i32* @fopen(i8* %101, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
store i32* %102, i32** %13
%103 = load i32*, i32** %13
%104 = icmp ne i32* %103, null
br i1 %104, label %109, label %105
105: ; preds = %100
%106 = load i32, i32* @stderr
%107 = load i8*, i8** %8
%108 = call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i8* %107)
store i32 -1, i32* %3
br label %126
109: ; preds = %100
%110 = load i64, i64* %6
%111 = icmp ne i64 %110, -1
br i1 %111, label %112, label %117
112: ; preds = %109
%113 = load i32*, i32** %13
%114 = load i64, i64* %6
%115 = load i32, i32* @SEEK_CUR
%116 = call i32 @fseek(i32* %113, i64 %114, i32 %115)
br label %117
117: ; preds = %112, %109
%118 = load i32*, i32** %13
%119 = load i32*, i32** %12
%120 = load i64, i64* %7
%121 = call i32 @bin2asm(i32* %118, i32* %119, i64 %120)
%122 = load i32*, i32** %13
%123 = call i32 @fclose(i32* %122)
%124 = load i32*, i32** %12
%125 = call i32 @fclose(i32* %124)
store i32 0, i32* %3
br label %126
126: ; preds = %117, %105, %95, %82, %66
%127 = load i32, i32* %3
ret i32 %127
}

LLVM IR (-O2):
@.str = [3 x i8] c"--\00"
@.str.1 = [8 x i8] c"offset=\00"
@.str.2 = [8 x i8] c"length=\00"
@.str.3 = [8 x i8] c"output=\00"
@.str.4 = [5 x i8] c"help\00"
@.str.5 = [6 x i8] c"usage\00"
@.str.6 = [8 x i8] c"version\00"
@stderr = global i32 0
@.str.7 = [26 x i8] c"unrecognized option `%s'\0A\00"
@.str.8 = [28 x i8] c"bin2asm: no filename given\0A\00"
@stdout = global i32* null
@.str.9 = [3 x i8] c"wt\00"
@.str.10 = [42 x i8] c"bin2asm: failed to open `%s' for writing\0A\00"
@.str.11 = [3 x i8] c"rb\00"
@.str.12 = [42 x i8] c"bin2asm: failed to open `%s' for reading\0A\00"
@SEEK_CUR = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %61, label %6
6: ; preds = %2, %48
%7 = phi i8* [ %54, %48 ], [ %4, %2 ]
%8 = phi i8** [ %53, %48 ], [ %3, %2 ]
%9 = phi i64 [ %52, %48 ], [ -1, %2 ]
%10 = phi i8* [ %51, %48 ], [ null, %2 ]
%11 = phi i8* [ %50, %48 ], [ null, %2 ]
%12 = phi i64 [ %49, %48 ], [ -1, %2 ]
%13 = tail call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7, i32 2)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %48
15: ; preds = %6
%16 = getelementptr inbounds i8, i8* %7, i64 2
%17 = tail call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %16, i32 7)
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = getelementptr inbounds i8, i8* %7, i64 9
%21 = tail call i64 @strtol(i8* %20, i32 0, i32 0)
br label %48
22: ; preds = %15
%23 = tail call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %16, i32 7)
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = getelementptr inbounds i8, i8* %7, i64 9
%27 = tail call i64 @strtol(i8* %26, i32 0, i32 0)
br label %48
28: ; preds = %22
%29 = tail call i32 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %16, i32 7)
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = getelementptr inbounds i8, i8* %7, i64 9
br label %48
33: ; preds = %28
%34 = tail call i32 @strcmp(i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %16)
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = tail call i32 (...) @help()
br label %48
38: ; preds = %33
%39 = tail call i32 @strcmp(i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %16)
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = tail call i32 (...) @usage()
br label %48
43: ; preds = %38
%44 = tail call i32 @strcmp(i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %16)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %56
46: ; preds = %43
%47 = tail call i32 (...) @version()
br label %48
48: ; preds = %19, %31, %41, %46, %36, %25, %6
%49 = phi i64 [ %12, %6 ], [ %12, %19 ], [ %27, %25 ], [ %12, %31 ], [ %12, %36 ], [ %12, %41 ], [ %12, %46 ]
%50 = phi i8* [ %7, %6 ], [ %11, %19 ], [ %11, %25 ], [ %11, %31 ], [ %11, %36 ], [ %11, %41 ], [ %11, %46 ]
%51 = phi i8* [ %10, %6 ], [ %10, %19 ], [ %10, %25 ], [ %32, %31 ], [ %10, %36 ], [ %10, %41 ], [ %10, %46 ]
%52 = phi i64 [ %9, %6 ], [ %21, %19 ], [ %9, %25 ], [ %9, %31 ], [ %9, %36 ], [ %9, %41 ], [ %9, %46 ]
%53 = getelementptr inbounds i8*, i8** %8, i64 1
%54 = load i8*, i8** %53
%55 = icmp eq i8* %54, null
br i1 %55, label %59, label %6
56: ; preds = %43
%57 = load i32, i32* @stderr
%58 = tail call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8* %7)
br label %90
59: ; preds = %48
%60 = icmp eq i8* %50, null
br i1 %60, label %61, label %64
61: ; preds = %2, %59
%62 = load i32, i32* @stderr
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0))
br label %90
64: ; preds = %59
%65 = icmp eq i8* %51, null
br i1 %65, label %66, label %68
66: ; preds = %64
%67 = load i32*, i32** @stdout
br label %74
68: ; preds = %64
%69 = tail call i32* @fopen(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%70 = icmp eq i32* %69, null
br i1 %70, label %71, label %74
71: ; preds = %68
%72 = load i32, i32* @stderr
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0), i8* %51)
br label %90
74: ; preds = %68, %66
%75 = phi i32* [ %69, %68 ], [ %67, %66 ]
%76 = tail call i32* @fopen(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%77 = icmp eq i32* %76, null
br i1 %77, label %78, label %81
78: ; preds = %74
%79 = load i32, i32* @stderr
%80 = tail call i32 (i32, i8*, ...) @fprintf(i32 %79, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0), i8* %50)
br label %90
81: ; preds = %74
%82 = icmp eq i64 %52, -1
br i1 %82, label %86, label %83
83: ; preds = %81
%84 = load i32, i32* @SEEK_CUR
%85 = tail call i32 @fseek(i32* %76, i64 %52, i32 %84)
br label %86
86: ; preds = %83, %81
%87 = tail call i32 @bin2asm(i32* %76, i32* %75, i64 %49)
%88 = tail call i32 @fclose(i32* %76)
%89 = tail call i32 @fclose(i32* %75)
br label %90
90: ; preds = %78, %71, %86, %56, %61
%91 = phi i32 [ -1, %61 ], [ -1, %56 ], [ 0, %86 ], [ -1, %71 ], [ -1, %78 ]
ret i32 %91
}