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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
int strlen(char *);
int main(int argc, char *argv[]) {
  FILE *fp;
  int i, j, nbytes;
  unsigned char c;
  char buf[300];
  if (argc < 3) {
    puts("Usage... makefw  filename.rbt  array_name");
    exit(1);
  }
  fp = fopen(argv[1], "r");
  if (!fp) {
    perror("bit file open");
    exit(1);
  }
  nbytes = 0;
  printf("static unsigned char %s[] = {\n", argv[2]);
  i = 0;
  while (fgets(buf, sizeof(buf) - 1, fp)) {
    if (!buf[0])
      continue;
    if (buf[strlen(buf) - 1] < ' ')
      buf[strlen(buf) - 1] = 0;
    if (!buf[0])
      continue;
    if (buf[strlen(buf) - 1] < ' ')
      buf[strlen(buf) - 1] = 0;
    if (!buf[0])
      continue;
    if (strlen(buf) < 32)
      continue;
    if ((buf[0] != '0') && (buf[0] != '1'))
      continue;
    c = 0;
    for (j = 0; buf[j]; j++) {
      if (buf[j] > '0')
        c |= 1 << (j & 7);
      if ((j & 7) == 7) {
        nbytes++;
        if (i)
          printf(",");
        printf("0x%02x", c);
        if (i++ == 12) {
          printf(",\n");
          i = 0;
        }
        c = 0;
      }
    }
  }
  printf("\n};\n\n");
  fprintf(stderr, "Loaded %d bytes from file\n", nbytes);
  fclose(fp);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11c9 <main+0x39>
lea    0xe46(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe52(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1202 <main+0x72>
lea    0xe39(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x1c(%rbp)
lea    -0x160(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x12b,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     1401 <main+0x271>
cmpb   $0x0,-0x160(%rbp)
jne    1257 <main+0xc7>
jmp    1226 <main+0x96>
lea    -0x160(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x160(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jge    1292 <main+0x102>
lea    -0x160(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x160(%rbp,%rax,1)
cmpb   $0x0,-0x160(%rbp)
jne    12a4 <main+0x114>
jmp    1226 <main+0x96>
lea    -0x160(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x160(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jge    12df <main+0x14f>
lea    -0x160(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x160(%rbp,%rax,1)
cmpb   $0x0,-0x160(%rbp)
jne    12f1 <main+0x161>
jmp    1226 <main+0x96>
lea    -0x160(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x20,%eax
jge    130b <main+0x17b>
jmp    1226 <main+0x96>
movsbl -0x160(%rbp),%eax
cmp    $0x30,%eax
je     1330 <main+0x1a0>
movsbl -0x160(%rbp),%eax
cmp    $0x31,%eax
je     1330 <main+0x1a0>
jmp    1226 <main+0x96>
movb   $0x0,-0x25(%rbp)
movl   $0x0,-0x20(%rbp)
movslq -0x20(%rbp),%rax
cmpb   $0x0,-0x160(%rbp,%rax,1)
je     13fc <main+0x26c>
movslq -0x20(%rbp),%rax
movsbl -0x160(%rbp,%rax,1),%eax
ff
cmp    $0x30,%eax
jle    137a <main+0x1ea>
mov    -0x20(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
movzbl -0x25(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x25(%rbp)
mov    -0x20(%rbp),%eax
and    $0x7,%eax
cmp    $0x7,%eax
jne    13e9 <main+0x259>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     13aa <main+0x21a>
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movzbl -0x25(%rbp),%esi
lea    0xca6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0xc,%eax
jne    13e5 <main+0x255>
lea    0xc8b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x1c(%rbp)
movb   $0x0,-0x25(%rbp)
jmp    13ee <main+0x25e>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    133b <main+0x1ab>
jmp    1226 <main+0x96>
lea    0xc5d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2bca(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xc49(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
cmp    $0x2,%edi
jg     11cc <main+0x2c>
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    %rsi,%rbp
mov    0x8(%rsi),%rdi
lea    0xe50(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
jne    11fa <main+0x5a>
lea    0xe41(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    %rax,%rbx
mov    0x10(%rbp),%rsi
lea    0xe32(%rip),%rdi
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    $0x12b,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
jne    125d <main+0xbd>
lea    0xe4a(%rip),%rdi
call   1040 <puts@plt>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
lea    0xe1a(%rip),%rsi
mov    %r14d,%edx
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
xor    %r14d,%r14d
xor    %r12d,%r12d
jmp    1285 <main+0xe5>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbp,%rdi
mov    $0x12b,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     122a <main+0x8a>
cmpb   $0x0,(%rsp)
je     1270 <main+0xd0>
mov    %rbp,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x1f,-0x1(%rax,%rbp,1)
jg     12ab <main+0x10b>
mov    %rbp,%rdi
call   1060 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbp,1)
cmpb   $0x0,(%rsp)
je     1270 <main+0xd0>
mov    %rbp,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x1f,-0x1(%rax,%rbp,1)
jg     12d1 <main+0x131>
mov    %rbp,%rdi
call   1060 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbp,1)
cmpb   $0x0,(%rsp)
je     1270 <main+0xd0>
mov    %rbp,%rdi
call   1060 <strlen@plt>
cmp    $0x20,%eax
jl     1270 <main+0xd0>
mov    (%rsp),%al
mov    %eax,%ecx
and    $0xfe,%cl
cmp    $0x30,%cl
jne    1270 <main+0xd0>
xor    %r15d,%r15d
xor    %r13d,%r13d
jmp    1316 <main+0x176>
nopl   (%rax)
add    $0x1,%r12d
movzbl 0x1(%rsp,%r15,1),%eax
add    $0x1,%r15
test   %al,%al
je     1270 <main+0xd0>
mov    %r13d,%edx
mov    %r15d,%ecx
and    $0x7,%ecx
mov    $0x1,%r13d
shl    %cl,%r13d
cmp    $0x31,%al
mov    $0x0,%eax
cmovl  %eax,%r13d
or     %dl,%r13b
cmp    $0x7,%ecx
jne    1304 <main+0x164>
test   %r12d,%r12d
je     134a <main+0x1aa>
mov    $0x2c,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
movzbl %r13b,%esi
xor    %r13d,%r13d
lea    0xcfd(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
cmp    $0xc,%r12d
jne    1300 <main+0x160>
lea    0xd10(%rip),%rdi
call   1040 <puts@plt>
xor    %r12d,%r12d
jmp    1304 <main+0x164>

LLVM IR (-O0):
@.str = [42 x i8] c"Usage... makefw filename.rbt array_name\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"bit file open\00"
@.str.3 = [31 x i8] c"static unsigned char %s[] = {\0A\00"
@.str.4 = [2 x i8] c",\00"
@.str.5 = [7 x i8] c"0x%02x\00"
@.str.6 = [3 x i8] c",\0A\00"
@.str.7 = [6 x i8] c"\0A};\0A\0A\00"
@stderr = global i32 0
@.str.8 = [27 x i8] c"Loaded %d bytes from file\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 i8
%11 = alloca [300 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 3
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 1
%20 = load i8*, i8** %19
%21 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %21, i32** %6
%22 = load i32*, i32** %6
%23 = icmp ne i32* %22, null
br i1 %23, label %27, label %24
24: ; preds = %17
%25 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 @exit(i32 1)
unreachable
27: ; preds = %17
store i32 0, i32* %9
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %30)
store i32 0, i32* %7
br label %32
32: ; preds = %145, %97, %86, %81, %61, %41, %27
%33 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%34 = load i32*, i32** %6
%35 = call i64 @fgets(i8* %33, i32 299, i32* %34)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %146
37: ; preds = %32
%38 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%39 = load i8, i8* %38
%40 = icmp ne i8 %39, 0
br i1 %40, label %42, label %41
41: ; preds = %37
br label %32
42: ; preds = %37
%43 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%44 = call i32 @strlen(i8* %43)
%45 = sub nsw i32 %44, 1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp slt i32 %49, 32
br i1 %50, label %51, label %57
51: ; preds = %42
%52 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%53 = call i32 @strlen(i8* %52)
%54 = sub nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 %55
store i8 0, i8* %56
br label %57
57: ; preds = %51, %42
%58 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%59 = load i8, i8* %58
%60 = icmp ne i8 %59, 0
br i1 %60, label %62, label %61
61: ; preds = %57
br label %32
62: ; preds = %57
%63 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%64 = call i32 @strlen(i8* %63)
%65 = sub nsw i32 %64, 1
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 %66
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp slt i32 %69, 32
br i1 %70, label %71, label %77
71: ; preds = %62
%72 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%73 = call i32 @strlen(i8* %72)
%74 = sub nsw i32 %73, 1
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 %75
store i8 0, i8* %76
br label %77
77: ; preds = %71, %62
%78 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%79 = load i8, i8* %78
%80 = icmp ne i8 %79, 0
br i1 %80, label %82, label %81
81: ; preds = %77
br label %32
82: ; preds = %77
%83 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%84 = call i32 @strlen(i8* %83)
%85 = icmp slt i32 %84, 32
br i1 %85, label %86, label %87
86: ; preds = %82
br label %32
87: ; preds = %82
%88 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp ne i32 %90, 48
br i1 %91, label %92, label %98
92: ; preds = %87
%93 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 0
%94 = load i8, i8* %93
%95 = sext i8 %94 to i32
%96 = icmp ne i32 %95, 49
br i1 %96, label %97, label %98
97: ; preds = %92
br label %32
98: ; preds = %92, %87
store i8 0, i8* %10
store i32 0, i32* %8
br label %99
99: ; preds = %142, %98
%100 = load i32, i32* %8
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 %101
%103 = load i8, i8* %102
%104 = icmp ne i8 %103, 0
br i1 %104, label %105, label %145
105: ; preds = %99
%106 = load i32, i32* %8
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [300 x i8], [300 x i8]* %11, i64 0, i64 %107
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp sgt i32 %110, 48
br i1 %111, label %112, label %120
112: ; preds = %105
%113 = load i32, i32* %8
%114 = and i32 %113, 7
%115 = shl i32 1, %114
%116 = load i8, i8* %10
%117 = zext i8 %116 to i32
%118 = or i32 %117, %115
%119 = trunc i32 %118 to i8
store i8 %119, i8* %10
br label %120
120: ; preds = %112, %105
%121 = load i32, i32* %8
%122 = and i32 %121, 7
%123 = icmp eq i32 %122, 7
br i1 %123, label %124, label %141
124: ; preds = %120
%125 = load i32, i32* %9
%126 = add nsw i32 %125, 1
store i32 %126, i32* %9
%127 = load i32, i32* %7
%128 = icmp ne i32 %127, 0
br i1 %128, label %129, label %131
129: ; preds = %124
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %131
131: ; preds = %129, %124
%132 = load i8, i8* %10
%133 = zext i8 %132 to i32
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %133)
%135 = load i32, i32* %7
%136 = add nsw i32 %135, 1
store i32 %136, i32* %7
%137 = icmp eq i32 %135, 12
br i1 %137, label %138, label %140
138: ; preds = %131
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %7
br label %140
140: ; preds = %138, %131
store i8 0, i8* %10
br label %141
141: ; preds = %140, %120
br label %142
142: ; preds = %141
%143 = load i32, i32* %8
%144 = add nsw i32 %143, 1
store i32 %144, i32* %8
br label %99
145: ; preds = %99
br label %32
146: ; preds = %32
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%148 = load i32, i32* @stderr
%149 = load i32, i32* %9
%150 = call i32 @fprintf(i32 %148, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %149)
%151 = load i32*, i32** %6
%152 = call i32 @fclose(i32* %151)
%153 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Usage... makefw filename.rbt array_name\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [14 x i8] c"bit file open\00"
@.str.3 = [31 x i8] c"static unsigned char %s[] = {\0A\00"
@.str.5 = [7 x i8] c"0x%02x\00"
@stderr = global i32 0
@.str.8 = [27 x i8] c"Loaded %d bytes from file\0A\00"
@str = [5 x i8] c"\0A};\0A\00"
@str.9 = [2 x i8] c",\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [300 x i8]
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 3
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
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.1, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%16 = tail call i32 @exit(i32 1)
unreachable
17: ; preds = %9
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* %19)
%21 = call i64 @fgets(i8* %4, i32 299, i32* %12)
%22 = icmp eq i64 %21, 0
br i1 %22, label %106, label %26
23: ; preds = %98
%24 = call i64 @fgets(i8* %4, i32 299, i32* %12)
%25 = icmp eq i64 %24, 0
br i1 %25, label %106, label %26
26: ; preds = %17, %23
%27 = phi i32 [ %100, %23 ], [ 0, %17 ]
%28 = phi i32 [ %99, %23 ], [ 0, %17 ]
br label %29
29: ; preds = %26, %32
%30 = load i8, i8* %4
%31 = icmp eq i8 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29, %47, %62, %65, %68
%33 = call i64 @fgets(i8* %4, i32 299, i32* %12)
%34 = icmp eq i64 %33, 0
br i1 %34, label %106, label %29
35: ; preds = %29
%36 = call i32 @strlen(i8* %4)
%37 = add nsw i32 %36, -1
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 %38
%40 = load i8, i8* %39
%41 = icmp slt i8 %40, 32
br i1 %41, label %42, label %47
42: ; preds = %35
%43 = call i32 @strlen(i8* %4)
%44 = add nsw i32 %43, -1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 %45
store i8 0, i8* %46
br label %47
47: ; preds = %42, %35
%48 = load i8, i8* %4
%49 = icmp eq i8 %48, 0
br i1 %49, label %32, label %50
50: ; preds = %47
%51 = call i32 @strlen(i8* %4)
%52 = add nsw i32 %51, -1
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = icmp slt i8 %55, 32
br i1 %56, label %57, label %62
57: ; preds = %50
%58 = call i32 @strlen(i8* %4)
%59 = add nsw i32 %58, -1
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 %60
store i8 0, i8* %61
br label %62
62: ; preds = %57, %50
%63 = load i8, i8* %4
%64 = icmp eq i8 %63, 0
br i1 %64, label %32, label %65
65: ; preds = %62
%66 = call i32 @strlen(i8* %4)
%67 = icmp slt i32 %66, 32
br i1 %67, label %32, label %68
68: ; preds = %65
%69 = load i8, i8* %4
%70 = and i8 %69, -2
%71 = icmp eq i8 %70, 48
br i1 %71, label %72, label %32
72: ; preds = %68, %98
%73 = phi i64 [ %102, %98 ], [ 0, %68 ]
%74 = phi i8 [ %104, %98 ], [ %69, %68 ]
%75 = phi i8 [ %101, %98 ], [ 0, %68 ]
%76 = phi i32 [ %100, %98 ], [ %27, %68 ]
%77 = phi i32 [ %99, %98 ], [ %28, %68 ]
%78 = icmp sgt i8 %74, 48
%79 = trunc i64 %73 to i32
%80 = and i32 %79, 7
%81 = shl nuw nsw i32 1, %80
%82 = trunc i32 %81 to i8
%83 = select i1 %78, i8 %82, i8 0
%84 = or i8 %83, %75
%85 = icmp eq i32 %80, 7
br i1 %85, label %86, label %98
86: ; preds = %72
%87 = add nsw i32 %76, 1
%88 = icmp eq i32 %77, 0
br i1 %88, label %91, label %89
89: ; preds = %86
%90 = call i32 @putchar(i32 44)
br label %91
91: ; preds = %89, %86
%92 = zext i8 %84 to i32
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %92)
%94 = add nsw i32 %77, 1
%95 = icmp eq i32 %77, 12
br i1 %95, label %96, label %98
96: ; preds = %91
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.9, i64 0, i64 0))
br label %98
98: ; preds = %91, %96, %72
%99 = phi i32 [ %77, %72 ], [ 0, %96 ], [ %94, %91 ]
%100 = phi i32 [ %76, %72 ], [ %87, %96 ], [ %87, %91 ]
%101 = phi i8 [ %84, %72 ], [ 0, %96 ], [ 0, %91 ]
%102 = add nuw i64 %73, 1
%103 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 %102
%104 = load i8, i8* %103
%105 = icmp eq i8 %104, 0
br i1 %105, label %23, label %72
106: ; preds = %23, %32, %17
%107 = phi i32 [ 0, %17 ], [ %27, %32 ], [ %100, %23 ]
%108 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%109 = load i32, i32* @stderr
%110 = call i32 @fprintf(i32 %109, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %107)
%111 = call i32 @fclose(i32* %12)
%112 = call i32 @exit(i32 0)
unreachable
}