#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 uint8_t;
typedef int /*<<< orphan*/ buffer;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int fread(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
unsigned int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ isalnum(char);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  FILE *fp_in, *fp_out;
  unsigned int length, left;
  char fname[256], *p;
  uint8_t buffer[256];
  if (argc != 3) {
    printf("Usage: %s <binary file> <c file>\n", argv[0]);
    exit(-1);
  }
  fp_in = fopen(argv[1], "rb");
  if (fp_in == NULL) {
    printf("Failed to open file %s for reading\n", argv[1]);
    exit(-1);
  }
  fp_out = fopen(argv[2], "wt");
  if (fp_out == NULL) {
    printf("Failed to open file %s for output\n", argv[2]);
    exit(-1);
  }
  fseek(fp_in, 0, SEEK_END);
  length = ftell(fp_in);
  fseek(fp_in, 0, SEEK_SET);
  left = length;
  fprintf(fp_out, "/* Automatically generated file from %s */\n", argv[1]);
  strcpy(fname, argv[1]);
  for (p = fname; *p; p++)
    if (!isalnum(*p))
      *p = '_';
  fprintf(fp_out, "unsigned int %s_len = %d;\n", fname, length);
  fprintf(fp_out, "unsigned char %s[] = {\n\t", fname);
  while (left) {
    int to_read = left < sizeof(buffer) ? left : sizeof(buffer);
    int bytes = fread(buffer, 1, to_read, fp_in);
    int i;
    for (i = 0; i < bytes; i++)
      fprintf(fp_out, "0x%02x%s", buffer[i], (i % 16) == 15 ? ",\n\t" : ", ");
    left -= bytes;
  }
  fprintf(fp_out, "\n\t};\n");
  fclose(fp_in);
  fclose(fp_out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x560,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     11e0 <main+0x40>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe2f(%rip),%rdi
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe33(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1221 <main+0x81>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe13(%rip),%rdi
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe19(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1262 <main+0xc2>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xdf9(%rip),%rdi
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
mov    -0x18(%rbp),%rdi
mov    0x2d7b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    -0x18(%rbp),%rdi
call   1090 <ftell@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2d4b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdc0(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
lea    -0x130(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x130(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x138(%rbp),%rax
cmpb   $0x0,(%rax)
je     1326 <main+0x186>
mov    -0x138(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isalnum@plt>
cmp    $0x0,%eax
jne    130a <main+0x16a>
mov    -0x138(%rbp),%rax
movb   $0x5f,(%rax)
jmp    130f <main+0x16f>
mov    -0x138(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x138(%rbp)
jmp    12d8 <main+0x138>
mov    -0x20(%rbp),%rdi
lea    -0x130(%rbp),%rdx
mov    -0x24(%rbp),%ecx
lea    0xd60(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    -0x130(%rbp),%rdx
lea    0xd62(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
cmpl   $0x0,-0x28(%rbp)
je     1456 <main+0x2b6>
mov    -0x28(%rbp),%eax
cmp    $0x400,%rax
jae    1383 <main+0x1e3>
mov    -0x28(%rbp),%eax
mov    %rax,-0x558(%rbp)
jmp    1394 <main+0x1f4>
mov    $0x400,%eax
mov    %rax,-0x558(%rbp)
jmp    1394 <main+0x1f4>
mov    -0x558(%rbp),%rax
mov    %eax,-0x544(%rbp)
lea    -0x540(%rbp),%rdi
mov    -0x544(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %eax,-0x548(%rbp)
movl   $0x0,-0x54c(%rbp)
mov    -0x54c(%rbp),%eax
cmp    -0x548(%rbp),%eax
jge    1443 <main+0x2a3>
mov    -0x20(%rbp),%rdi
movslq -0x54c(%rbp),%rax
mov    -0x540(%rbp,%rax,4),%eax
mov    %eax,-0x55c(%rbp)
mov    -0x54c(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    -0x55c(%rbp),%edx
lea    0xcc9(%rip),%rcx
lea    0xcbe(%rip),%rax
cmp    $0xf,%esi
cmove  %rax,%rcx
lea    0xca7(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x54c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54c(%rbp)
jmp    13cc <main+0x22c>
mov    -0x548(%rbp),%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
jmp    135b <main+0x1bb>
mov    -0x20(%rbp),%rdi
lea    0xc7e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x560,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x528,%rsp
mov    %rsi,%r15
cmp    $0x3,%edi
jne    139d <main+0x1ed>
mov    0x8(%r15),%rdi
lea    0xe4a(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     13a9 <main+0x1f9>
mov    0x10(%r15),%rdi
lea    0xe53(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     13b6 <main+0x206>
mov    %rax,%rbx
mov    0x2dda(%rip),%rax
mov    (%rax),%edx
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    %rbp,%rdi
call   1090 <ftell@plt>
mov    %eax,%r12d
mov    0x2da7(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   10a0 <fseek@plt>
mov    0x8(%r15),%rdx
lea    0xe27(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x8(%r15),%rsi
lea    0x20(%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x20(%rsp),%al
test   %al,%al
je     128e <main+0xde>
lea    0x21(%rsp),%rbp
jmp    127c <main+0xcc>
nop
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
je     128e <main+0xde>
movsbl %al,%edi
call   1070 <isalnum@plt>
test   %eax,%eax
jne    1270 <main+0xc0>
movb   $0x5f,-0x1(%rbp)
jmp    1270 <main+0xc0>
lea    0xe06(%rip),%rsi
lea    0x20(%rsp),%rbp
mov    %rbx,%rdi
mov    %rbp,%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
lea    0xe05(%rip),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
test   %r12d,%r12d
je     135e <main+0x1ae>
lea    0xe0a(%rip),%r15
lea    0xe07(%rip),%r14
lea    0xdf3(%rip),%rbp
jmp    12ec <main+0x13c>
xchg   %ax,%ax
mov    0x1c(%rsp),%r12d
sub    0xc(%rsp),%r12d
je     135e <main+0x1ae>
cmp    $0x400,%r12d
mov    $0x400,%edx
mov    %r12d,0x1c(%rsp)
cmovb  %r12d,%edx
lea    0x120(%rsp),%rdi
mov    $0x1,%esi
mov    0x10(%rsp),%rcx
call   1040 <fread@plt>
mov    %eax,0xc(%rsp)
test   %eax,%eax
jle    12e0 <main+0x130>
mov    0xc(%rsp),%r12d
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
mov    0x120(%rsp,%r13,4),%edx
mov    %r13d,%eax
not    %eax
test   $0xf,%al
mov    %r14,%rcx
cmove  %r15,%rcx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
add    $0x1,%r13
cmp    %r13,%r12
jne    1330 <main+0x180>
jmp    12e0 <main+0x130>
lea    0xd7a(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10d0 <fwrite@plt>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x528,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%r15),%rsi
lea    0xc59(%rip),%rdi
jmp    13c1 <main+0x211>
mov    0x8(%r15),%rsi
lea    0xc71(%rip),%rdi
jmp    13c1 <main+0x211>
mov    0x10(%r15),%rsi
lea    0xc8b(%rip),%rdi
call   1060 <printf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Usage: %s <binary file> <c file>\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [36 x i8] c"Failed to open file %s for reading\0A\00"
@.str.3 = [3 x i8] c"wt\00"
@.str.4 = [35 x i8] c"Failed to open file %s for output\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.5 = [44 x i8] c"/* Automatically generated file from %s */\0A\00"
@.str.6 = [27 x i8] c"unsigned int %s_len = %d;\0A\00"
@.str.7 = [25 x i8] c"unsigned char %s[] = {\0A\09\00"
@.str.8 = [9 x i8] c"0x%02x%s\00"
@.str.9 = [4 x i8] c",\0A\09\00"
@.str.10 = [3 x i8] c", \00"
@.str.11 = [6 x i8] c"\0A\09};\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 i32
%10 = alloca [256 x i8]
%11 = alloca i8*
%12 = alloca [256 x i32]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 3
br i1 %17, label %18, label %24
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = call i32 @exit(i32 -1)
unreachable
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %28, i32** %6
%29 = load i32*, i32** %6
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %37
31: ; preds = %24
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* %34)
%36 = call i32 @exit(i32 -1)
unreachable
37: ; preds = %24
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %41, i32** %7
%42 = load i32*, i32** %7
%43 = icmp eq i32* %42, null
br i1 %43, label %44, label %50
44: ; preds = %37
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 2
%47 = load i8*, i8** %46
%48 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i8* %47)
%49 = call i32 @exit(i32 -1)
unreachable
50: ; preds = %37
%51 = load i32*, i32** %6
%52 = load i32, i32* @SEEK_END
%53 = call i32 @fseek(i32* %51, i32 0, i32 %52)
%54 = load i32*, i32** %6
%55 = call i32 @ftell(i32* %54)
store i32 %55, i32* %8
%56 = load i32*, i32** %6
%57 = load i32, i32* @SEEK_SET
%58 = call i32 @fseek(i32* %56, i32 0, i32 %57)
%59 = load i32, i32* %8
store i32 %59, i32* %9
%60 = load i32*, i32** %7
%61 = load i8**, i8*** %5
%62 = getelementptr inbounds i8*, i8** %61, i64 1
%63 = load i8*, i8** %62
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i8* %63)
%65 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%66 = load i8**, i8*** %5
%67 = getelementptr inbounds i8*, i8** %66, i64 1
%68 = load i8*, i8** %67
%69 = call i32 @strcpy(i8* %65, i8* %68)
%70 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
store i8* %70, i8** %11
br label %71
71: ; preds = %83, %50
%72 = load i8*, i8** %11
%73 = load i8, i8* %72
%74 = icmp ne i8 %73, 0
br i1 %74, label %75, label %86
75: ; preds = %71
%76 = load i8*, i8** %11
%77 = load i8, i8* %76
%78 = call i32 @isalnum(i8 signext %77)
%79 = icmp ne i32 %78, 0
br i1 %79, label %82, label %80
80: ; preds = %75
%81 = load i8*, i8** %11
store i8 95, i8* %81
br label %82
82: ; preds = %80, %75
br label %83
83: ; preds = %82
%84 = load i8*, i8** %11
%85 = getelementptr inbounds i8, i8* %84, i32 1
store i8* %85, i8** %11
br label %71
86: ; preds = %71
%87 = load i32*, i32** %7
%88 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%89 = load i32, i32* %8
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %87, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %88, i32 %89)
%91 = load i32*, i32** %7
%92 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %91, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %92)
br label %94
94: ; preds = %131, %86
%95 = load i32, i32* %9
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %135
97: ; preds = %94
%98 = load i32, i32* %9
%99 = zext i32 %98 to i64
%100 = icmp ult i64 %99, 1024
br i1 %100, label %101, label %104
101: ; preds = %97
%102 = load i32, i32* %9
%103 = zext i32 %102 to i64
br label %105
104: ; preds = %97
br label %105
105: ; preds = %104, %101
%106 = phi i64 [ %103, %101 ], [ 1024, %104 ]
%107 = trunc i64 %106 to i32
store i32 %107, i32* %13
%108 = getelementptr inbounds [256 x i32], [256 x i32]* %12, i64 0, i64 0
%109 = load i32, i32* %13
%110 = load i32*, i32** %6
%111 = call i32 @fread(i32* %108, i32 1, i32 %109, i32* %110)
store i32 %111, i32* %14
store i32 0, i32* %15
br label %112
112: ; preds = %128, %105
%113 = load i32, i32* %15
%114 = load i32, i32* %14
%115 = icmp slt i32 %113, %114
br i1 %115, label %116, label %131
116: ; preds = %112
%117 = load i32*, i32** %7
%118 = load i32, i32* %15
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [256 x i32], [256 x i32]* %12, i64 0, i64 %119
%121 = load i32, i32* %120
%122 = load i32, i32* %15
%123 = srem i32 %122, 16
%124 = icmp eq i32 %123, 15
%125 = zext i1 %124 to i64
%126 = select i1 %124, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0)
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %117, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %121, i8* %126)
br label %128
128: ; preds = %116
%129 = load i32, i32* %15
%130 = add nsw i32 %129, 1
store i32 %130, i32* %15
br label %112
131: ; preds = %112
%132 = load i32, i32* %14
%133 = load i32, i32* %9
%134 = sub i32 %133, %132
store i32 %134, i32* %9
br label %94
135: ; preds = %94
%136 = load i32*, i32** %7
%137 = call i32 (i32*, i8*, ...) @fprintf(i32* %136, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%138 = load i32*, i32** %6
%139 = call i32 @fclose(i32* %138)
%140 = load i32*, i32** %7
%141 = call i32 @fclose(i32* %140)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"Usage: %s <binary file> <c file>\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [36 x i8] c"Failed to open file %s for reading\0A\00"
@.str.3 = [3 x i8] c"wt\00"
@.str.4 = [35 x i8] c"Failed to open file %s for output\0A\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.5 = [44 x i8] c"/* Automatically generated file from %s */\0A\00"
@.str.6 = [27 x i8] c"unsigned int %s_len = %d;\0A\00"
@.str.7 = [25 x i8] c"unsigned char %s[] = {\0A\09\00"
@.str.8 = [9 x i8] c"0x%02x%s\00"
@.str.9 = [4 x i8] c",\0A\09\00"
@.str.10 = [3 x i8] c", \00"
@.str.11 = [6 x i8] c"\0A\09};\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = alloca [256 x i32]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%6 = bitcast [256 x i32]* %4 to i8*
%7 = icmp eq i32 %0, 3
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = tail call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32* %15, null
br i1 %16, label %17, label %21
17: ; preds = %12
%18 = load i8*, i8** %13
%19 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%20 = tail call i32 @exit(i32 -1)
unreachable
21: ; preds = %12
%22 = getelementptr inbounds i8*, i8** %1, i64 2
%23 = load i8*, i8** %22
%24 = tail call i32* @fopen(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i32* %24, null
br i1 %25, label %26, label %30
26: ; preds = %21
%27 = load i8*, i8** %22
%28 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i8* %27)
%29 = tail call i32 @exit(i32 -1)
unreachable
30: ; preds = %21
%31 = load i32, i32* @SEEK_END
%32 = tail call i32 @fseek(i32* %15, i32 0, i32 %31)
%33 = tail call i32 @ftell(i32* %15)
%34 = load i32, i32* @SEEK_SET
%35 = tail call i32 @fseek(i32* %15, i32 0, i32 %34)
%36 = load i8*, i8** %13
%37 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i8* %36)
%38 = load i8*, i8** %13
%39 = call i32 @strcpy(i8* %5, i8* %38)
%40 = load i8, i8* %5
%41 = icmp eq i8 %40, 0
br i1 %41, label %52, label %42
42: ; preds = %30, %48
%43 = phi i8 [ %50, %48 ], [ %40, %30 ]
%44 = phi i8* [ %49, %48 ], [ %5, %30 ]
%45 = call i32 @isalnum(i8 signext %43)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %42
store i8 95, i8* %44
br label %48
48: ; preds = %42, %47
%49 = getelementptr inbounds i8, i8* %44, i64 1
%50 = load i8, i8* %49
%51 = icmp eq i8 %50, 0
br i1 %51, label %52, label %42
52: ; preds = %48, %30
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %5, i32 %33)
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %5)
%55 = icmp eq i32 %33, 0
br i1 %55, label %79, label %56
56: ; preds = %52
%57 = getelementptr inbounds [256 x i32], [256 x i32]* %4, i64 0, i64 0
br label %58
58: ; preds = %56, %76
%59 = phi i32 [ %33, %56 ], [ %77, %76 ]
%60 = icmp ult i32 %59, 1024
%61 = select i1 %60, i32 %59, i32 1024
%62 = call i32 @fread(i32* %57, i32 1, i32 %61, i32* %15)
%63 = icmp sgt i32 %62, 0
br i1 %63, label %64, label %76
64: ; preds = %58
%65 = zext i32 %62 to i64
br label %66
66: ; preds = %64, %66
%67 = phi i64 [ 0, %64 ], [ %74, %66 ]
%68 = getelementptr inbounds [256 x i32], [256 x i32]* %4, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = and i64 %67, 15
%71 = icmp eq i64 %70, 15
%72 = select i1 %71, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0)
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %69, i8* %72)
%74 = add nuw nsw i64 %67, 1
%75 = icmp eq i64 %74, %65
br i1 %75, label %76, label %66
76: ; preds = %66, %58
%77 = sub i32 %59, %62
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %58
79: ; preds = %76, %52
%80 = call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i64 5, i64 1, i32* %24)
%81 = call i32 @fclose(i32* %15)
%82 = call i32 @fclose(i32* %24)
ret i32 0
}