#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 */
size_t EI_CLASS;
int EI_NIDENT;
unsigned char ELFCLASS64;
int /*<<< orphan*/ die(char *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int fread(unsigned char **, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ process_32(int /*<<< orphan*/ *, int, int, int, int);
int /*<<< orphan*/ process_64(int /*<<< orphan*/ *, int, int, int, int);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  int show_reloc_info, as_text, as_bin, keep_relocs;
  const char *fname;
  FILE *fp;
  int i;
  unsigned char e_ident[EI_NIDENT];
  show_reloc_info = 0;
  as_text = 0;
  as_bin = 0;
  keep_relocs = 0;
  fname = NULL;
  for (i = 1; i < argc; i++) {
    char *arg = argv[i];
    if (*arg == '-') {
      if (strcmp(arg, "--reloc-info") == 0) {
        show_reloc_info = 1;
        continue;
      }
      if (strcmp(arg, "--text") == 0) {
        as_text = 1;
        continue;
      }
      if (strcmp(arg, "--bin") == 0) {
        as_bin = 1;
        continue;
      }
      if (strcmp(arg, "--keep") == 0) {
        keep_relocs = 1;
        continue;
      }
    } else if (!fname) {
      fname = arg;
      continue;
    }
    usage();
  }
  if (!fname)
    usage();
  fp = fopen(fname, "r+");
  if (!fp)
    die("Cannot open %s: %s\n", fname, strerror(errno));
  if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT)
    die("Cannot read %s: %s", fname, strerror(errno));
  rewind(fp);
  if (e_ident[EI_CLASS] == ELFCLASS64)
    process_64(fp, as_text, as_bin, show_reloc_info, keep_relocs);
  else
    process_32(fp, as_text, as_bin, show_reloc_info, keep_relocs);
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e2b(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1308 <main+0x168>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    12d6 <main+0x136>
mov    -0x50(%rbp),%rdi
lea    0xdbc(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    125f <main+0xbf>
movl   $0x1,-0x14(%rbp)
jmp    12fa <main+0x15a>
mov    -0x50(%rbp),%rdi
lea    0xda3(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1285 <main+0xe5>
movl   $0x1,-0x18(%rbp)
jmp    12fa <main+0x15a>
mov    -0x50(%rbp),%rdi
lea    0xd84(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12ab <main+0x10b>
movl   $0x1,-0x1c(%rbp)
jmp    12fa <main+0x15a>
mov    -0x50(%rbp),%rdi
lea    0xd64(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12d1 <main+0x131>
movl   $0x1,-0x20(%rbp)
jmp    12fa <main+0x15a>
jmp    12f3 <main+0x153>
cmpq   $0x0,-0x28(%rbp)
jne    12ee <main+0x14e>
mov    -0x50(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    12fa <main+0x15a>
jmp    12f3 <main+0x153>
mov    $0x0,%al
call   1080 <usage@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    120d <main+0x6d>
cmpq   $0x0,-0x28(%rbp)
jne    131a <main+0x17a>
mov    $0x0,%al
call   1080 <usage@plt>
mov    -0x28(%rbp),%rdi
lea    0xcfc(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1361 <main+0x1c1>
mov    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    0x2c80(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x60(%rbp),%rsi
mov    %eax,%edx
lea    0xcc8(%rip),%rdi
call   10a0 <die@plt>
mov    -0x58(%rbp),%rdi
mov    0x2c7c(%rip),%rax
mov    (%rax),%edx
mov    -0x30(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    0x2c65(%rip),%rcx
cmp    (%rcx),%eax
je     13b3 <main+0x213>
mov    -0x28(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    0x2c2e(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
mov    -0x68(%rbp),%rsi
mov    %eax,%edx
lea    0xc8a(%rip),%rdi
call   10a0 <die@plt>
mov    -0x30(%rbp),%rdi
call   1060 <rewind@plt>
mov    -0x58(%rbp),%rax
mov    0x2c09(%rip),%rcx
mov    (%rcx),%rcx
movzbl (%rax,%rcx,1),%eax
mov    0x2c0b(%rip),%rcx
movzbl (%rcx),%ecx
cmp    %ecx,%eax
jne    13fb <main+0x25b>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8d
call   10b0 <process_64@plt>
jmp    1411 <main+0x271>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8d
call   1050 <process_32@plt>
mov    -0x30(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e30(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%r14
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
xor    %r13d,%r13d
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
cmp    $0x2,%edi
jl     12ce <main+0x12e>
mov    %rsi,%r12
mov    %r14,-0x40(%rbp)
mov    %edi,%r14d
mov    $0x1,%r13d
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
xor    %r15d,%r15d
movl   $0x0,-0x2c(%rbp)
jmp    1239 <main+0x99>
nopl   (%rax)
test   %r15,%r15
je     129b <main+0xfb>
xor    %eax,%eax
call   1080 <usage@plt>
add    $0x1,%r13
cmp    %r13,%r14
je     12c1 <main+0x121>
mov    (%r12,%r13,8),%rbx
cmpb   $0x2d,(%rbx)
jne    1220 <main+0x80>
mov    %rbx,%rdi
lea    0xdb4(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12a0 <main+0x100>
mov    %rbx,%rdi
lea    0xdad(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12a9 <main+0x109>
mov    %rbx,%rdi
lea    0xda0(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12b5 <main+0x115>
mov    %rbx,%rdi
lea    0xd92(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1225 <main+0x85>
movl   $0x1,-0x2c(%rbp)
jmp    122c <main+0x8c>
mov    %rbx,%r15
jmp    122c <main+0x8c>
movl   $0x1,-0x38(%rbp)
jmp    122c <main+0x8c>
movl   $0x1,-0x34(%rbp)
jmp    122c <main+0x8c>
movl   $0x1,-0x30(%rbp)
jmp    122c <main+0x8c>
test   %r15,%r15
mov    -0x40(%rbp),%r14
mov    -0x38(%rbp),%r13d
jne    12d8 <main+0x138>
xor    %r15d,%r15d
xor    %eax,%eax
call   1080 <usage@plt>
lea    0xd42(%rip),%rsi
mov    %r15,%rdi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    130e <main+0x16e>
mov    0x2cd2(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xd20(%rip),%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   10a0 <die@plt>
mov    0x2cd3(%rip),%r12
mov    (%r12),%edx
mov    %r14,%rdi
mov    $0x1,%esi
mov    %rbx,%rcx
call   1030 <fread@plt>
cmp    (%r12),%eax
je     134e <main+0x1ae>
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
call   10c0 <strerror@plt>
lea    0xcf4(%rip),%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   10a0 <die@plt>
mov    %rbx,%rdi
call   1060 <rewind@plt>
mov    0x2c73(%rip),%rax
mov    (%rax),%rax
mov    (%r14,%rax,1),%al
mov    0x2c75(%rip),%rcx
cmp    (%rcx),%al
jne    1386 <main+0x1e6>
mov    %rbx,%rdi
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    %r13d,%ecx
mov    -0x2c(%rbp),%r8d
call   10b0 <process_64@plt>
jmp    139b <main+0x1fb>
mov    %rbx,%rdi
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    %r13d,%ecx
mov    -0x2c(%rbp),%r8d
call   1050 <process_32@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EI_NIDENT = global i32 0
@.str = [13 x i8] c"--reloc-info\00"
@.str.1 = [7 x i8] c"--text\00"
@.str.2 = [6 x i8] c"--bin\00"
@.str.3 = [7 x i8] c"--keep\00"
@.str.4 = [3 x i8] c"r+\00"
@.str.5 = [20 x i8] c"Cannot open %s: %s\0A\00"
@errno = global i32 0
@.str.6 = [19 x i8] c"Cannot read %s: %s\00"
@EI_CLASS = global i64 0
@ELFCLASS64 = global i8 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
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* @EI_NIDENT
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %13
%19 = alloca i8, i64 %17
store i64 %17, i64* %14
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i8* null, i8** %10
store i32 1, i32* %12
br label %20
20: ; preds = %63, %2
%21 = load i32, i32* %12
%22 = load i32, i32* %4
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %66
24: ; preds = %20
%25 = load i8**, i8*** %5
%26 = load i32, i32* %12
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8*, i8** %25, i64 %27
%29 = load i8*, i8** %28
store i8* %29, i8** %15
%30 = load i8*, i8** %15
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 45
br i1 %33, label %34, label %55
34: ; preds = %24
%35 = load i8*, i8** %15
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %34
store i32 1, i32* %6
br label %63
39: ; preds = %34
%40 = load i8*, i8** %15
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 1, i32* %7
br label %63
44: ; preds = %39
%45 = load i8*, i8** %15
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %44
store i32 1, i32* %8
br label %63
49: ; preds = %44
%50 = load i8*, i8** %15
%51 = call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %54
53: ; preds = %49
store i32 1, i32* %9
br label %63
54: ; preds = %49
br label %61
55: ; preds = %24
%56 = load i8*, i8** %10
%57 = icmp ne i8* %56, null
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = load i8*, i8** %15
store i8* %59, i8** %10
br label %63
60: ; preds = %55
br label %61
61: ; preds = %60, %54
%62 = call i32 (...) @usage()
br label %63
63: ; preds = %61, %58, %53, %48, %43, %38
%64 = load i32, i32* %12
%65 = add nsw i32 %64, 1
store i32 %65, i32* %12
br label %20
66: ; preds = %20
%67 = load i8*, i8** %10
%68 = icmp ne i8* %67, null
br i1 %68, label %71, label %69
69: ; preds = %66
%70 = call i32 (...) @usage()
br label %71
71: ; preds = %69, %66
%72 = load i8*, i8** %10
%73 = call i32* @fopen(i8* %72, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %73, i32** %11
%74 = load i32*, i32** %11
%75 = icmp ne i32* %74, null
br i1 %75, label %81, label %76
76: ; preds = %71
%77 = load i8*, i8** %10
%78 = load i32, i32* @errno
%79 = call i32 @strerror(i32 %78)
%80 = call i32 @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %77, i32 %79)
br label %81
81: ; preds = %76, %71
%82 = bitcast i8* %19 to i8**
%83 = load i32, i32* @EI_NIDENT
%84 = load i32*, i32** %11
%85 = call i32 @fread(i8** %82, i32 1, i32 %83, i32* %84)
%86 = load i32, i32* @EI_NIDENT
%87 = icmp ne i32 %85, %86
br i1 %87, label %88, label %93
88: ; preds = %81
%89 = load i8*, i8** %10
%90 = load i32, i32* @errno
%91 = call i32 @strerror(i32 %90)
%92 = call i32 @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* %89, i32 %91)
br label %93
93: ; preds = %88, %81
%94 = load i32*, i32** %11
%95 = call i32 @rewind(i32* %94)
%96 = load i64, i64* @EI_CLASS
%97 = getelementptr inbounds i8, i8* %19, i64 %96
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = load i8, i8* @ELFCLASS64
%101 = zext i8 %100 to i32
%102 = icmp eq i32 %99, %101
br i1 %102, label %103, label %110
103: ; preds = %93
%104 = load i32*, i32** %11
%105 = load i32, i32* %7
%106 = load i32, i32* %8
%107 = load i32, i32* %6
%108 = load i32, i32* %9
%109 = call i32 @process_64(i32* %104, i32 %105, i32 %106, i32 %107, i32 %108)
br label %117
110: ; preds = %93
%111 = load i32*, i32** %11
%112 = load i32, i32* %7
%113 = load i32, i32* %8
%114 = load i32, i32* %6
%115 = load i32, i32* %9
%116 = call i32 @process_32(i32* %111, i32 %112, i32 %113, i32 %114, i32 %115)
br label %117
117: ; preds = %110, %103
%118 = load i32*, i32** %11
%119 = call i32 @fclose(i32* %118)
store i32 0, i32* %3
%120 = load i8*, i8** %13
%121 = load i32, i32* %3
ret i32 %121
}

LLVM IR (-O2):
@EI_NIDENT = global i32 0
@.str = [13 x i8] c"--reloc-info\00"
@.str.1 = [7 x i8] c"--text\00"
@.str.2 = [6 x i8] c"--bin\00"
@.str.3 = [7 x i8] c"--keep\00"
@.str.4 = [3 x i8] c"r+\00"
@.str.5 = [20 x i8] c"Cannot open %s: %s\0A\00"
@errno = global i32 0
@.str.6 = [19 x i8] c"Cannot read %s: %s\00"
@EI_CLASS = global i64 0
@ELFCLASS64 = global i8 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @EI_NIDENT
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %46
7: ; preds = %2
%8 = zext i32 %0 to i64
br label %9
9: ; preds = %7, %36
%10 = phi i64 [ 1, %7 ], [ %42, %36 ]
%11 = phi i32 [ 0, %7 ], [ %41, %36 ]
%12 = phi i32 [ 0, %7 ], [ %40, %36 ]
%13 = phi i32 [ 0, %7 ], [ %39, %36 ]
%14 = phi i8* [ null, %7 ], [ %38, %36 ]
%15 = phi i32 [ 0, %7 ], [ %37, %36 ]
%16 = getelementptr inbounds i8*, i8** %1, i64 %10
%17 = load i8*, i8** %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 45
br i1 %19, label %20, label %32
20: ; preds = %9
%21 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %36, label %23
23: ; preds = %20
%24 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %36, label %26
26: ; preds = %23
%27 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %36, label %29
29: ; preds = %26
%30 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %36, label %34
32: ; preds = %9
%33 = icmp eq i8* %14, null
br i1 %33, label %36, label %34
34: ; preds = %32, %29
%35 = tail call i32 (...) @usage()
br label %36
36: ; preds = %32, %29, %26, %23, %20, %34
%37 = phi i32 [ %15, %34 ], [ %15, %20 ], [ %15, %23 ], [ %15, %26 ], [ 1, %29 ], [ %15, %32 ]
%38 = phi i8* [ %14, %34 ], [ %14, %20 ], [ %14, %23 ], [ %14, %26 ], [ %14, %29 ], [ %17, %32 ]
%39 = phi i32 [ %13, %34 ], [ %13, %20 ], [ %13, %23 ], [ 1, %26 ], [ %13, %29 ], [ %13, %32 ]
%40 = phi i32 [ %12, %34 ], [ %12, %20 ], [ 1, %23 ], [ %12, %26 ], [ %12, %29 ], [ %12, %32 ]
%41 = phi i32 [ %11, %34 ], [ 1, %20 ], [ %11, %23 ], [ %11, %26 ], [ %11, %29 ], [ %11, %32 ]
%42 = add nuw nsw i64 %10, 1
%43 = icmp eq i64 %42, %8
br i1 %43, label %44, label %9
44: ; preds = %36
%45 = icmp eq i8* %38, null
br i1 %45, label %46, label %52
46: ; preds = %2, %44
%47 = phi i32 [ %41, %44 ], [ 0, %2 ]
%48 = phi i32 [ %40, %44 ], [ 0, %2 ]
%49 = phi i32 [ %39, %44 ], [ 0, %2 ]
%50 = phi i32 [ %37, %44 ], [ 0, %2 ]
%51 = tail call i32 (...) @usage()
br label %52
52: ; preds = %46, %44
%53 = phi i32 [ %47, %46 ], [ %41, %44 ]
%54 = phi i32 [ %48, %46 ], [ %40, %44 ]
%55 = phi i32 [ %49, %46 ], [ %39, %44 ]
%56 = phi i8* [ null, %46 ], [ %38, %44 ]
%57 = phi i32 [ %50, %46 ], [ %37, %44 ]
%58 = tail call i32* @fopen(i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%59 = icmp eq i32* %58, null
br i1 %59, label %60, label %64
60: ; preds = %52
%61 = load i32, i32* @errno
%62 = tail call i32 @strerror(i32 %61)
%63 = tail call i32 @die(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %56, i32 %62)
br label %64
64: ; preds = %60, %52
%65 = bitcast i8* %5 to i8**
%66 = load i32, i32* @EI_NIDENT
%67 = call i32 @fread(i8** %65, i32 1, i32 %66, i32* %58)
%68 = load i32, i32* @EI_NIDENT
%69 = icmp eq i32 %67, %68
br i1 %69, label %74, label %70
70: ; preds = %64
%71 = load i32, i32* @errno
%72 = tail call i32 @strerror(i32 %71)
%73 = tail call i32 @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* %56, i32 %72)
br label %74
74: ; preds = %70, %64
%75 = tail call i32 @rewind(i32* %58)
%76 = load i64, i64* @EI_CLASS
%77 = getelementptr inbounds i8, i8* %5, i64 %76
%78 = load i8, i8* %77
%79 = load i8, i8* @ELFCLASS64
%80 = icmp eq i8 %78, %79
br i1 %80, label %81, label %83
81: ; preds = %74
%82 = tail call i32 @process_64(i32* %58, i32 %54, i32 %55, i32 %53, i32 %57)
br label %85
83: ; preds = %74
%84 = tail call i32 @process_32(i32* %58, i32 %54, i32 %55, i32 %53, i32 %57)
br label %85
85: ; preds = %83, %81
%86 = tail call i32 @fclose(i32* %58)
ret i32 0
}