#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 fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
int getopt(int, char **, char *);
char *optarg;
int optind;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ *stdin;
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  const char *prefix = "";
  const char *suffix = "\n";
  int no_quote = 0;
  FILE *in = stdin;
  FILE *out = stdout;
  int c;
  while ((c = getopt(argc, argv, "np:s:h")) != -1) {
    switch (c) {
    case 'n':
      no_quote = 1;
      break;
    case 'p':
      prefix = optarg;
      break;
    case 's':
      suffix = optarg;
      break;
    case 'h':
      printf("Usage: %s [-n] [-p prefix] [-s suffix] [infile] [outfile]\n",
             argv[0]);
      exit(0);
      break;
    }
  }
  if (optind < argc) {
    if (strcmp(argv[optind], "-") != 0) {
      if (!(in = fopen(argv[optind], "r"))) {
        fprintf(stderr, "Can't open %s\n", argv[optind]);
        perror(argv[0]);
        exit(1);
      }
    }
    if (optind + 1 < argc) {
      if (strcmp(argv[optind + 1], "-") != 0) {
        if (!(out = fopen(argv[optind + 1], "w"))) {
          fprintf(stderr, "Can't open %s\n", argv[optind + 1]);
          perror(argv[0]);
          exit(1);
        }
      }
    }
  }
  fputs(prefix, out);
  if (!no_quote)
    fputs("\"", out);
  while ((c = fgetc(in)) != -1) {
    switch (c) {
    case '\0':
      fputs("\\0", out);
      break;
    case '\t':
      fputs("\\t", out);
      break;
    case '\n':
      fputs("\\n\"\n\"", out);
      break;
    case '\r':
      fputs("\\r", out);
      break;
    case '\\':
      fputs("\\\\", out);
      break;
    case '\"':
      fputs("\\\"", out);
      break;
    default:
      fputc(c, out);
      break;
    }
  }
  if (!no_quote)
    fputs("\"", out);
  fputs(suffix, 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)
