#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*/ EXIT_FAILURE;
int draw_main(int, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ namematch(char *, char *, char *, int);
int pdfclean_main(int, char **);
int pdfextract_main(int, char **);
int pdfinfo_main(int, char **);
int pdfshow_main(int, char **);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  char *start, *end;
  if (argc == 0) {
    fprintf(stderr, "No command name found!\n");
    exit(EXIT_FAILURE);
  }
  end = start = argv[0];
  while (*end)
    end++;
  if ((end - 4 >= start) && (end[-4] == '.') && (end[-3] == 'e') &&
      (end[-2] == 'x') && (end[-1] == 'e'))
    end = end - 4;
  if (namematch(end, start, "mupdfdraw", 9) ||
      namematch(end, start, "muxpsdraw", 9) ||
      namematch(end, start, "mudraw", 6))
    return draw_main(argc, argv);
  if (namematch(end, start, "mupdfclean", 10))
    return pdfclean_main(argc, argv);
  if (namematch(end, start, "mupdfextract", 12))
    return pdfextract_main(argc, argv);
  if (namematch(end, start, "mupdfshow", 9))
    return pdfshow_main(argc, argv);
  if (namematch(end, start, "mupdfinfo", 9))
    return pdfinfo_main(argc, argv);
  if (namematch(end, start, "pdfdraw", 7) ||
      namematch(end, start, "xpsdraw", 7))
    return draw_main(argc, argv);
  if (namematch(end, start, "pdfclean", 8))
    return pdfclean_main(argc, argv);
  if (namematch(end, start, "pdfextract", 10))
    return pdfextract_main(argc, argv);
  if (namematch(end, start, "pdfshow", 7))
    return pdfshow_main(argc, argv);
  if (namematch(end, start, "pdfinfo", 7))
    return pdfinfo_main(argc, argv);
  fprintf(stderr, "mubusy: Combined build of mupdf/mudraw tools.\n\n");
  fprintf(stderr, "Invoke as one of the following:\n");
  fprintf(stderr,
          "\tmupdfclean, mudraw, mupdfextract, mupdfinfo, mupdfshow.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    11c3 <main+0x43>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
lea    0xe50(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     11f0 <main+0x70>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11d2 <main+0x52>
mov    -0x20(%rbp),%rax
add    $0xfffffffffffffffc,%rax
cmp    -0x18(%rbp),%rax
jb     1252 <main+0xd2>
mov    -0x20(%rbp),%rax
movsbl -0x4(%rax),%eax
cmp    $0x2e,%eax
jne    1252 <main+0xd2>
mov    -0x20(%rbp),%rax
movsbl -0x3(%rax),%eax
cmp    $0x65,%eax
jne    1252 <main+0xd2>
mov    -0x20(%rbp),%rax
movsbl -0x2(%rax),%eax
cmp    $0x78,%eax
jne    1252 <main+0xd2>
mov    -0x20(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x65,%eax
jne    1252 <main+0xd2>
mov    -0x20(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xdb7(%rip),%rdx
mov    $0x9,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
jne    12bb <main+0x13b>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xd9e(%rip),%rdx
mov    $0x9,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
jne    12bb <main+0x13b>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xd85(%rip),%rdx
mov    $0x6,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     12cf <main+0x14f>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <draw_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xd55(%rip),%rdx
mov    $0xa,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     1306 <main+0x186>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <pdfclean_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xd29(%rip),%rdx
mov    $0xc,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     133d <main+0x1bd>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <pdfextract_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xcff(%rip),%rdx
mov    $0x9,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     1374 <main+0x1f4>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <pdfshow_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xcd2(%rip),%rdx
mov    $0x9,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     13ab <main+0x22b>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <pdfinfo_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xc60(%rip),%rdx
mov    $0x7,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
jne    13f1 <main+0x271>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xc47(%rip),%rdx
mov    $0x7,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     1405 <main+0x285>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <draw_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xc21(%rip),%rdx
mov    $0x8,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     143c <main+0x2bc>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <pdfclean_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xbf5(%rip),%rdx
mov    $0xa,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     1473 <main+0x2f3>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <pdfextract_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xbcb(%rip),%rdx
mov    $0x7,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     14aa <main+0x32a>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <pdfshow_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xb9e(%rip),%rdx
mov    $0x7,%ecx
call   1040 <namematch@plt>
cmp    $0x0,%rax
je     14e1 <main+0x361>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <pdfinfo_main@plt>
mov    %eax,-0x4(%rbp)
jmp    1527 <main+0x3a7>
mov    0x2af8(%rip),%rax
mov    (%rax),%edi
lea    0xb6e(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2ae3(%rip),%rax
mov    (%rax),%edi
lea    0xb89(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2ace(%rip),%rax
mov    (%rax),%edi
lea    0xb95(%rip),%rsi
call   1070 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     13f8 <main+0x278>
mov    %rsi,%r14
mov    %edi,%r15d
mov    (%rsi),%rbx
lea    -0x1(%rbx),%rbp
nopl   0x0(%rax)
cmpb   $0x0,0x1(%rbp)
lea    0x1(%rbp),%rbp
jne    11a0 <main+0x20>
lea    -0x4(%rbp),%rax
cmp    %rbx,%rax
jb     11cd <main+0x4d>
cmpb   $0x2e,-0x4(%rbp)
jne    11cd <main+0x4d>
cmpb   $0x65,-0x3(%rbp)
jne    11cd <main+0x4d>
cmpb   $0x78,-0x2(%rbp)
jne    11cd <main+0x4d>
cmpb   $0x65,-0x1(%rbp)
cmove  %rax,%rbp
lea    0xe44(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x9,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    1221 <main+0xa1>
lea    0xe32(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x9,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    1221 <main+0xa1>
lea    0xe20(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x6,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
je     1236 <main+0xb6>
mov    %r15d,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <draw_main@plt>
lea    0xdf6(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0xa,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
je     1267 <main+0xe7>
mov    %r15d,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <pdfclean_main@plt>
lea    0xdd0(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0xc,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
je     1298 <main+0x118>
mov    %r15d,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <pdfextract_main@plt>
lea    0xdac(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x9,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
je     12c9 <main+0x149>
mov    %r15d,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <pdfshow_main@plt>
lea    0xd85(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x9,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
je     12fa <main+0x17a>
mov    %r15d,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <pdfinfo_main@plt>
lea    0xd19(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x7,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    1221 <main+0xa1>
lea    0xd03(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x7,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    1221 <main+0xa1>
lea    0xcf4(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x8,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    1252 <main+0xd2>
lea    0xcdf(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0xa,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    1283 <main+0x103>
lea    0xccc(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x7,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    12b4 <main+0x134>
lea    0xcb6(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x7,%ecx
call   1040 <namematch@plt>
test   %rax,%rax
jne    12e5 <main+0x165>
mov    0x2c1f(%rip),%rbx
mov    (%rbx),%edi
lea    0xc95(%rip),%rsi
call   1070 <fprintf@plt>
mov    (%rbx),%edi
lea    0xcb7(%rip),%rsi
call   1070 <fprintf@plt>
mov    (%rbx),%edi
lea    0xcca(%rip),%rsi
call   1070 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2be1(%rip),%rax
mov    (%rax),%edi
lea    0xbf8(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2bc4(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"No command name found!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [10 x i8] c"mupdfdraw\00"
@.str.2 = [10 x i8] c"muxpsdraw\00"
@.str.3 = [7 x i8] c"mudraw\00"
@.str.4 = [11 x i8] c"mupdfclean\00"
@.str.5 = [13 x i8] c"mupdfextract\00"
@.str.6 = [10 x i8] c"mupdfshow\00"
@.str.7 = [10 x i8] c"mupdfinfo\00"
@.str.8 = [8 x i8] c"pdfdraw\00"
@.str.9 = [8 x i8] c"xpsdraw\00"
@.str.10 = [9 x i8] c"pdfclean\00"
@.str.11 = [11 x i8] c"pdfextract\00"
@.str.12 = [8 x i8] c"pdfshow\00"
@.str.13 = [8 x i8] c"pdfinfo\00"
@.str.14 = [48 x i8] c"mubusy: Combined build of mupdf/mudraw tools.\0A\0A\00"
@.str.15 = [33 x i8] c"Invoke as one of the following:\0A\00"
@.str.16 = [58 x i8] c"\09mupdfclean, mudraw, mupdfextract, mupdfinfo, mupdfshow.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
store i8* %18, i8** %6
store i8* %18, i8** %7
br label %19
19: ; preds = %23, %15
%20 = load i8*, i8** %7
%21 = load i8, i8* %20
%22 = icmp ne i8 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = load i8*, i8** %7
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %7
br label %19
26: ; preds = %19
%27 = load i8*, i8** %7
%28 = getelementptr inbounds i8, i8* %27, i64 -4
%29 = load i8*, i8** %6
%30 = icmp uge i8* %28, %29
br i1 %30, label %31, label %58
31: ; preds = %26
%32 = load i8*, i8** %7
%33 = getelementptr inbounds i8, i8* %32, i64 -4
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 46
br i1 %36, label %37, label %58
37: ; preds = %31
%38 = load i8*, i8** %7
%39 = getelementptr inbounds i8, i8* %38, i64 -3
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp eq i32 %41, 101
br i1 %42, label %43, label %58
43: ; preds = %37
%44 = load i8*, i8** %7
%45 = getelementptr inbounds i8, i8* %44, i64 -2
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 120
br i1 %48, label %49, label %58
49: ; preds = %43
%50 = load i8*, i8** %7
%51 = getelementptr inbounds i8, i8* %50, i64 -1
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp eq i32 %53, 101
br i1 %54, label %55, label %58
55: ; preds = %49
%56 = load i8*, i8** %7
%57 = getelementptr inbounds i8, i8* %56, i64 -4
store i8* %57, i8** %7
br label %58
58: ; preds = %55, %49, %43, %37, %31, %26
%59 = load i8*, i8** %7
%60 = load i8*, i8** %6
%61 = call i64 @namematch(i8* %59, i8* %60, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%62 = icmp ne i64 %61, 0
br i1 %62, label %73, label %63
63: ; preds = %58
%64 = load i8*, i8** %7
%65 = load i8*, i8** %6
%66 = call i64 @namematch(i8* %64, i8* %65, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%67 = icmp ne i64 %66, 0
br i1 %67, label %73, label %68
68: ; preds = %63
%69 = load i8*, i8** %7
%70 = load i8*, i8** %6
%71 = call i64 @namematch(i8* %69, i8* %70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 6)
%72 = icmp ne i64 %71, 0
br i1 %72, label %73, label %77
73: ; preds = %68, %63, %58
%74 = load i32, i32* %4
%75 = load i8**, i8*** %5
%76 = call i32 @draw_main(i32 %74, i8** %75)
store i32 %76, i32* %3
br label %170
77: ; preds = %68
%78 = load i8*, i8** %7
%79 = load i8*, i8** %6
%80 = call i64 @namematch(i8* %78, i8* %79, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 10)
%81 = icmp ne i64 %80, 0
br i1 %81, label %82, label %86
82: ; preds = %77
%83 = load i32, i32* %4
%84 = load i8**, i8*** %5
%85 = call i32 @pdfclean_main(i32 %83, i8** %84)
store i32 %85, i32* %3
br label %170
86: ; preds = %77
%87 = load i8*, i8** %7
%88 = load i8*, i8** %6
%89 = call i64 @namematch(i8* %87, i8* %88, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 12)
%90 = icmp ne i64 %89, 0
br i1 %90, label %91, label %95
91: ; preds = %86
%92 = load i32, i32* %4
%93 = load i8**, i8*** %5
%94 = call i32 @pdfextract_main(i32 %92, i8** %93)
store i32 %94, i32* %3
br label %170
95: ; preds = %86
%96 = load i8*, i8** %7
%97 = load i8*, i8** %6
%98 = call i64 @namematch(i8* %96, i8* %97, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 9)
%99 = icmp ne i64 %98, 0
br i1 %99, label %100, label %104
100: ; preds = %95
%101 = load i32, i32* %4
%102 = load i8**, i8*** %5
%103 = call i32 @pdfshow_main(i32 %101, i8** %102)
store i32 %103, i32* %3
br label %170
104: ; preds = %95
%105 = load i8*, i8** %7
%106 = load i8*, i8** %6
%107 = call i64 @namematch(i8* %105, i8* %106, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 9)
%108 = icmp ne i64 %107, 0
br i1 %108, label %109, label %113
109: ; preds = %104
%110 = load i32, i32* %4
%111 = load i8**, i8*** %5
%112 = call i32 @pdfinfo_main(i32 %110, i8** %111)
store i32 %112, i32* %3
br label %170
113: ; preds = %104
%114 = load i8*, i8** %7
%115 = load i8*, i8** %6
%116 = call i64 @namematch(i8* %114, i8* %115, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 7)
%117 = icmp ne i64 %116, 0
br i1 %117, label %123, label %118
118: ; preds = %113
%119 = load i8*, i8** %7
%120 = load i8*, i8** %6
%121 = call i64 @namematch(i8* %119, i8* %120, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 7)
%122 = icmp ne i64 %121, 0
br i1 %122, label %123, label %127
123: ; preds = %118, %113
%124 = load i32, i32* %4
%125 = load i8**, i8*** %5
%126 = call i32 @draw_main(i32 %124, i8** %125)
store i32 %126, i32* %3
br label %170
127: ; preds = %118
%128 = load i8*, i8** %7
%129 = load i8*, i8** %6
%130 = call i64 @namematch(i8* %128, i8* %129, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 8)
%131 = icmp ne i64 %130, 0
br i1 %131, label %132, label %136
132: ; preds = %127
%133 = load i32, i32* %4
%134 = load i8**, i8*** %5
%135 = call i32 @pdfclean_main(i32 %133, i8** %134)
store i32 %135, i32* %3
br label %170
136: ; preds = %127
%137 = load i8*, i8** %7
%138 = load i8*, i8** %6
%139 = call i64 @namematch(i8* %137, i8* %138, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 10)
%140 = icmp ne i64 %139, 0
br i1 %140, label %141, label %145
141: ; preds = %136
%142 = load i32, i32* %4
%143 = load i8**, i8*** %5
%144 = call i32 @pdfextract_main(i32 %142, i8** %143)
store i32 %144, i32* %3
br label %170
145: ; preds = %136
%146 = load i8*, i8** %7
%147 = load i8*, i8** %6
%148 = call i64 @namematch(i8* %146, i8* %147, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 7)
%149 = icmp ne i64 %148, 0
br i1 %149, label %150, label %154
150: ; preds = %145
%151 = load i32, i32* %4
%152 = load i8**, i8*** %5
%153 = call i32 @pdfshow_main(i32 %151, i8** %152)
store i32 %153, i32* %3
br label %170
154: ; preds = %145
%155 = load i8*, i8** %7
%156 = load i8*, i8** %6
%157 = call i64 @namematch(i8* %155, i8* %156, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i32 7)
%158 = icmp ne i64 %157, 0
br i1 %158, label %159, label %163
159: ; preds = %154
%160 = load i32, i32* %4
%161 = load i8**, i8*** %5
%162 = call i32 @pdfinfo_main(i32 %160, i8** %161)
store i32 %162, i32* %3
br label %170
163: ; preds = %154
%164 = load i32, i32* @stderr
%165 = call i32 @fprintf(i32 %164, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%166 = load i32, i32* @stderr
%167 = call i32 @fprintf(i32 %166, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0))
%168 = load i32, i32* @stderr
%169 = call i32 @fprintf(i32 %168, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.16, i64 0, i64 0))
store i32 0, i32* %3
br label %170
170: ; preds = %163, %159, %150, %141, %132, %123, %109, %100, %91, %82, %73
%171 = load i32, i32* %3
ret i32 %171
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"No command name found!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [10 x i8] c"mupdfdraw\00"
@.str.2 = [10 x i8] c"muxpsdraw\00"
@.str.3 = [7 x i8] c"mudraw\00"
@.str.4 = [11 x i8] c"mupdfclean\00"
@.str.5 = [13 x i8] c"mupdfextract\00"
@.str.6 = [10 x i8] c"mupdfshow\00"
@.str.7 = [10 x i8] c"mupdfinfo\00"
@.str.8 = [8 x i8] c"pdfdraw\00"
@.str.9 = [8 x i8] c"xpsdraw\00"
@.str.10 = [9 x i8] c"pdfclean\00"
@.str.11 = [11 x i8] c"pdfextract\00"
@.str.12 = [8 x i8] c"pdfshow\00"
@.str.13 = [8 x i8] c"pdfinfo\00"
@.str.14 = [48 x i8] c"mubusy: Combined build of mupdf/mudraw tools.\0A\0A\00"
@.str.15 = [33 x i8] c"Invoke as one of the following:\0A\00"
@.str.16 = [58 x i8] c"\09mupdfclean, mudraw, mupdfextract, mupdfinfo, mupdfshow.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = load i8*, i8** %1
br label %11
11: ; preds = %11, %9
%12 = phi i8* [ %10, %9 ], [ %15, %11 ]
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
%15 = getelementptr inbounds i8, i8* %12, i64 1
br i1 %14, label %16, label %11
16: ; preds = %11
%17 = getelementptr inbounds i8, i8* %12, i64 -4
%18 = icmp ult i8* %17, %10
br i1 %18, label %35, label %19
19: ; preds = %16
%20 = load i8, i8* %17
%21 = icmp eq i8 %20, 46
br i1 %21, label %22, label %35
22: ; preds = %19
%23 = getelementptr inbounds i8, i8* %12, i64 -3
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 101
br i1 %25, label %26, label %35
26: ; preds = %22
%27 = getelementptr inbounds i8, i8* %12, i64 -2
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 120
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = getelementptr inbounds i8, i8* %12, i64 -1
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 101
%34 = select i1 %33, i8* %17, i8* %12
br label %35
35: ; preds = %30, %26, %22, %19, %16
%36 = phi i8* [ %12, %26 ], [ %12, %22 ], [ %12, %19 ], [ %12, %16 ], [ %34, %30 ]
%37 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %45
39: ; preds = %35
%40 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %39
%43 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 6)
%44 = icmp eq i64 %43, 0
br i1 %44, label %47, label %45
45: ; preds = %42, %39, %35
%46 = tail call i32 @draw_main(i32 %0, i8** %1)
br label %102
47: ; preds = %42
%48 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 10)
%49 = icmp eq i64 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %47
%51 = tail call i32 @pdfclean_main(i32 %0, i8** %1)
br label %102
52: ; preds = %47
%53 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 12)
%54 = icmp eq i64 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = tail call i32 @pdfextract_main(i32 %0, i8** %1)
br label %102
57: ; preds = %52
%58 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 9)
%59 = icmp eq i64 %58, 0
br i1 %59, label %62, label %60
60: ; preds = %57
%61 = tail call i32 @pdfshow_main(i32 %0, i8** %1)
br label %102
62: ; preds = %57
%63 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 9)
%64 = icmp eq i64 %63, 0
br i1 %64, label %67, label %65
65: ; preds = %62
%66 = tail call i32 @pdfinfo_main(i32 %0, i8** %1)
br label %102
67: ; preds = %62
%68 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 7)
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %67
%71 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 7)
%72 = icmp eq i64 %71, 0
br i1 %72, label %75, label %73
73: ; preds = %70, %67
%74 = tail call i32 @draw_main(i32 %0, i8** %1)
br label %102
75: ; preds = %70
%76 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 8)
%77 = icmp eq i64 %76, 0
br i1 %77, label %80, label %78
78: ; preds = %75
%79 = tail call i32 @pdfclean_main(i32 %0, i8** %1)
br label %102
80: ; preds = %75
%81 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 10)
%82 = icmp eq i64 %81, 0
br i1 %82, label %85, label %83
83: ; preds = %80
%84 = tail call i32 @pdfextract_main(i32 %0, i8** %1)
br label %102
85: ; preds = %80
%86 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 7)
%87 = icmp eq i64 %86, 0
br i1 %87, label %90, label %88
88: ; preds = %85
%89 = tail call i32 @pdfshow_main(i32 %0, i8** %1)
br label %102
90: ; preds = %85
%91 = tail call i64 @namematch(i8* %36, i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i32 7)
%92 = icmp eq i64 %91, 0
br i1 %92, label %95, label %93
93: ; preds = %90
%94 = tail call i32 @pdfinfo_main(i32 %0, i8** %1)
br label %102
95: ; preds = %90
%96 = load i32, i32* @stderr
%97 = tail call i32 @fprintf(i32 %96, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%98 = load i32, i32* @stderr
%99 = tail call i32 @fprintf(i32 %98, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0))
%100 = load i32, i32* @stderr
%101 = tail call i32 @fprintf(i32 %100, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.16, i64 0, i64 0))
br label %102
102: ; preds = %95, %93, %88, %83, %78, %73, %65, %60, %55, %50, %45
%103 = phi i32 [ %46, %45 ], [ %51, %50 ], [ %56, %55 ], [ %61, %60 ], [ %66, %65 ], [ %74, %73 ], [ %79, %78 ], [ %84, %83 ], [ %89, %88 ], [ %94, %93 ], [ 0, %95 ]
ret i32 %103
}