#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*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
int /*<<< orphan*/ *stderr;
int main(int argc, char *argv[]) {
  int ret, i;
  unsigned value;
  FILE *in, *out;
  char iname[512], oname[512];
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <basename>\n", argv[0]);
    exit(1);
  }
  snprintf(iname, 511, "%s.fasl", argv[1]);
  iname[511] = '\0';
  snprintf(oname, 511, "%s.h", argv[1]);
  oname[511] = '\0';
  in = fopen(iname, "r");
  if (!in) {
    fprintf(stderr, "Could not open file %s for reading.\n", iname);
    exit(1);
  }
  out = fopen(oname, "w");
  if (!out) {
    fclose(in);
    fprintf(stderr, "Could not open file %s for writing.\n", oname);
    exit(1);
  }
  fprintf(out, "/*\n");
  fprintf(out, "\tThis code was automatically generated from a .fasl file.\n");
  fprintf(out, "\tDo not edit it.\n");
  fprintf(out, "*/\n\n");
  fprintf(out, "static const uint8_t %s_buf[] = {\n   ", argv[1]);
  ret = fscanf(in, " #(");
  if (ret == EOF) {
    fclose(in);
    fclose(out);
    fprintf(stderr, "invalid input file\n");
    exit(1);
  }
  for (i = 1;; i++) {
    ret = fscanf(in, " %u", &value);
    if (ret == 0) {
      break;
    } else if (ret == EOF) {
      fclose(in);
      fclose(out);
      fprintf(stderr, "unexpected end of input\n");
      exit(1);
    }
    fprintf(out, "%u, ", value);
    if (!(i % 20)) {
      fprintf(out, "\n   ");
    }
  }
  fprintf(out, "};\n\n");
  fclose(in);
  fclose(out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11ac <main+0x4c>
mov    0x2e4e(%rip),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe65(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
lea    -0x230(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    $0x1ff,%esi
lea    0xe4f(%rip),%rdx
call   1040 <snprintf@plt>
movb   $0x0,-0x31(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
mov    $0x1ff,%esi
lea    0xe33(%rip),%rdx
call   1040 <snprintf@plt>
movb   $0x0,-0x231(%rbp)
lea    -0x230(%rbp),%rdi
lea    0xe1e(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1242 <main+0xe2>
mov    0x2db8(%rip),%rax
mov    (%rax),%rdi
lea    -0x230(%rbp),%rdx
lea    0xdf4(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
lea    -0x430(%rbp),%rdi
lea    0xdfa(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1296 <main+0x136>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2d64(%rip),%rax
mov    (%rax),%rdi
lea    -0x430(%rbp),%rdx
lea    0xdc7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x30(%rbp),%rdi
lea    0xdd0(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xdc2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xdeb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xdeb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdd6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xdea(%rip),%rsi
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2cd1(%rip),%rcx
cmp    (%rcx),%eax
jne    1353 <main+0x1f3>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2ca0(%rip),%rax
mov    (%rax),%rdi
lea    0xdaf(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xda0(%rip),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1382 <main+0x222>
jmp    141b <main+0x2bb>
mov    -0x14(%rbp),%eax
mov    0x2c5c(%rip),%rcx
cmp    (%rcx),%eax
jne    13c8 <main+0x268>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2c2b(%rip),%rax
mov    (%rax),%rdi
lea    0xd52(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    13cd <main+0x26d>
mov    -0x30(%rbp),%rdi
mov    -0x1c(%rbp),%edx
lea    0xd47(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x18(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1408 <main+0x2a8>
mov    -0x30(%rbp),%rdi
lea    0xce7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    140d <main+0x2ad>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    135a <main+0x1fa>
mov    -0x30(%rbp),%rdi
lea    0xd01(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x430,%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,%r15
cmp    $0x2,%edi
jne    13d2 <main+0x262>
mov    0x8(%r15),%rcx
lea    0xe7e(%rip),%rdx
lea    0x210(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1ff,%esi
call   1040 <snprintf@plt>
movb   $0x0,0x40f(%rsp)
mov    0x8(%r15),%rcx
lea    0xe5e(%rip),%rdx
lea    0x10(%rsp),%rdi
mov    $0x1ff,%esi
call   1040 <snprintf@plt>
movb   $0x0,0x20f(%rsp)
lea    0xe45(%rip),%rsi
mov    %rbx,%rdi
call   1070 <fopen@plt>
test   %rax,%rax
je     13e8 <main+0x278>
mov    %rax,%r14
lea    0xe51(%rip),%rsi
lea    0x10(%rsp),%rdi
call   1070 <fopen@plt>
test   %rax,%rax
je     1403 <main+0x293>
mov    %rax,%rbx
lea    0xe5b(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1090 <fwrite@plt>
lea    0xe46(%rip),%rdi
mov    $0x3a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe68(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe61(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    0x8(%r15),%rdx
lea    0xe49(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe5e(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <fscanf@plt>
mov    0x2d48(%rip),%rcx
cmp    (%rcx),%eax
je     1432 <main+0x2c2>
lea    0xe56(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <fscanf@plt>
test   %eax,%eax
je     135b <main+0x1eb>
mov    $0x1,%r12d
mov    $0xffffffff,%r15d
lea    0xc(%rsp),%rbp
jmp    1300 <main+0x190>
nopl   0x0(%rax)
add    $0x1,%r12d
mov    %r14,%rdi
lea    0xe17(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
add    $0xffffffff,%r15d
test   %eax,%eax
je     135b <main+0x1eb>
mov    0x2ce1(%rip),%rcx
cmp    (%rcx),%eax
je     1398 <main+0x228>
mov    %r12d,%eax
mov    $0xcccccccd,%ecx
imul   %rcx,%rax
shr    $0x24,%rax
lea    (%rax,%rax,4),%eax
lea    (%r15,%rax,4),%r13d
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
lea    0xdee(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
test   %r13d,%r13d
jne    12e0 <main+0x170>
mov    $0x4,%esi
mov    $0x1,%edx
lea    0xd97(%rip),%rdi
mov    %rbx,%rcx
call   1090 <fwrite@plt>
jmp    12e0 <main+0x170>
lea    0xdc5(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x2c29(%rip),%rax
mov    (%rax),%rcx
lea    0xd50(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
call   1090 <fwrite@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    0x2bff(%rip),%rax
mov    (%rax),%rdi
mov    (%r15),%rdx
lea    0xc1a(%rip),%rsi
jmp    1421 <main+0x2b1>
mov    0x2be9(%rip),%rax
mov    (%rax),%rdi
lea    0xc2c(%rip),%rsi
lea    0x210(%rsp),%rdx
jmp    1421 <main+0x2b1>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    0x2bc6(%rip),%rax
mov    (%rax),%rdi
lea    0xc30(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x2b8f(%rip),%rax
mov    (%rax),%rcx
lea    0xc9e(%rip),%rdi
mov    $0x13,%esi
jmp    13be <main+0x24e>

LLVM IR (-O0):
@stderr = global i32* null
@.str = [22 x i8] c"Usage: %s <basename>\0A\00"
@.str.1 = [8 x i8] c"%s.fasl\00"
@.str.2 = [5 x i8] c"%s.h\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [37 x i8] c"Could not open file %s for reading.\0A\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [37 x i8] c"Could not open file %s for writing.\0A\00"
@.str.7 = [4 x i8] c"/*\0A\00"
@.str.8 = [59 x i8] c"\09This code was automatically generated from a .fasl file.\0A\00"
@.str.9 = [18 x i8] c"\09Do not edit it.\0A\00"
@.str.10 = [5 x i8] c"*/\0A\0A\00"
@.str.11 = [38 x i8] c"static const uint8_t %s_buf[] = {\0A \00"
@.str.12 = [4 x i8] c" #(\00"
@EOF = global i32 0
@.str.13 = [20 x i8] c"invalid input file\0A\00"
@.str.14 = [4 x i8] c" %u\00"
@.str.15 = [25 x i8] c"unexpected end of input\0A\00"
@.str.16 = [5 x i8] c"%u, \00"
@.str.17 = [5 x i8] c"\0A \00"
@.str.18 = [5 x i8] c"};\0A\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 i32*
%11 = alloca [512 x i8]
%12 = alloca [512 x i8]
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 %22
15: ; preds = %2
%16 = load i32*, i32** @stderr
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 0
%19 = load i8*, i8** %18
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %19)
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %2
%23 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @snprintf(i8* %23, i32 511, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 511
store i8 0, i8* %28
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i32 @snprintf(i8* %29, i32 511, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %32)
%34 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 511
store i8 0, i8* %34
%35 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%36 = call i32* @fopen(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %36, i32** %9
%37 = load i32*, i32** %9
%38 = icmp ne i32* %37, null
br i1 %38, label %44, label %39
39: ; preds = %22
%40 = load i32*, i32** @stderr
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%42 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %41)
%43 = call i32 @exit(i32 1)
unreachable
44: ; preds = %22
%45 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%46 = call i32* @fopen(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32* %46, i32** %10
%47 = load i32*, i32** %10
%48 = icmp ne i32* %47, null
br i1 %48, label %56, label %49
49: ; preds = %44
%50 = load i32*, i32** %9
%51 = call i32 @fclose(i32* %50)
%52 = load i32*, i32** @stderr
%53 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i8* %53)
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %44
%57 = load i32*, i32** %10
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%59 = load i32*, i32** %10
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.8, i64 0, i64 0))
%61 = load i32*, i32** %10
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %61, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%63 = load i32*, i32** %10
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %63, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%65 = load i32*, i32** %10
%66 = load i8**, i8*** %5
%67 = getelementptr inbounds i8*, i8** %66, i64 1
%68 = load i8*, i8** %67
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %65, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i8* %68)
%70 = load i32*, i32** %9
%71 = call i32 (i32*, i8*, ...) @fscanf(i32* %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
store i32 %71, i32* %6
%72 = load i32, i32* %6
%73 = load i32, i32* @EOF
%74 = icmp eq i32 %72, %73
br i1 %74, label %75, label %83
75: ; preds = %56
%76 = load i32*, i32** %9
%77 = call i32 @fclose(i32* %76)
%78 = load i32*, i32** %10
%79 = call i32 @fclose(i32* %78)
%80 = load i32*, i32** @stderr
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%82 = call i32 @exit(i32 1)
unreachable
83: ; preds = %56
store i32 1, i32* %7
br label %84
84: ; preds = %114, %83
%85 = load i32*, i32** %9
%86 = call i32 (i32*, i8*, ...) @fscanf(i32* %85, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32* %8)
store i32 %86, i32* %6
%87 = load i32, i32* %6
%88 = icmp eq i32 %87, 0
br i1 %88, label %89, label %90
89: ; preds = %84
br label %117
90: ; preds = %84
%91 = load i32, i32* %6
%92 = load i32, i32* @EOF
%93 = icmp eq i32 %91, %92
br i1 %93, label %94, label %102
94: ; preds = %90
%95 = load i32*, i32** %9
%96 = call i32 @fclose(i32* %95)
%97 = load i32*, i32** %10
%98 = call i32 @fclose(i32* %97)
%99 = load i32*, i32** @stderr
%100 = call i32 (i32*, i8*, ...) @fprintf(i32* %99, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
%101 = call i32 @exit(i32 1)
unreachable
102: ; preds = %90
br label %103
103: ; preds = %102
%104 = load i32*, i32** %10
%105 = load i32, i32* %8
%106 = call i32 (i32*, i8*, ...) @fprintf(i32* %104, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i32 %105)
%107 = load i32, i32* %7
%108 = srem i32 %107, 20
%109 = icmp ne i32 %108, 0
br i1 %109, label %113, label %110
110: ; preds = %103
%111 = load i32*, i32** %10
%112 = call i32 (i32*, i8*, ...) @fprintf(i32* %111, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
br label %113
113: ; preds = %110, %103
br label %114
114: ; preds = %113
%115 = load i32, i32* %7
%116 = add nsw i32 %115, 1
store i32 %116, i32* %7
br label %84
117: ; preds = %89
%118 = load i32*, i32** %10
%119 = call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%120 = load i32*, i32** %9
%121 = call i32 @fclose(i32* %120)
%122 = load i32*, i32** %10
%123 = call i32 @fclose(i32* %122)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [22 x i8] c"Usage: %s <basename>\0A\00"
@.str.1 = [8 x i8] c"%s.fasl\00"
@.str.2 = [5 x i8] c"%s.h\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [37 x i8] c"Could not open file %s for reading.\0A\00"
@.str.5 = [2 x i8] c"w\00"
@.str.6 = [37 x i8] c"Could not open file %s for writing.\0A\00"
@.str.7 = [4 x i8] c"/*\0A\00"
@.str.8 = [59 x i8] c"\09This code was automatically generated from a .fasl file.\0A\00"
@.str.9 = [18 x i8] c"\09Do not edit it.\0A\00"
@.str.10 = [5 x i8] c"*/\0A\0A\00"
@.str.11 = [38 x i8] c"static const uint8_t %s_buf[] = {\0A \00"
@.str.12 = [4 x i8] c" #(\00"
@EOF = global i32 0
@.str.13 = [20 x i8] c"invalid input file\0A\00"
@.str.14 = [4 x i8] c" %u\00"
@.str.15 = [25 x i8] c"unexpected end of input\0A\00"
@.str.16 = [5 x i8] c"%u, \00"
@.str.17 = [5 x i8] c"\0A \00"
@.str.18 = [5 x i8] c"};\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = bitcast i32* %3 to i8*
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%9 = icmp eq i32 %0, 2
br i1 %9, label %15, label %10
10: ; preds = %2
%11 = load i32*, i32** @stderr
%12 = load i8*, i8** %1
%13 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = tail call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @snprintf(i8* %7, i32 511, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 511
store i8 0, i8* %19
%20 = load i8*, i8** %16
%21 = call i32 @snprintf(i8* %8, i32 511, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 511
store i8 0, i8* %22
%23 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %29
25: ; preds = %15
%26 = load i32*, i32** @stderr
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %7)
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %15
%30 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%31 = icmp eq i32* %30, null
br i1 %31, label %32, label %37
32: ; preds = %29
%33 = call i32 @fclose(i32* %23)
%34 = load i32*, i32** @stderr
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i8* %8)
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %29
%38 = call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 3, i64 1, i32* %30)
%39 = call i64 @fwrite(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.8, i64 0, i64 0), i64 58, i64 1, i32* %30)
%40 = call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i64 17, i64 1, i32* %30)
%41 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i64 4, i64 1, i32* %30)
%42 = load i8*, i8** %16
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %30, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.11, i64 0, i64 0), i8* %42)
%44 = call i32 (i32*, i8*, ...) @fscanf(i32* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%45 = load i32, i32* @EOF
%46 = icmp eq i32 %44, %45
br i1 %46, label %50, label %47
47: ; preds = %37
%48 = call i32 (i32*, i8*, ...) @fscanf(i32* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32* %3)
%49 = icmp eq i32 %48, 0
br i1 %49, label %78, label %56
50: ; preds = %37
%51 = call i32 @fclose(i32* %23)
%52 = call i32 @fclose(i32* %30)
%53 = load i32*, i32** @stderr
%54 = call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0), i64 19, i64 1, i32* %53)
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %47, %74
%57 = phi i32 [ %76, %74 ], [ %48, %47 ]
%58 = phi i32 [ %75, %74 ], [ 1, %47 ]
%59 = load i32, i32* @EOF
%60 = icmp eq i32 %57, %59
br i1 %60, label %61, label %67
61: ; preds = %56
%62 = call i32 @fclose(i32* %23)
%63 = call i32 @fclose(i32* %30)
%64 = load i32*, i32** @stderr
%65 = call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), i64 24, i64 1, i32* %64)
%66 = call i32 @exit(i32 1)
unreachable
67: ; preds = %56
%68 = load i32, i32* %3
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %30, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i32 %68)
%70 = urem i32 %58, 20
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %67
%73 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i64 4, i64 1, i32* %30)
br label %74
74: ; preds = %67, %72
%75 = add nuw nsw i32 %58, 1
%76 = call i32 (i32*, i8*, ...) @fscanf(i32* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32* %3)
%77 = icmp eq i32 %76, 0
br i1 %77, label %78, label %56
78: ; preds = %74, %47
%79 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i64 4, i64 1, i32* %30)
%80 = call i32 @fclose(i32* %23)
%81 = call i32 @fclose(i32* %30)
ret i32 0
}