lea    0xeb4(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xea8(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    0x2e06(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2dd8(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe33(%rip),%rdx
call   10b0 <getopt@plt>
mov    %eax,-0x3c(%rbp)
cmp    $0xffffffff,%eax
je     1288 <main+0xe8>
mov    -0x3c(%rbp),%eax
add    $0xffffff98,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0xb,%eax
ja     1283 <main+0xe3>
mov    -0x48(%rbp),%rax
lea    0xdd2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x24(%rbp)
jmp    1283 <main+0xe3>
mov    0x2dae(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1283 <main+0xe3>
mov    0x2d9b(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1283 <main+0xe3>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdc0(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
jmp    11ef <main+0x4f>
mov    0x2d49(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    13f4 <main+0x254>
mov    -0x10(%rbp),%rax
mov    0x2d33(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdbf(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     1330 <main+0x190>
mov    -0x10(%rbp),%rax
mov    0x2d0b(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdb7(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    132b <main+0x18b>
mov    0x2cd3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x2cd6(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd64(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
jmp    1330 <main+0x190>
mov    0x2ca1(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    13ef <main+0x24f>
mov    -0x10(%rbp),%rax
mov    0x2c88(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd0f(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     13ea <main+0x24a>
mov    -0x10(%rbp),%rax
mov    0x2c5b(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xcf3(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    13e5 <main+0x245>
mov    0x2c1e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x2c21(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xcaa(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
jmp    13ea <main+0x24a>
jmp    13ef <main+0x24f>
jmp    13f4 <main+0x254>
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <fputs@plt>
cmpl   $0x0,-0x24(%rbp)
jne    141b <main+0x27b>
mov    -0x38(%rbp),%rsi
lea    0xc79(%rip),%rdi
call   1040 <fputs@plt>
jmp    1420 <main+0x280>
mov    -0x30(%rbp),%rdi
call   1050 <fgetc@plt>
mov    %eax,-0x3c(%rbp)
cmp    $0xffffffff,%eax
je     152c <main+0x38c>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
test   %eax,%eax
je     149d <main+0x2fd>
jmp    1448 <main+0x2a8>
mov    -0x4c(%rbp),%eax
sub    $0x9,%eax
je     14b2 <main+0x312>
jmp    1459 <main+0x2b9>
mov    -0x4c(%rbp),%eax
sub    $0xa,%eax
je     14c7 <main+0x327>
jmp    146a <main+0x2ca>
mov    -0x4c(%rbp),%eax
sub    $0xd,%eax
je     14dc <main+0x33c>
jmp    147b <main+0x2db>
mov    -0x4c(%rbp),%eax
sub    $0x22,%eax
je     1506 <main+0x366>
jmp    148c <main+0x2ec>
mov    -0x4c(%rbp),%eax
sub    $0x5c,%eax
je     14f1 <main+0x351>
jmp    151b <main+0x37b>
mov    -0x38(%rbp),%rsi
lea    0xbdd(%rip),%rdi
call   1040 <fputs@plt>
jmp    1527 <main+0x387>
mov    -0x38(%rbp),%rsi
lea    0xbcb(%rip),%rdi
call   1040 <fputs@plt>
jmp    1527 <main+0x387>
mov    -0x38(%rbp),%rsi
lea    0xbb9(%rip),%rdi
call   1040 <fputs@plt>
jmp    1527 <main+0x387>
mov    -0x38(%rbp),%rsi
lea    0xbaa(%rip),%rdi
call   1040 <fputs@plt>
jmp    1527 <main+0x387>
mov    -0x38(%rbp),%rsi
lea    0xb98(%rip),%rdi
call   1040 <fputs@plt>
jmp    1527 <main+0x387>
mov    -0x38(%rbp),%rsi
lea    0xb86(%rip),%rdi
call   1040 <fputs@plt>
jmp    1527 <main+0x387>
mov    -0x3c(%rbp),%edi
mov    -0x38(%rbp),%rsi
call   1060 <fputc@plt>
jmp    1420 <main+0x280>
cmpl   $0x0,-0x24(%rbp)
jne    1546 <main+0x3a6>
mov    -0x38(%rbp),%rsi
lea    0xb4e(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <fputs@plt>
xor    %eax,%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    %rsi,%r12
mov    %edi,%ebp
mov    0x2e16(%rip),%rax
mov    (%rax),%rbx
mov    0x2dec(%rip),%rax
mov    (%rax),%r15
movl   $0x0,0x4(%rsp)
lea    0xf1a(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xf0f(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xec2(%rip),%r14
lea    0xdfb(%rip),%r13
jmp    1215 <main+0x65>
nopw   0x0(%rax,%rax,1)
cmp    $0xffffffff,%eax
je     1260 <main+0xb0>
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
call   10b0 <getopt@plt>
lea    -0x68(%rax),%ecx
cmp    $0xb,%ecx
ja     1210 <main+0x60>
movslq 0x0(%r13,%rcx,4),%rax
add    %r13,%rax
jmp    *%rax
movl   $0x1,0x4(%rsp)
jmp    1215 <main+0x65>
mov    0x2db3(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x8(%rsp)
jmp    1215 <main+0x65>
mov    0x2da2(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
jmp    1215 <main+0x65>
mov    0x2d71(%rip),%r14
movslq (%r14),%rax
cmp    %ebp,%eax
jge    12e2 <main+0x132>
mov    (%r12,%rax,8),%rdi
lea    0xe89(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12a2 <main+0xf2>
movslq (%r14),%rax
mov    (%r12,%rax,8),%rdi
lea    0xe91(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1420 <main+0x270>
movslq (%r14),%rax
lea    0x1(%rax),%ecx
cmp    %ebp,%ecx
jge    12e2 <main+0x132>
mov    0x8(%r12,%rax,8),%rdi
lea    0xe4a(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12e2 <main+0x132>
movslq (%r14),%rax
mov    0x8(%r12,%rax,8),%rdi
lea    0xe42(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
je     1432 <main+0x282>
mov    0x8(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
cmpl   $0x0,0x4(%rsp)
jne    1303 <main+0x153>
mov    $0x22,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
lea    0xd26(%rip),%rbp
lea    0xe0a(%rip),%r14
lea    0xe09(%rip),%r12
lea    0xe08(%rip),%r13
jmp    1348 <main+0x198>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xde6(%rip),%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rcx
call   10d0 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
lea    0x1(%rax),%ecx
cmp    $0x23,%ecx
ja     1380 <main+0x1d0>
movslq 0x0(%rbp,%rcx,4),%rcx
add    %rbp,%rcx
jmp    *%rcx
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xda2(%rip),%rdi
jmp    1340 <main+0x190>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x5c,%eax
jne    1398 <main+0x1e8>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xd8e(%rip),%rdi
jmp    1340 <main+0x190>
mov    %eax,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
jmp    1348 <main+0x198>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rdi
jmp    1340 <main+0x190>
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r14,%rdi
jmp    1340 <main+0x190>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r13,%rdi
jmp    1340 <main+0x190>
cmpl   $0x0,0x4(%rsp)
jne    13eb <main+0x23b>
mov    $0x22,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
mov    0x10(%rsp),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r12),%rsi
lea    0xcb3(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
mov    0x2ba1(%rip),%rax
mov    (%rax),%edi
movslq (%r14),%rax
mov    (%r12,%rax,8),%rdx
jmp    1443 <main+0x293>
mov    0x2b8f(%rip),%rax
mov    (%rax),%edi
movslq (%r14),%rax
mov    0x8(%r12,%rax,8),%rdx
lea    0xcba(%rip),%rsi
call   1080 <fprintf@plt>
mov    (%r12),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"\0A\00"
@stdin = global i32* null
@stdout = global i32* null
@.str.2 = [7 x i8] c"np:s:h\00"
@optarg = global i8* null
@.str.3 = [59 x i8] c"Usage: %s [-n] [-p prefix] [-s suffix] [infile] [outfile]\0A\00"
@optind = global i32 0
@.str.4 = [2 x i8] c"-\00"
@.str.5 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.6 = [15 x i8] c"Can't open %s\0A\00"
@.str.7 = [2 x i8] c"w\00"
@.str.8 = [2 x i8] c"\22\00"
@.str.9 = [3 x i8] c"\\0\00"
@.str.10 = [3 x i8] c"\\t\00"
@.str.11 = [6 x i8] c"\\n\22\0A\22\00"
@.str.12 = [3 x i8] c"\\r\00"
@.str.13 = [3 x i8] c"\\\\\00"
@.str.14 = [3 x i8] c"\\\22\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%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 i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %7
store i32 0, i32* %8
%12 = load i32*, i32** @stdin
store i32* %12, i32** %9
%13 = load i32*, i32** @stdout
store i32* %13, i32** %10
br label %14
14: ; preds = %32, %2
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @getopt(i32 %15, i8** %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i32 %17, i32* %11
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %33
19: ; preds = %14
%20 = load i32, i32* %11
switch i32 %20, label %32 [
i32 110, label %21
i32 112, label %22
i32 115, label %24
i32 104, label %26
]
21: ; preds = %19
store i32 1, i32* %8
br label %32
22: ; preds = %19
%23 = load i8*, i8** @optarg
store i8* %23, i8** %6
br label %32
24: ; preds = %19
%25 = load i8*, i8** @optarg
store i8* %25, i8** %7
br label %32
26: ; preds = %19
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 0
%29 = load i8*, i8** %28
%30 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0), i8* %29)
%31 = call i32 @exit(i32 0)
unreachable
32: ; preds = %19, %24, %22, %21
br label %14
33: ; preds = %14
%34 = load i32, i32* @optind
%35 = load i32, i32* %4
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %107
37: ; preds = %33
%38 = load i8**, i8*** %5
%39 = load i32, i32* @optind
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %38, i64 %40
%42 = load i8*, i8** %41
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%44 = icmp ne i64 %43, 0
br i1 %44, label %45, label %67
45: ; preds = %37
%46 = load i8**, i8*** %5
%47 = load i32, i32* @optind
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8*, i8** %46, i64 %48
%50 = load i8*, i8** %49
%51 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %51, i32** %9
%52 = icmp ne i32* %51, null
br i1 %52, label %66, label %53
53: ; preds = %45
%54 = load i32, i32* @stderr
%55 = load i8**, i8*** %5
%56 = load i32, i32* @optind
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8*, i8** %55, i64 %57
%59 = load i8*, i8** %58
%60 = call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %59)
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 0
%63 = load i8*, i8** %62
%64 = call i32 @perror(i8* %63)
%65 = call i32 @exit(i32 1)
unreachable
66: ; preds = %45
br label %67
67: ; preds = %66, %37
%68 = load i32, i32* @optind
%69 = add nsw i32 %68, 1
%70 = load i32, i32* %4
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %106
72: ; preds = %67
%73 = load i8**, i8*** %5
%74 = load i32, i32* @optind
%75 = add nsw i32 %74, 1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8*, i8** %73, i64 %76
%78 = load i8*, i8** %77
%79 = call i64 @strcmp(i8* %78, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %105
81: ; preds = %72
%82 = load i8**, i8*** %5
%83 = load i32, i32* @optind
%84 = add nsw i32 %83, 1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8*, i8** %82, i64 %85
%87 = load i8*, i8** %86
%88 = call i32* @fopen(i8* %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32* %88, i32** %10
%89 = icmp ne i32* %88, null
br i1 %89, label %104, label %90
90: ; preds = %81
%91 = load i32, i32* @stderr
%92 = load i8**, i8*** %5
%93 = load i32, i32* @optind
%94 = add nsw i32 %93, 1
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8*, i8** %92, i64 %95
%97 = load i8*, i8** %96
%98 = call i32 @fprintf(i32 %91, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %97)
%99 = load i8**, i8*** %5
%100 = getelementptr inbounds i8*, i8** %99, i64 0
%101 = load i8*, i8** %100
%102 = call i32 @perror(i8* %101)
%103 = call i32 @exit(i32 1)
unreachable
104: ; preds = %81
br label %105
105: ; preds = %104, %72
br label %106
106: ; preds = %105, %67
br label %107
107: ; preds = %106, %33
%108 = load i8*, i8** %6
%109 = load i32*, i32** %10
%110 = call i32 @fputs(i8* %108, i32* %109)
%111 = load i32, i32* %8
%112 = icmp ne i32 %111, 0
br i1 %112, label %116, label %113
113: ; preds = %107
%114 = load i32*, i32** %10
%115 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i32* %114)
br label %116
116: ; preds = %113, %107
br label %117
117: ; preds = %145, %116
%118 = load i32*, i32** %9
%119 = call i32 @fgetc(i32* %118)
store i32 %119, i32* %11
%120 = icmp ne i32 %119, -1
br i1 %120, label %121, label %146
121: ; preds = %117
%122 = load i32, i32* %11
switch i32 %122, label %141 [
i32 0, label %123
i32 9, label %126
i32 10, label %129
i32 13, label %132
i32 92, label %135
i32 34, label %138
]
123: ; preds = %121
%124 = load i32*, i32** %10
%125 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32* %124)
br label %145
126: ; preds = %121
%127 = load i32*, i32** %10
%128 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32* %127)
br label %145
129: ; preds = %121
%130 = load i32*, i32** %10
%131 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i32* %130)
br label %145
132: ; preds = %121
%133 = load i32*, i32** %10
%134 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32* %133)
br label %145
135: ; preds = %121
%136 = load i32*, i32** %10
%137 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32* %136)
br label %145
138: ; preds = %121
%139 = load i32*, i32** %10
%140 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i32* %139)
br label %145
141: ; preds = %121
%142 = load i32, i32* %11
%143 = load i32*, i32** %10
%144 = call i32 @fputc(i32 %142, i32* %143)
br label %145
145: ; preds = %141, %138, %135, %132, %129, %126, %123
br label %117
146: ; preds = %117
%147 = load i32, i32* %8
%148 = icmp ne i32 %147, 0
br i1 %148, label %152, label %149
149: ; preds = %146
%150 = load i32*, i32** %10
%151 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i32* %150)
br label %152
152: ; preds = %149, %146
%153 = load i8*, i8** %7
%154 = load i32*, i32** %10
%155 = call i32 @fputs(i8* %153, i32* %154)
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"\0A\00"
@stdin = global i32* null
@stdout = global i32* null
@.str.2 = [7 x i8] c"np:s:h\00"
@optarg = global i8* null
@.str.3 = [59 x i8] c"Usage: %s [-n] [-p prefix] [-s suffix] [infile] [outfile]\0A\00"
@optind = global i32 0
@.str.4 = [2 x i8] c"-\00"
@.str.5 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.6 = [15 x i8] c"Can't open %s\0A\00"
@.str.7 = [2 x i8] c"w\00"
@.str.9 = [3 x i8] c"\\0\00"
@.str.10 = [3 x i8] c"\\t\00"
@.str.11 = [6 x i8] c"\\n\22\0A\22\00"
@.str.12 = [3 x i8] c"\\r\00"
@.str.13 = [3 x i8] c"\\\\\00"
@.str.14 = [3 x i8] c"\\\22\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i32*, i32** @stdin
%4 = load i32*, i32** @stdout
br label %5
5: ; preds = %16, %2
%6 = phi i8* [ %17, %16 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %2 ]
%7 = phi i8* [ %10, %16 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %2 ]
%8 = phi i32 [ %13, %16 ], [ 0, %2 ]
br label %9
9: ; preds = %5, %18
%10 = phi i8* [ %7, %5 ], [ %19, %18 ]
%11 = phi i32 [ %8, %5 ], [ %13, %18 ]
br label %12
12: ; preds = %14, %9
%13 = phi i32 [ %11, %9 ], [ 1, %14 ]
br label %14
14: ; preds = %12, %14
%15 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
switch i32 %15, label %14 [
i32 -1, label %24
i32 110, label %12
i32 112, label %16
i32 115, label %18
i32 104, label %20
]
16: ; preds = %14
%17 = load i8*, i8** @optarg
br label %5
18: ; preds = %14
%19 = load i8*, i8** @optarg
br label %9
20: ; preds = %14
%21 = load i8*, i8** %1
%22 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0), i8* %21)
%23 = tail call i32 @exit(i32 0)
unreachable
24: ; preds = %14
%25 = load i32, i32* @optind
%26 = icmp slt i32 %25, %0
br i1 %26, label %27, label %80
27: ; preds = %24
%28 = sext i32 %25 to i64
%29 = getelementptr inbounds i8*, i8** %1, i64 %28
%30 = load i8*, i8** %29
%31 = tail call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %50, label %33
33: ; preds = %27
%34 = load i32, i32* @optind
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8*, i8** %1, i64 %35
%37 = load i8*, i8** %36
%38 = tail call i32* @fopen(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %50
40: ; preds = %33
%41 = load i32, i32* @stderr
%42 = load i32, i32* @optind
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %1, i64 %43
%45 = load i8*, i8** %44
%46 = tail call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %45)
%47 = load i8*, i8** %1
%48 = tail call i32 @perror(i8* %47)
%49 = tail call i32 @exit(i32 1)
unreachable
50: ; preds = %33, %27
%51 = phi i32* [ %38, %33 ], [ %3, %27 ]
%52 = load i32, i32* @optind
%53 = add nsw i32 %52, 1
%54 = icmp slt i32 %53, %0
br i1 %54, label %55, label %80
55: ; preds = %50
%56 = sext i32 %53 to i64
%57 = getelementptr inbounds i8*, i8** %1, i64 %56
%58 = load i8*, i8** %57
%59 = tail call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %80, label %61
61: ; preds = %55
%62 = load i32, i32* @optind
%63 = add nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8*, i8** %1, i64 %64
%66 = load i8*, i8** %65
%67 = tail call i32* @fopen(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%68 = icmp eq i32* %67, null
br i1 %68, label %69, label %80
69: ; preds = %61
%70 = load i32, i32* @stderr
%71 = load i32, i32* @optind
%72 = add nsw i32 %71, 1
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8*, i8** %1, i64 %73
%75 = load i8*, i8** %74
%76 = tail call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %75)
%77 = load i8*, i8** %1
%78 = tail call i32 @perror(i8* %77)
%79 = tail call i32 @exit(i32 1)
unreachable
80: ; preds = %50, %61, %55, %24
%81 = phi i32* [ %51, %61 ], [ %51, %55 ], [ %51, %50 ], [ %3, %24 ]
%82 = phi i32* [ %67, %61 ], [ %4, %55 ], [ %4, %50 ], [ %4, %24 ]
%83 = tail call i32 @fputs(i8* %6, i32* %82)
%84 = icmp eq i32 %13, 0
br i1 %84, label %85, label %87
85: ; preds = %80
%86 = tail call i32 @fputc(i32 34, i32* %82)
br label %87
87: ; preds = %85, %80
br label %88
88: ; preds = %104, %87
%89 = tail call i32 @fgetc(i32* %81)
switch i32 %89, label %102 [
i32 -1, label %105
i32 0, label %90
i32 9, label %92
i32 10, label %94
i32 13, label %96
i32 92, label %98
i32 34, label %100
]
90: ; preds = %88
%91 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i64 2, i64 1, i32* %82)
br label %104
92: ; preds = %88
%93 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i64 2, i64 1, i32* %82)
br label %104
94: ; preds = %88
%95 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i64 5, i64 1, i32* %82)
br label %104
96: ; preds = %88
%97 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i64 2, i64 1, i32* %82)
br label %104
98: ; preds = %88
%99 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i64 2, i64 1, i32* %82)
br label %104
100: ; preds = %88
%101 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i64 2, i64 1, i32* %82)
br label %104
102: ; preds = %88
%103 = tail call i32 @fputc(i32 %89, i32* %82)
br label %104
104: ; preds = %102, %100, %98, %96, %94, %92, %90
br label %88
105: ; preds = %88
br i1 %84, label %106, label %108
106: ; preds = %105
%107 = tail call i32 @fputc(i32 34, i32* %82)
br label %108
108: ; preds = %106, %105
%109 = tail call i32 @fputs(i8* %10, i32* %82)
ret i32 0
}