#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_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  FILE *fip, *fop;
  unsigned char cbyte;
  int i = 0;
  if (argc != 1) {
    fprintf(stderr, "\nUsage: %s\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  fip = fopen("sfxstub", "rb");
  if (fip == NULL) {
    fprintf(stderr, "\n%s: Error opening input file \"%s\"\n", "sfxstub2h",
            "sfxstub");
    perror("sfxstub2h");
    exit(EXIT_FAILURE);
  }
  fop = fopen("sfxstub.h", "wt");
  if (fop == NULL) {
    fprintf(stderr, "\n%s: Error opening output file \"%s\"\n", "sfxstub2h",
            "sfxstub.h");
    perror("sfxstub2h");
    exit(EXIT_FAILURE);
  }
  fprintf(fop, "/* '%s' converted from '%s' by '%s' */\n", "sfxstub.h",
          "sfxstub", "sfxstub2h");
  fprintf(fop, "/* for platform: '%s' on %s */\n\n", "unknown", "Mar 17 2022");
  fprintf(fop, "unsigned char %s[] = {", "pjxstub");
  while (fread(&cbyte, 1, 1, fip) == 1) {
    if (i++ % 16 == 0)
      fprintf(fop, "\n\t\"");
    fprintf(fop, "\\x%02X", cbyte);
    if (i % 16 == 0)
      fprintf(fop, "\"");
  }
  if (i % 16 != 0)
    fprintf(fop, "\"");
  fprintf(fop, "\n};\n\n");
  fprintf(fop, "unsigned int %s_size = sizeof(%s);\n", "pjxstub", "pjxstub");
  fclose(fip);
  fclose(fop);
  fprintf(stderr, "%s-info: %d characters read and converted.", "sfxstub2h", i);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     11b3 <main+0x53>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe62(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e2c(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
lea    0xe52(%rip),%rdi
lea    0xe53(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1214 <main+0xb4>
mov    0x2e04(%rip),%rax
mov    (%rax),%edi
lea    0xe32(%rip),%rsi
lea    0xe4f(%rip),%rdx
lea    0xe19(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    0xe3a(%rip),%rdi
call   1070 <perror@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
lea    0xe2a(%rip),%rdi
lea    0xe2d(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1275 <main+0x115>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
lea    0xe0c(%rip),%rsi
lea    0xdee(%rip),%rdx
lea    0xdf1(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    0xdd9(%rip),%rdi
call   1070 <perror@plt>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xdf5(%rip),%rsi
lea    0xdbc(%rip),%rdx
lea    0xd7c(%rip),%rcx
lea    0xda4(%rip),%r8
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xdf4(%rip),%rsi
lea    0xe0e(%rip),%rdx
lea    0xe0f(%rip),%rcx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xe07(%rip),%rsi
lea    0xe17(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rcx
lea    -0x21(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
cmp    $0x1,%eax
jne    136d <main+0x20d>
mov    -0x28(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x28(%rbp)
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1328 <main+0x1c8>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xdd2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
movzbl -0x21(%rbp),%edx
lea    0xdbe(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1368 <main+0x208>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xd94(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    12db <main+0x17b>
mov    -0x28(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1395 <main+0x235>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xd67(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xd5c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    0xd4e(%rip),%rsi
lea    0xd2e(%rip),%rcx
mov    %rcx,%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    0x2c00(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%ecx
lea    0xd3c(%rip),%rsi
lea    0xc48(%rip),%rdx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2bcf(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    11a8 <main+0x48>
lea    0xe95(%rip),%rdi
lea    0xe96(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
jne    11c4 <main+0x64>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
lea    0xe9c(%rip),%rbx
lea    0xe66(%rip),%rcx
jmp    11fd <main+0x9d>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xe45(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    120f <main+0xaf>
mov    %rax,%r14
lea    0xe77(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1060 <fopen@plt>
test   %rax,%rax
jne    121d <main+0xbd>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edi
lea    0xe63(%rip),%rsi
lea    0xe45(%rip),%rbx
lea    0xe48(%rip),%rcx
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
call   1070 <perror@plt>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>
mov    %rax,%rbx
lea    0xe50(%rip),%rsi
lea    0xe17(%rip),%rdx
lea    0xdd7(%rip),%rcx
lea    0xdff(%rip),%r8
xor    %ebp,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe51(%rip),%rsi
lea    0xe6b(%rip),%rdx
lea    0xe6c(%rip),%rcx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe68(%rip),%rsi
lea    0xe78(%rip),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
cmp    $0x1,%eax
jne    132e <main+0x1ce>
lea    0xe54(%rip),%r12
lea    0xe4b(%rip),%r13
lea    0x7(%rsp),%r15
xor    %ebp,%ebp
jmp    12da <main+0x17a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
cmp    $0x1,%eax
jne    1318 <main+0x1b8>
mov    %ebp,%eax
lea    0x1(%rax),%ebp
test   $0xf,%al
jne    12f3 <main+0x193>
mov    %ebx,%edi
lea    0xe07(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
movzbl 0x7(%rsp),%edx
mov    %ebx,%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
test   $0xf,%bpl
jne    12c0 <main+0x160>
mov    %ebx,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    12c0 <main+0x160>
test   $0xf,%bpl
je     132e <main+0x1ce>
lea    0xdd0(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xdc9(%rip),%rsi
mov    %ebx,%edi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xdbf(%rip),%rsi
lea    0xd9f(%rip),%rcx
mov    %ebx,%edi
mov    %rcx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x2c71(%rip),%rax
mov    (%rax),%edi
lea    0xdb0(%rip),%rsi
lea    0xcbc(%rip),%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2c41(%rip),%rax
mov    (%rax),%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"\0AUsage: %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [8 x i8] c"sfxstub\00"
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [36 x i8] c"\0A%s: Error opening input file \22%s\22\0A\00"
@.str.4 = [10 x i8] c"sfxstub2h\00"
@.str.5 = [10 x i8] c"sfxstub.h\00"
@.str.6 = [3 x i8] c"wt\00"
@.str.7 = [37 x i8] c"\0A%s: Error opening output file \22%s\22\0A\00"
@.str.8 = [40 x i8] c"/* '%s' converted from '%s' by '%s' */\0A\00"
@.str.9 = [33 x i8] c"/* for platform: '%s' on %s */\0A\0A\00"
@.str.10 = [8 x i8] c"unknown\00"
@.str.11 = [12 x i8] c"Mar 17 2022\00"
@.str.12 = [23 x i8] c"unsigned char %s[] = {\00"
@.str.13 = [8 x i8] c"pjxstub\00"
@.str.14 = [4 x i8] c"\0A\09\22\00"
@.str.15 = [7 x i8] c"\\x%02X\00"
@.str.16 = [2 x i8] c"\22\00"
@.str.17 = [6 x i8] c"\0A};\0A\0A\00"
@.str.18 = [36 x i8] c"unsigned int %s_size = sizeof(%s);\0A\00"
@.str.19 = [43 x i8] c"%s-info: %d characters read and converted.\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 i8
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 1
br i1 %11, label %12, label %20
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i32, i32* @EXIT_FAILURE
%19 = call i32 @exit(i32 %18)
unreachable
20: ; preds = %2
%21 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %21, i32** %6
%22 = load i32*, i32** %6
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%28 = load i32, i32* @EXIT_FAILURE
%29 = call i32 @exit(i32 %28)
unreachable
30: ; preds = %20
%31 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32* %31, i32** %7
%32 = load i32*, i32** %7
%33 = icmp eq i32* %32, null
br i1 %33, label %34, label %40
34: ; preds = %30
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%37 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%38 = load i32, i32* @EXIT_FAILURE
%39 = call i32 @exit(i32 %38)
unreachable
40: ; preds = %30
%41 = load i32*, i32** %7
%42 = ptrtoint i32* %41 to i32
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%44 = load i32*, i32** %7
%45 = ptrtoint i32* %44 to i32
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%47 = load i32*, i32** %7
%48 = ptrtoint i32* %47 to i32
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
br label %50
50: ; preds = %76, %40
%51 = load i32*, i32** %6
%52 = call i32 @fread(i8* %8, i32 1, i32 1, i32* %51)
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %77
54: ; preds = %50
%55 = load i32, i32* %9
%56 = add nsw i32 %55, 1
store i32 %56, i32* %9
%57 = srem i32 %55, 16
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %63
59: ; preds = %54
%60 = load i32*, i32** %7
%61 = ptrtoint i32* %60 to i32
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
br label %63
63: ; preds = %59, %54
%64 = load i32*, i32** %7
%65 = ptrtoint i32* %64 to i32
%66 = load i8, i8* %8
%67 = zext i8 %66 to i32
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i32 %67)
%69 = load i32, i32* %9
%70 = srem i32 %69, 16
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %76
72: ; preds = %63
%73 = load i32*, i32** %7
%74 = ptrtoint i32* %73 to i32
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %76
76: ; preds = %72, %63
br label %50
77: ; preds = %50
%78 = load i32, i32* %9
%79 = srem i32 %78, 16
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %85
81: ; preds = %77
%82 = load i32*, i32** %7
%83 = ptrtoint i32* %82 to i32
%84 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %85
85: ; preds = %81, %77
%86 = load i32*, i32** %7
%87 = ptrtoint i32* %86 to i32
%88 = call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%89 = load i32*, i32** %7
%90 = ptrtoint i32* %89 to i32
%91 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%92 = load i32*, i32** %6
%93 = call i32 @fclose(i32* %92)
%94 = load i32*, i32** %7
%95 = call i32 @fclose(i32* %94)
%96 = load i32, i32* @stderr
%97 = load i32, i32* %9
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %97)
%99 = load i32, i32* @EXIT_SUCCESS
%100 = call i32 @exit(i32 %99)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"\0AUsage: %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [8 x i8] c"sfxstub\00"
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [36 x i8] c"\0A%s: Error opening input file \22%s\22\0A\00"
@.str.4 = [10 x i8] c"sfxstub2h\00"
@.str.5 = [10 x i8] c"sfxstub.h\00"
@.str.6 = [3 x i8] c"wt\00"
@.str.7 = [37 x i8] c"\0A%s: Error opening output file \22%s\22\0A\00"
@.str.8 = [40 x i8] c"/* '%s' converted from '%s' by '%s' */\0A\00"
@.str.9 = [33 x i8] c"/* for platform: '%s' on %s */\0A\0A\00"
@.str.10 = [8 x i8] c"unknown\00"
@.str.11 = [12 x i8] c"Mar 17 2022\00"
@.str.12 = [23 x i8] c"unsigned char %s[] = {\00"
@.str.13 = [8 x i8] c"pjxstub\00"
@.str.14 = [4 x i8] c"\0A\09\22\00"
@.str.15 = [7 x i8] c"\\x%02X\00"
@.str.16 = [2 x i8] c"\22\00"
@.str.17 = [6 x i8] c"\0A};\0A\0A\00"
@.str.18 = [36 x i8] c"unsigned int %s_size = sizeof(%s);\0A\00"
@.str.19 = [43 x i8] c"%s-info: %d characters read and converted.\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i8
%4 = icmp eq i32 %0, 1
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %1
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
%12 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%18 = load i32, i32* @EXIT_FAILURE
%19 = tail call i32 @exit(i32 %18)
unreachable
20: ; preds = %11
%21 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %29
23: ; preds = %20
%24 = load i32, i32* @stderr
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%26 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = tail call i32 @exit(i32 %27)
unreachable
29: ; preds = %20
%30 = ptrtoint i32* %21 to i64
%31 = trunc i64 %30 to i32
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%34 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%35 = call i32 @fread(i8* %3, i32 1, i32 1, i32* %12)
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %60
37: ; preds = %29, %52
%38 = phi i32 [ %39, %52 ], [ 0, %29 ]
%39 = add nuw nsw i32 %38, 1
%40 = and i32 %38, 15
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %37
%43 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
br label %44
44: ; preds = %42, %37
%45 = load i8, i8* %3
%46 = zext i8 %45 to i32
%47 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i32 %46)
%48 = and i32 %39, 15
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %44
%51 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %52
52: ; preds = %50, %44
%53 = call i32 @fread(i8* %3, i32 1, i32 1, i32* %12)
%54 = icmp eq i32 %53, 1
br i1 %54, label %37, label %55
55: ; preds = %52
%56 = and i32 %39, 15
%57 = icmp eq i32 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
br label %60
60: ; preds = %29, %58, %55
%61 = phi i32 [ %39, %58 ], [ %39, %55 ], [ 0, %29 ]
%62 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%63 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0))
%64 = tail call i32 @fclose(i32* %12)
%65 = tail call i32 @fclose(i32* %21)
%66 = load i32, i32* @stderr
%67 = tail call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %61)
%68 = load i32, i32* @EXIT_SUCCESS
%69 = tail call i32 @exit(i32 %68)
unreachable
}