#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 */
struct stat {
  int st_size;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  FILE *f, *fo;
  char fnameo[1024];
  int i, c, fsize;
  struct stat sb;
  if (argc != 2) {
    fprintf(stderr, "Usage: %s [font]\n", argv[0]);
    return (EXIT_FAILURE);
  }
  if (stat(argv[1], &sb) == -1) {
    fprintf(stderr, "Couldn't read filesize of '%s': %s\n", argv[1],
            strerror(errno));
    return (EXIT_FAILURE);
  }
  fsize = sb.st_size;
  f = fopen(argv[1], "rb");
  if (f == NULL) {
    fprintf(stderr, "Couldn't open file '%s' for reading: %s\n", argv[1],
            strerror(errno));
    return (EXIT_FAILURE);
  }
  sprintf(fnameo, "%s.h", argv[1]);
  fo = fopen(fnameo, "wb");
  if (fo == NULL) {
    fprintf(stderr, "Couldn't open file '%s' for writing: %s\n", fnameo,
            strerror(errno));
    fclose(f);
    return (EXIT_FAILURE);
  }
  fprintf(fo,
          "struct {\n  int size;\n  const char *data;\n} arial = {\n  %d,\n",
          fsize);
  i = 0;
  while (!feof(f)) {
    c = fgetc(f);
    if (c == EOF)
      break;
    if (!(i % 20))
      fprintf(fo, "  \"");
    fprintf(fo, "\\x%02X", c);
    i++;
    if (!(i % 20))
      fprintf(fo, "\"\n");
  }
  if (i % 20)
    fprintf(fo, "\"\n");
  fprintf(fo, "};\n");
  fclose(f);
  fclose(fo);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x460,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11d3 <main+0x53>
mov    0x2e2e(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe45(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dff(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    14be <main+0x33e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    -0x430(%rbp),%rsi
call   1070 <stat@plt>
cmp    $0xffffffff,%eax
jne    124e <main+0xce>
mov    0x2de1(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0x440(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x438(%rbp)
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    -0x440(%rbp),%rdi
mov    -0x438(%rbp),%rdx
mov    %rax,%rcx
lea    0xddc(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    14be <main+0x33e>
mov    -0x430(%rbp),%eax
mov    %eax,-0x42c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdcd(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    12db <main+0x15b>
mov    0x2d54(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0x450(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x448(%rbp)
mov    0x2d2c(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    -0x450(%rbp),%rdi
mov    -0x448(%rbp),%rdx
mov    %rax,%rcx
lea    0xd76(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2cf7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    14be <main+0x33e>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xd71(%rip),%rsi
call   1090 <sprintf@plt>
lea    -0x420(%rbp),%rdi
lea    0xd63(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    137e <main+0x1fe>
mov    0x2cb9(%rip),%rax
movslq (%rax),%rax
mov    %rax,-0x460(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x458(%rbp)
mov    0x2c92(%rip),%rax
mov    (%rax),%edi
call   10a0 <strerror@plt>
mov    -0x460(%rbp),%rdi
mov    -0x458(%rbp),%rdx
mov    %rax,%rcx
lea    0xd0d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2c54(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    14be <main+0x33e>
mov    -0x20(%rbp),%rdi
mov    -0x42c(%rbp),%edx
lea    0xd04(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x424(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    13be <main+0x23e>
jmp    1465 <main+0x2e5>
mov    -0x18(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %eax,-0x428(%rbp)
mov    -0x428(%rbp),%eax
mov    0x2c0e(%rip),%rcx
cmp    (%rcx),%eax
jne    13e7 <main+0x267>
jmp    1465 <main+0x2e5>
mov    -0x424(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1410 <main+0x290>
mov    -0x20(%rbp),%rdi
lea    0xcc6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x428(%rbp),%edx
lea    0xcb2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x424(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x424(%rbp)
mov    -0x424(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1460 <main+0x2e0>
mov    -0x20(%rbp),%rdi
lea    0xc81(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13a0 <main+0x220>
mov    -0x424(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     148e <main+0x30e>
mov    -0x20(%rbp),%rdi
lea    0xc53(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xc44(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2b07(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    1308 <main+0x178>
mov    0x8(%rbx),%rdi
lea    0x8(%rsp),%rsi
call   1070 <stat@plt>
cmp    $0xffffffff,%eax
je     132f <main+0x19f>
mov    0x8(%rsp),%ebp
mov    0x8(%rbx),%rdi
lea    0xe63(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     1354 <main+0x1c4>
mov    %rax,%r14
mov    0x8(%rbx),%rdx
lea    0xe73(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1090 <sprintf@plt>
lea    0xe64(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
test   %rax,%rax
je     1393 <main+0x203>
mov    %rax,%rbx
lea    0xe75(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r14,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    1403 <main+0x273>
mov    %rbx,(%rsp)
mov    $0x1,%r15d
xor    %r12d,%r12d
mov    (%rsp),%rbx
jmp    1268 <main+0xd8>
nopl   (%rax)
mov    %r14,%rdi
call   1060 <feof@plt>
add    $0x1,%r15d
add    $0x1,%r12d
test   %eax,%eax
jne    13d5 <main+0x245>
mov    %r14,%rdi
call   1040 <fgetc@plt>
mov    %eax,%ebp
mov    0x2d6f(%rip),%rax
cmp    (%rax),%ebp
je     13d5 <main+0x245>
mov    %r15d,%r13d
mov    $0xcccccccd,%ecx
imul   %rcx,%r13
shr    $0x24,%r13
mov    %r12d,%eax
imul   %rcx,%rax
shr    $0x24,%rax
shl    $0x2,%eax
lea    (%rax,%rax,4),%eax
cmp    %r12d,%eax
jne    12c1 <main+0x131>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xe17(%rip),%rdi
mov    (%rsp),%rcx
call   10a0 <fwrite@plt>
lea    0x0(%r13,%r13,4),%eax
lea    -0x1(,%rax,4),%r13d
ff
mov    %rbx,%rdi
lea    0xdfb(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
cmp    %r12d,%r13d
jne    1250 <main+0xc0>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xddf(%rip),%rdi
mov    %rbx,%rcx
call   10a0 <fwrite@plt>
jmp    1250 <main+0xc0>
mov    0x2cc9(%rip),%rax
movslq (%rax),%rdi
mov    (%rbx),%rdx
lea    0xce4(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2c9e(%rip),%rax
jmp    1433 <main+0x2a3>
mov    0x2ca2(%rip),%rax
movslq (%rax),%rbp
mov    0x8(%rbx),%rbx
mov    0x2c8c(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xcc0(%rip),%rsi
jmp    1377 <main+0x1e7>
mov    0x2c7d(%rip),%rax
movslq (%rax),%rbp
mov    0x8(%rbx),%rbx
mov    0x2c67(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xcc2(%rip),%rsi
mov    %rbp,%rdi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2c3a(%rip),%rax
jmp    1433 <main+0x2a3>
mov    0x2c3e(%rip),%rax
movslq (%rax),%rbx
mov    0x2c2c(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xcb8(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    0x2bf5(%rip),%rax
jmp    1433 <main+0x2a3>
imul   $0xcccccccd,%r12d,%eax
ror    $0x2,%eax
cmp    $0xccccccd,%eax
mov    (%rsp),%rbx
jb     1403 <main+0x273>
lea    0xce9(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10a0 <fwrite@plt>
lea    0xcd3(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10a0 <fwrite@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x2b8d(%rip),%rax
mov    (%rax),%eax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s [font]\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [36 x i8] c"Couldn't read filesize of '%s': %s\0A\00"
@errno = global i32 0
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [41 x i8] c"Couldn't open file '%s' for reading: %s\0A\00"
@.str.4 = [5 x i8] c"%s.h\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [41 x i8] c"Couldn't open file '%s' for writing: %s\0A\00"
@.str.7 = [60 x i8] c"struct {\0A int size;\0A const char *data;\0A} arial = {\0A %d,\0A\00"
@EOF = global i32 0
@.str.8 = [4 x i8] c" \22\00"
@.str.9 = [7 x i8] c"\\x%02X\00"
@.str.10 = [3 x i8] c"\22\0A\00"
@.str.11 = [4 x i8] c"};\0A\00"
@EXIT_SUCCESS = global i32 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 [1024 x i8]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca %struct.stat
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %24
15: ; preds = %2
%16 = load i32, i32* @stderr
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = load i32, i32* @EXIT_FAILURE
store i32 %23, i32* %3
br label %133
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @stat(i8* %27, %struct.stat* %12)
%29 = icmp eq i32 %28, -1
br i1 %29, label %30, label %41
30: ; preds = %24
%31 = load i32, i32* @stderr
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i32*
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = load i32, i32* @errno
%38 = call i8* @strerror(i32 %37)
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %36, i8* %38)
%40 = load i32, i32* @EXIT_FAILURE
store i32 %40, i32* %3
br label %133
41: ; preds = %24
%42 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 0
%43 = load i32, i32* %42
store i32 %43, i32* %11
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = call i32* @fopen(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %47, i32** %6
%48 = load i32*, i32** %6
%49 = icmp eq i32* %48, null
br i1 %49, label %50, label %61
50: ; preds = %41
%51 = load i32, i32* @stderr
%52 = sext i32 %51 to i64
%53 = inttoptr i64 %52 to i32*
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 1
%56 = load i8*, i8** %55
%57 = load i32, i32* @errno
%58 = call i8* @strerror(i32 %57)
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i8* %56, i8* %58)
%60 = load i32, i32* @EXIT_FAILURE
store i32 %60, i32* %3
br label %133
61: ; preds = %41
%62 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%63 = load i8**, i8*** %5
%64 = getelementptr inbounds i8*, i8** %63, i64 1
%65 = load i8*, i8** %64
%66 = call i32 @sprintf(i8* %62, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %65)
%67 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%68 = call i32* @fopen(i8* %67, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %68, i32** %7
%69 = load i32*, i32** %7
%70 = icmp eq i32* %69, null
br i1 %70, label %71, label %82
71: ; preds = %61
%72 = load i32, i32* @stderr
%73 = sext i32 %72 to i64
%74 = inttoptr i64 %73 to i32*
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%76 = load i32, i32* @errno
%77 = call i8* @strerror(i32 %76)
%78 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i8* %75, i8* %77)
%79 = load i32*, i32** %6
%80 = call i32 @fclose(i32* %79)
%81 = load i32, i32* @EXIT_FAILURE
store i32 %81, i32* %3
br label %133
82: ; preds = %61
%83 = load i32*, i32** %7
%84 = load i32, i32* %11
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0), i32 %84)
store i32 0, i32* %9
br label %86
86: ; preds = %117, %82
%87 = load i32*, i32** %6
%88 = call i32 @feof(i32* %87)
%89 = icmp ne i32 %88, 0
%90 = xor i1 %89, true
br i1 %90, label %91, label %118
91: ; preds = %86
%92 = load i32*, i32** %6
%93 = call i32 @fgetc(i32* %92)
store i32 %93, i32* %10
%94 = load i32, i32* %10
%95 = load i32, i32* @EOF
%96 = icmp eq i32 %94, %95
br i1 %96, label %97, label %98
97: ; preds = %91
br label %118
98: ; preds = %91
%99 = load i32, i32* %9
%100 = srem i32 %99, 20
%101 = icmp ne i32 %100, 0
br i1 %101, label %105, label %102
102: ; preds = %98
%103 = load i32*, i32** %7
%104 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %105
105: ; preds = %102, %98
%106 = load i32*, i32** %7
%107 = load i32, i32* %10
%108 = call i32 (i32*, i8*, ...) @fprintf(i32* %106, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %107)
%109 = load i32, i32* %9
%110 = add nsw i32 %109, 1
store i32 %110, i32* %9
%111 = load i32, i32* %9
%112 = srem i32 %111, 20
%113 = icmp ne i32 %112, 0
br i1 %113, label %117, label %114
114: ; preds = %105
%115 = load i32*, i32** %7
%116 = call i32 (i32*, i8*, ...) @fprintf(i32* %115, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
br label %117
117: ; preds = %114, %105
br label %86
118: ; preds = %97, %86
%119 = load i32, i32* %9
%120 = srem i32 %119, 20
%121 = icmp ne i32 %120, 0
br i1 %121, label %122, label %125
122: ; preds = %118
%123 = load i32*, i32** %7
%124 = call i32 (i32*, i8*, ...) @fprintf(i32* %123, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
br label %125
125: ; preds = %122, %118
%126 = load i32*, i32** %7
%127 = call i32 (i32*, i8*, ...) @fprintf(i32* %126, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%128 = load i32*, i32** %6
%129 = call i32 @fclose(i32* %128)
%130 = load i32*, i32** %7
%131 = call i32 @fclose(i32* %130)
%132 = load i32, i32* @EXIT_SUCCESS
store i32 %132, i32* %3
br label %133
133: ; preds = %125, %71, %50, %30, %15
%134 = load i32, i32* %3
ret i32 %134
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s [font]\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [36 x i8] c"Couldn't read filesize of '%s': %s\0A\00"
@errno = global i32 0
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [41 x i8] c"Couldn't open file '%s' for reading: %s\0A\00"
@.str.4 = [5 x i8] c"%s.h\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [41 x i8] c"Couldn't open file '%s' for writing: %s\0A\00"
@.str.7 = [60 x i8] c"struct {\0A int size;\0A const char *data;\0A} arial = {\0A %d,\0A\00"
@EOF = global i32 0
@.str.8 = [4 x i8] c" \22\00"
@.str.9 = [7 x i8] c"\\x%02X\00"
@.str.10 = [3 x i8] c"\22\0A\00"
@.str.11 = [4 x i8] c"};\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca %struct.stat
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = bitcast %struct.stat* %4 to i8*
%7 = icmp eq i32 %0, 2
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load i8*, i8** %1
%13 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %88
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @stat(i8* %16, %struct.stat* %4)
%18 = icmp eq i32 %17, -1
br i1 %18, label %19, label %27
19: ; preds = %14
%20 = load i32, i32* @stderr
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to i32*
%23 = load i8*, i8** %15
%24 = load i32, i32* @errno
%25 = tail call i8* @strerror(i32 %24)
%26 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %23, i8* %25)
br label %88
27: ; preds = %14
%28 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%29 = load i32, i32* %28
%30 = load i8*, i8** %15
%31 = tail call i32* @fopen(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %41
33: ; preds = %27
%34 = load i32, i32* @stderr
%35 = sext i32 %34 to i64
%36 = inttoptr i64 %35 to i32*
%37 = load i8*, i8** %15
%38 = load i32, i32* @errno
%39 = tail call i8* @strerror(i32 %38)
%40 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i8* %37, i8* %39)
br label %88
41: ; preds = %27
%42 = load i8*, i8** %15
%43 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* %42)
%44 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%45 = icmp eq i32* %44, null
br i1 %45, label %46, label %54
46: ; preds = %41
%47 = load i32, i32* @stderr
%48 = sext i32 %47 to i64
%49 = inttoptr i64 %48 to i32*
%50 = load i32, i32* @errno
%51 = tail call i8* @strerror(i32 %50)
%52 = call i32 (i32*, i8*, ...) @fprintf(i32* %49, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i8* %5, i8* %51)
%53 = call i32 @fclose(i32* %31)
br label %88
54: ; preds = %41
%55 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.7, i64 0, i64 0), i32 %29)
%56 = tail call i32 @feof(i32* %31)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %84
58: ; preds = %54, %75
%59 = phi i32 [ %70, %75 ], [ 0, %54 ]
%60 = tail call i32 @fgetc(i32* %31)
%61 = load i32, i32* @EOF
%62 = icmp eq i32 %60, %61
br i1 %62, label %78, label %63
63: ; preds = %58
%64 = urem i32 %59, 20
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i64 3, i64 1, i32* %44)
br label %68
68: ; preds = %66, %63
%69 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %60)
%70 = add nuw nsw i32 %59, 1
%71 = urem i32 %70, 20
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %68
%74 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i64 2, i64 1, i32* %44)
br label %75
75: ; preds = %73, %68
%76 = tail call i32 @feof(i32* %31)
%77 = icmp eq i32 %76, 0
br i1 %77, label %58, label %78
78: ; preds = %75, %58
%79 = phi i32 [ %70, %75 ], [ %59, %58 ]
%80 = urem i32 %79, 20
%81 = icmp eq i32 %80, 0
br i1 %81, label %84, label %82
82: ; preds = %78
%83 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i64 2, i64 1, i32* %44)
br label %84
84: ; preds = %54, %82, %78
%85 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i64 3, i64 1, i32* %44)
%86 = tail call i32 @fclose(i32* %31)
%87 = tail call i32 @fclose(i32* %44)
br label %88
88: ; preds = %84, %46, %33, %19, %8
%89 = phi i32* [ @EXIT_FAILURE, %8 ], [ @EXIT_FAILURE, %19 ], [ @EXIT_FAILURE, %33 ], [ @EXIT_FAILURE, %46 ], [ @EXIT_SUCCESS, %84 ]
%90 = load i32, i32* %89
ret i32 %90
}