#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 EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(char const *, int, int, int /*<<< orphan*/ *);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
char *strchr(char *, char);
int strlen(char const *);
int main(int argc, char *argv[]) {
  int c;
  int comment = 0;
  int linebreak = 1;
  const char *msg =
      "/* do not modify !! (automatically generated by initcode) */\n\n";
  char buf[32];
  int cnt;
  char *point;
  FILE *infp, *outfp;
  if (argc != 3) {
    printf("usage: %s infile outfile\n", argv[0]);
    return (1);
  }
  infp = fopen(argv[1], "r");
  if (!infp) {
    printf("could not open input file %s\n", argv[1]);
    return (1);
  }
  outfp = fopen(argv[2], "w");
  if (!outfp) {
    printf("could not open output file %s\n", argv[2]);
    fclose(infp);
    return (1);
  }
  fwrite(msg, strlen(msg), 1, outfp);
  fwrite("char ", 5, 1, outfp);
  if (argc == 4) {
    fwrite(argv[3], strlen(argv[3]), 1, outfp);
  } else {
    while ((point = strchr(argv[2], '.')) != NULL) {
      *point = '_';
    }
    fwrite(argv[2], strlen(argv[2]), 1, outfp);
  }
  fwrite("[] = {", 6, 1, outfp);
  cnt = 0;
  while ((c = getc(infp)) != EOF) {
    if (linebreak && c == '#')
      comment = 1;
    if (!comment) {
      sprintf(buf, "0x%x,", c);
      fwrite(buf, strlen(buf), 1, outfp);
      cnt++;
      if ((cnt % 10) == 0) {
        sprintf(buf, "\n  ");
        fwrite(buf, strlen(buf), 1, outfp);
      }
    }
    linebreak = 0;
    if ((char)c == '\n') {
      linebreak = 1;
      comment = 0;
    }
  }
  sprintf(buf, "0x0};\n");
  fwrite(buf, strlen(buf), 1, outfp);
  fclose(infp);
  fclose(outfp);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
lea    0xe52(%rip),%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11db <main+0x5b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe75(%rip),%rdi
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14c8 <main+0x348>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe6f(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jne    121e <main+0x9e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe4e(%rip),%rdi
call   1060 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14c8 <main+0x348>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe4c(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    126a <main+0xea>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe2b(%rip),%rdi
call   1060 <printf@plt>
mov    -0x68(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    14c8 <main+0x348>
mov    -0x28(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x78(%rbp),%rdi
mov    %eax,%esi
mov    -0x70(%rbp),%rcx
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    -0x70(%rbp),%rcx
lea    0xe00(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
cmpl   $0x4,-0x8(%rbp)
jne    12e5 <main+0x165>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x80(%rbp),%rdi
mov    %eax,%esi
mov    -0x70(%rbp),%rcx
mov    $0x1,%edx
call   1090 <fwrite@plt>
jmp    1349 <main+0x1c9>
jmp    12ea <main+0x16a>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    $0x2e,%esi
call   1050 <strchr@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
je     1316 <main+0x196>
mov    -0x60(%rbp),%rax
movb   $0x5f,(%rax)
jmp    12ea <main+0x16a>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <strlen@plt>
mov    -0x88(%rbp),%rdi
mov    %eax,%esi
mov    -0x70(%rbp),%rcx
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    -0x70(%rbp),%rcx
lea    0xd4c(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x68(%rbp),%rdi
call   10a0 <getc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2c6b(%rip),%rcx
cmp    (%rcx),%eax
je     1472 <main+0x2f2>
cmpl   $0x0,-0x1c(%rbp)
je     13a0 <main+0x220>
cmpl   $0x23,-0x14(%rbp)
jne    13a0 <main+0x220>
movl   $0x1,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1449 <main+0x2c9>
lea    -0x50(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xcef(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x90(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x90(%rbp),%rdi
mov    %eax,%esi
mov    -0x70(%rbp),%rcx
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1444 <main+0x2c4>
lea    -0x50(%rbp),%rdi
lea    0xc9b(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x98(%rbp),%rdi
mov    %eax,%esi
mov    -0x70(%rbp),%rcx
mov    $0x1,%edx
call   1090 <fwrite@plt>
jmp    1449 <main+0x2c9>
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
movsbl %al,%eax
cmp    $0xa,%eax
jne    146d <main+0x2ed>
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    136a <main+0x1ea>
lea    -0x50(%rbp),%rdi
lea    0xc34(%rip),%rsi
mov    $0x0,%al
call   1080 <sprintf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0xa0(%rbp)
lea    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0xa0(%rbp),%rdi
mov    %eax,%esi
mov    -0x70(%rbp),%rcx
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    -0x68(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x70(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    122b <main+0xab>
mov    0x8(%rbx),%rdi
lea    0xeb4(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,(%rsp)
test   %rax,%rax
je     1237 <main+0xb7>
mov    0x10(%rbx),%rdi
lea    0xeb7(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     12fa <main+0x17a>
mov    %rax,%r14
lea    0xe26(%rip),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbp,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
lea    0xe9f(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
nopl   (%rax)
mov    0x10(%rbx),%rbp
mov    %rbp,%rdi
mov    $0x2e,%esi
call   1050 <strchr@plt>
test   %rax,%rax
je     125b <main+0xdb>
movb   $0x5f,(%rax)
jmp    1210 <main+0x90>
mov    (%rbx),%rsi
lea    0xe0a(%rip),%rdi
jmp    1242 <main+0xc2>
mov    0x8(%rbx),%rsi
lea    0xe19(%rip),%rdi
call   1060 <printf@plt>
mov    $0x1,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbp,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
lea    0xe24(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r14,0x8(%rsp)
mov    %r14,%rcx
call   1090 <fwrite@plt>
mov    (%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <getc@plt>
mov    %eax,%ebp
mov    0x2d40(%rip),%rax
cmp    (%rax),%ebp
jne    1318 <main+0x198>
movl   $0xa3b7d,0x13(%rsp)
movl   $0x7d307830,0x10(%rsp)
7d
mov    %rbx,%rbp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%rbx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    %rbp,%rdi
call   1030 <fclose@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
jmp    124c <main+0xcc>
mov    0x10(%rbx),%rsi
lea    0xd76(%rip),%rdi
call   1060 <printf@plt>
mov    (%rsp),%rdi
call   1030 <fclose@plt>
jmp    1247 <main+0xc7>
lea    0x10(%rsp),%r12
xor    %r13d,%r13d
mov    $0x1,%r14d
xor    %r15d,%r15d
jmp    1361 <main+0x1e1>
nopl   0x0(%rax,%rax,1)
mov    (%rsp),%rbx
xor    %r14d,%r14d
cmp    $0xa,%bpl
sete   %r14b
mov    $0x0,%eax
cmove  %eax,%r13d
mov    %rbx,%rdi
call   10a0 <getc@plt>
mov    %eax,%ebp
mov    0x2c8f(%rip),%rax
cmp    (%rax),%ebp
je     12ac <main+0x12c>
mov    %r13d,%eax
cmp    $0x23,%ebp
mov    $0x1,%ecx
cmove  %ecx,%r13d
test   %r14d,%r14d
cmove  %eax,%r13d
test   %r13d,%r13d
jne    1334 <main+0x1b4>
mov    %r12,%rdi
lea    0xd21(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1080 <sprintf@plt>
mov    %r12,%rdi
call   1040 <strlen@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%rbx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
add    $0x1,%r15d
imul   $0xcccccccd,%r15d,%eax
add    $0x19999998,%eax
ror    %eax
cmp    $0x19999998,%eax
ja     1330 <main+0x1b0>
movl   $0x20200a,0x10(%rsp)
mov    %r12,%rdi
call   1040 <strlen@plt>
mov    %r12,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
jmp    1330 <main+0x1b0>

LLVM IR (-O0):
@.str = [63 x i8] c"/* do not modify !! (automatically generated by initcode) */\0A\0A\00"
@.str.1 = [26 x i8] c"usage: %s infile outfile\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [30 x i8] c"could not open input file %s\0A\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [31 x i8] c"could not open output file %s\0A\00"
@.str.6 = [6 x i8] c"char \00"
@.str.7 = [7 x i8] c"[] = {\00"
@EOF = global i32 0
@.str.8 = [6 x i8] c"0x%x,\00"
@.str.9 = [4 x i8] c"\0A \00"
@.str.10 = [7 x i8] c"0x0};\0A\00"
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 i8*
%10 = alloca [32 x i8]
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 1, i32* %8
store i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8** %9
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %22
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %20)
store i32 1, i32* %3
br label %147
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %26, i32** %13
%27 = load i32*, i32** %13
%28 = icmp ne i32* %27, null
br i1 %28, label %34, label %29
29: ; preds = %22
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %32)
store i32 1, i32* %3
br label %147
34: ; preds = %22
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 2
%37 = load i8*, i8** %36
%38 = call i32* @fopen(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %38, i32** %14
%39 = load i32*, i32** %14
%40 = icmp ne i32* %39, null
br i1 %40, label %48, label %41
41: ; preds = %34
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 2
%44 = load i8*, i8** %43
%45 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i8* %44)
%46 = load i32*, i32** %13
%47 = call i32 @fclose(i32* %46)
store i32 1, i32* %3
br label %147
48: ; preds = %34
%49 = load i8*, i8** %9
%50 = load i8*, i8** %9
%51 = call i32 @strlen(i8* %50)
%52 = load i32*, i32** %14
%53 = call i32 @fwrite(i8* %49, i32 %51, i32 1, i32* %52)
%54 = load i32*, i32** %14
%55 = call i32 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 5, i32 1, i32* %54)
%56 = load i32, i32* %4
%57 = icmp eq i32 %56, 4
br i1 %57, label %58, label %68
58: ; preds = %48
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 3
%61 = load i8*, i8** %60
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 3
%64 = load i8*, i8** %63
%65 = call i32 @strlen(i8* %64)
%66 = load i32*, i32** %14
%67 = call i32 @fwrite(i8* %61, i32 %65, i32 1, i32* %66)
br label %87
68: ; preds = %48
br label %69
69: ; preds = %75, %68
%70 = load i8**, i8*** %5
%71 = getelementptr inbounds i8*, i8** %70, i64 2
%72 = load i8*, i8** %71
%73 = call i8* @strchr(i8* %72, i8 signext 46)
store i8* %73, i8** %12
%74 = icmp ne i8* %73, null
br i1 %74, label %75, label %77
75: ; preds = %69
%76 = load i8*, i8** %12
store i8 95, i8* %76
br label %69
77: ; preds = %69
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 2
%80 = load i8*, i8** %79
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 2
%83 = load i8*, i8** %82
%84 = call i32 @strlen(i8* %83)
%85 = load i32*, i32** %14
%86 = call i32 @fwrite(i8* %80, i32 %84, i32 1, i32* %85)
br label %87
87: ; preds = %77, %58
%88 = load i32*, i32** %14
%89 = call i32 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 6, i32 1, i32* %88)
store i32 0, i32* %11
br label %90
90: ; preds = %134, %87
%91 = load i32*, i32** %13
%92 = call i32 @getc(i32* %91)
store i32 %92, i32* %6
%93 = load i32, i32* @EOF
%94 = icmp ne i32 %92, %93
br i1 %94, label %95, label %135
95: ; preds = %90
%96 = load i32, i32* %8
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %102
98: ; preds = %95
%99 = load i32, i32* %6
%100 = icmp eq i32 %99, 35
br i1 %100, label %101, label %102
101: ; preds = %98
store i32 1, i32* %7
br label %102
102: ; preds = %101, %98, %95
%103 = load i32, i32* %7
%104 = icmp ne i32 %103, 0
br i1 %104, label %128, label %105
105: ; preds = %102
%106 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%107 = load i32, i32* %6
%108 = call i32 (i8*, i8*, ...) @sprintf(i8* %106, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %107)
%109 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%110 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%111 = call i32 @strlen(i8* %110)
%112 = load i32*, i32** %14
%113 = call i32 @fwrite(i8* %109, i32 %111, i32 1, i32* %112)
%114 = load i32, i32* %11
%115 = add nsw i32 %114, 1
store i32 %115, i32* %11
%116 = load i32, i32* %11
%117 = srem i32 %116, 10
%118 = icmp eq i32 %117, 0
br i1 %118, label %119, label %127
119: ; preds = %105
%120 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%121 = call i32 (i8*, i8*, ...) @sprintf(i8* %120, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%122 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%123 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%124 = call i32 @strlen(i8* %123)
%125 = load i32*, i32** %14
%126 = call i32 @fwrite(i8* %122, i32 %124, i32 1, i32* %125)
br label %127
127: ; preds = %119, %105
br label %128
128: ; preds = %127, %102
store i32 0, i32* %8
%129 = load i32, i32* %6
%130 = trunc i32 %129 to i8
%131 = sext i8 %130 to i32
%132 = icmp eq i32 %131, 10
br i1 %132, label %133, label %134
133: ; preds = %128
store i32 1, i32* %8
store i32 0, i32* %7
br label %134
134: ; preds = %133, %128
br label %90
135: ; preds = %90
%136 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%137 = call i32 (i8*, i8*, ...) @sprintf(i8* %136, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%138 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%139 = getelementptr inbounds [32 x i8], [32 x i8]* %10, i64 0, i64 0
%140 = call i32 @strlen(i8* %139)
%141 = load i32*, i32** %14
%142 = call i32 @fwrite(i8* %138, i32 %140, i32 1, i32* %141)
%143 = load i32*, i32** %13
%144 = call i32 @fclose(i32* %143)
%145 = load i32*, i32** %14
%146 = call i32 @fclose(i32* %145)
store i32 0, i32* %3
br label %147
147: ; preds = %135, %41, %29, %17
%148 = load i32, i32* %3
ret i32 %148
}

LLVM IR (-O2):
@.str = [63 x i8] c"/* do not modify !! (automatically generated by initcode) */\0A\0A\00"
@.str.1 = [26 x i8] c"usage: %s infile outfile\0A\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [30 x i8] c"could not open input file %s\0A\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [31 x i8] c"could not open output file %s\0A\00"
@.str.6 = [6 x i8] c"char \00"
@.str.7 = [7 x i8] c"[] = {\00"
@EOF = global i32 0
@.str.8 = [6 x i8] c"0x%x,\00"
@.str.10 = [7 x i8] c"0x0};\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 3
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %82
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i8*, i8** %10
%16 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %15)
br label %82
17: ; preds = %9
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = tail call i32* @fopen(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %26
22: ; preds = %17
%23 = load i8*, i8** %18
%24 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i8* %23)
%25 = tail call i32 @fclose(i32* %12)
br label %82
26: ; preds = %17
%27 = tail call i32 @strlen(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%28 = tail call i32 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i32 %27, i32 1, i32* %20)
%29 = tail call i32 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 5, i32 1, i32* %20)
%30 = load i8*, i8** %18
%31 = tail call i8* @strchr(i8* dereferenceable(1) %30, i8 signext 46)
%32 = icmp eq i8* %31, null
br i1 %32, label %38, label %33
33: ; preds = %26, %33
%34 = phi i8* [ %36, %33 ], [ %31, %26 ]
store i8 95, i8* %34
%35 = load i8*, i8** %18
%36 = tail call i8* @strchr(i8* dereferenceable(1) %35, i8 signext 46)
%37 = icmp eq i8* %36, null
br i1 %37, label %38, label %33
38: ; preds = %33, %26
%39 = phi i8* [ %30, %26 ], [ %35, %33 ]
%40 = tail call i32 @strlen(i8* %39)
%41 = tail call i32 @fwrite(i8* %39, i32 %40, i32 1, i32* %20)
%42 = tail call i32 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 6, i32 1, i32* %20)
%43 = call i32 @getc(i32* %12)
%44 = load i32, i32* @EOF
%45 = icmp eq i32 %43, %44
br i1 %45, label %77, label %46
46: ; preds = %38
%47 = bitcast [32 x i8]* %3 to i32*
br label %48
48: ; preds = %46, %68
%49 = phi i32 [ %43, %46 ], [ %74, %68 ]
%50 = phi i32 [ 0, %46 ], [ %73, %68 ]
%51 = phi i32 [ 1, %46 ], [ %72, %68 ]
%52 = phi i32 [ 0, %46 ], [ %69, %68 ]
%53 = icmp ne i32 %51, 0
%54 = icmp eq i32 %49, 35
%55 = and i1 %53, %54
%56 = select i1 %55, i32 1, i32 %50
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %68
58: ; preds = %48
%59 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %49)
%60 = call i32 @strlen(i8* %4)
%61 = call i32 @fwrite(i8* %4, i32 %60, i32 1, i32* %20)
%62 = add nsw i32 %52, 1
%63 = srem i32 %62, 10
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %68
65: ; preds = %58
store i32 2105354, i32* %47
%66 = call i32 @strlen(i8* %4)
%67 = call i32 @fwrite(i8* %4, i32 %66, i32 1, i32* %20)
br label %68
68: ; preds = %58, %65, %48
%69 = phi i32 [ %52, %48 ], [ %62, %65 ], [ %62, %58 ]
%70 = and i32 %49, 255
%71 = icmp eq i32 %70, 10
%72 = zext i1 %71 to i32
%73 = select i1 %71, i32 0, i32 %56
%74 = call i32 @getc(i32* %12)
%75 = load i32, i32* @EOF
%76 = icmp eq i32 %74, %75
br i1 %76, label %77, label %48
77: ; preds = %68, %38
%78 = call i32 @strlen(i8* %4)
%79 = call i32 @fwrite(i8* %4, i32 %78, i32 1, i32* %20)
%80 = call i32 @fclose(i32* %12)
%81 = call i32 @fclose(i32* %20)
br label %82
82: ; preds = %77, %22, %14, %6
%83 = phi i32 [ 1, %6 ], [ 0, %77 ], [ 1, %22 ], [ 1, %14 ]
ret i32 %83
}