#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
scalar_t__ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  FILE *ifp;
  FILE *ofp;
  int i;
  int n;
  int count = 0;
  unsigned char buffer[1024];
  if (argc != 5) {
    fprintf(stderr, "Usage: %s <input> <output> <kwsys-name> <array>\n",
            argv[0]);
    return 1;
  }
  ifp = fopen(argv[1], "rb");
  if (!ifp) {
    fprintf(stderr, "Cannot open input file: \"%s\"\n", argv[1]);
    return 2;
  }
  ofp = fopen(argv[2], "w");
  if (!ofp) {
    fprintf(stderr, "Cannot open output file: \"%s\"\n", argv[2]);
    fclose(ifp);
    return 2;
  }
  fprintf(ofp, "/*\n * DO NOT EDIT\n * This file is generated by:\n");
  fprintf(ofp, " * %s\n */\n\n", argv[0]);
  fprintf(ofp, "#include \"kwsysPrivate.h\"\n");
  fprintf(ofp, "#include KWSYS_HEADER(Configure.h)\n\n");
  fprintf(ofp, "#include <stdio.h>\n\n");
  fprintf(ofp, "#if defined(_WIN32)\n");
  fprintf(ofp, "# include <io.h>\n");
  fprintf(ofp, "#else\n");
  fprintf(ofp, "# include <unistd.h>\n");
  fprintf(ofp, "#endif\n");
  fprintf(ofp, "\n");
  fprintf(ofp, "static void kwsys_unlink(const char* fname)\n");
  fprintf(ofp, "{\n");
  fprintf(ofp, "#if defined(__WATCOMC__)\n");
  fprintf(ofp, "  unlink(fname);\n");
  fprintf(ofp, "#else\n");
  fprintf(ofp, "  _unlink(fname);\n");
  fprintf(ofp, "#endif\n");
  fprintf(ofp, "}\n");
  fprintf(ofp, "\n");
  while ((n = (int)fread(buffer, 1, 1024, ifp)) > 0) {
    fprintf(ofp, "static unsigned char kwsysEncodedArray%s_%d[%d] = {\n",
            argv[4], count++, n);
    for (i = 0; i < n - 1; ++i) {
      fprintf(ofp, "0x%02X", buffer[i]);
      if (i % 10 == 9) {
        fprintf(ofp, ",\n");
      } else {
        fprintf(ofp, ", ");
      }
    }
    fprintf(ofp, "0x%02X};\n\n", buffer[n - 1]);
  }
  fclose(ifp);
  fprintf(ofp,
          "extern %s_EXPORT int %sEncodedWriteArray%s(const char* fname)\n",
          argv[3], argv[3], argv[4]);
  fprintf(ofp, "{\n");
  fprintf(ofp, "  FILE* ofp = fopen(fname, \"wb\");\n");
  fprintf(ofp, "  if(!ofp) { return 0; }\n");
  for (i = 0; i < count; ++i) {
    fprintf(ofp,
            "  if(fwrite(kwsysEncodedArray%s_%d, 1,\n"
            "            sizeof(kwsysEncodedArray%s_%d), ofp) !=\n"
            "       sizeof(kwsysEncodedArray%s_%d))\n",
            argv[4], i, argv[4], i, argv[4], i);
    fprintf(ofp, "    {\n");
    fprintf(ofp, "    fclose(ofp);\n");
    fprintf(ofp, "    kwsys_unlink(fname);\n");
    fprintf(ofp, "    return 0;\n");
    fprintf(ofp, "    }\n");
  }
  fprintf(ofp, "  fclose(ofp);\n");
  fprintf(ofp, "  return 1;\n");
  fprintf(ofp, "}\n");
  fclose(ofp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     1195 <main+0x55>
mov    0x2e6f(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    160d <main+0x4cd>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe8d(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11e4 <main+0xa4>
mov    0x2e21(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe63(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    160d <main+0x4cd>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe5f(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    123c <main+0xfc>
mov    0x2dd2(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xe34(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x2,-0x4(%rbp)
jmp    160d <main+0x4cd>
mov    -0x20(%rbp),%rdi
lea    0xe2c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe44(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe3e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe47(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe5a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe5d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe60(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe60(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe55(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdec(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe3d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xfe7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe46(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe4e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdd0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe3c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdc9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xfbd(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd4a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    -0x430(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x400,%edx
call   1030 <fread@plt>
mov    %eax,-0x28(%rbp)
cmp    $0x0,%eax
jle    14a7 <main+0x367>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdx
mov    -0x2c(%rbp),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%r8d
lea    0xdca(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1480 <main+0x340>
mov    -0x20(%rbp),%rdi
movslq -0x24(%rbp),%rax
movzbl -0x430(%rbp,%rax,1),%edx
ff
lea    0xdc9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x24(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x9,%edx
jne    145b <main+0x31b>
mov    -0x20(%rbp),%rdi
lea    0xdaa(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    146d <main+0x32d>
mov    -0x20(%rbp),%rdi
lea    0xd96(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1472 <main+0x332>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1401 <main+0x2c1>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%eax
sub    $0x1,%eax
cltq
movzbl -0x430(%rbp,%rax,1),%edx
ff
lea    0xd64(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13ab <main+0x26b>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
lea    0xd37(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe28(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd52(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd63(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    15c7 <main+0x487>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
mov    -0x24(%rbp),%r9d
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r10
mov    -0x24(%rbp),%eax
lea    0xd36(%rip),%rsi
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd9f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd94(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd94(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd9c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd99(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1517 <main+0x3d7>
mov    -0x20(%rbp),%rdi
lea    0xd40(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd6e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd59(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x438,%rsp
mov    %rsi,%r14
cmp    $0x5,%edi
jne    14cd <main+0x36d>
mov    0x8(%r14),%rdi
lea    0xea9(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     167e <main+0x51e>
mov    0x10(%r14),%rdi
lea    0xeac(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     169c <main+0x53c>
mov    %rax,%rbx
lea    0xeb5(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1080 <fwrite@plt>
mov    (%r14),%rdx
lea    0xeca(%rip),%rsi
xor    %r12d,%r12d
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xec2(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xec4(%rip),%rdi
mov    $0x24,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xed0(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xecc(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xec8(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xec1(%rip),%r15
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xeac(%rip),%rdi
mov    $0x15,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xea9(%rip),%rbp
mov    $0x7,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xe88(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0x102b(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xe83(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xe84(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xe68(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0x7,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xfdf(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0x30(%rsp),%rdi
mov    $0x1,%esi
mov    $0x400,%edx
mov    0x8(%rsp),%rcx
call   1030 <fread@plt>
mov    %rax,%rbp
test   %ebp,%ebp
jle    14f2 <main+0x392>
xor    %r12d,%r12d
mov    %r14,0x20(%rsp)
jmp    1410 <main+0x2b0>
nopl   (%rax)
mov    0x14(%rsp),%r12d
add    $0x1,%r12d
mov    0x18(%rsp),%rax
movzbl 0x30(%rsp,%rax,1),%edx
mov    %r15,%rdi
lea    0xe22(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0x30(%rsp),%rdi
mov    $0x1,%esi
mov    $0x400,%edx
mov    0x8(%rsp),%rcx
call   1030 <fread@plt>
mov    %rax,%rbp
test   %ebp,%ebp
mov    0x20(%rsp),%r14
mov    %r15,%rbx
jle    14f2 <main+0x392>
mov    0x20(%r14),%rdx
mov    %rbx,%rdi
lea    0xd9f(%rip),%rsi
mov    %r12d,0x14(%rsp)
mov    %r12d,%ecx
mov    %ebp,%r8d
xor    %eax,%eax
call   1060 <fprintf@plt>
movslq %ebp,%rax
lea    -0x1(%rax),%rcx
mov    %rcx,0x18(%rsp)
cmp    $0x2,%eax
mov    $0xcccccccd,%ecx
lea    0xda7(%rip),%rsi
mov    %rbx,%r15
lea    0xda4(%rip),%rbx
lea    0xda0(%rip),%rbp
jb     13c0 <main+0x260>
mov    0x18(%rsp),%eax
mov    %rax,0x28(%rsp)
xor    %r12d,%r12d
xchg   %ax,%ax
mov    %r12d,%eax
imul   %rcx,%rax
shr    $0x23,%rax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,1),%r14d
add    $0x9,%r14d
movzbl 0x30(%rsp,%r12,1),%edx
mov    %r15,%rdi
mov    %rsi,%r13
xor    %eax,%eax
call   1060 <fprintf@plt>
cmp    %r12d,%r14d
mov    %rbp,%rdi
cmove  %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1080 <fwrite@plt>
mov    %r13,%rsi
mov    $0xcccccccd,%ecx
add    $0x1,%r12
cmp    %r12,0x28(%rsp)
jne    1470 <main+0x310>
jmp    13c0 <main+0x260>
mov    0x2b0c(%rip),%rax
movslq (%rax),%rdi
mov    (%r14),%rdx
lea    0xb1f(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%eax
jmp    16c7 <main+0x567>
mov    0x8(%rsp),%rdi
call   1040 <fclose@plt>
mov    0x18(%r14),%rcx
mov    0x20(%r14),%r8
lea    0xcff(%rip),%rsi
mov    %rbx,%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xdee(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xd11(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xd1b(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
test   %r12d,%r12d
je     1627 <main+0x4c7>
mov    %r12d,%ebp
lea    0xdc6(%rip),%r12
lea    0xdce(%rip),%r13
xor    %r15d,%r15d
mov    0x20(%r14),%rdx
mov    %rbx,%rdi
lea    0xcf8(%rip),%rsi
mov    %r15d,%ecx
mov    %rdx,%r8
mov    %r15d,%r9d
xor    %eax,%eax
push   %r15
push   %rdx
call   1060 <fprintf@plt>
add    $0x10,%rsp
mov    $0x6,%esi
mov    $0x1,%edx
lea    0xd53(%rip),%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0x11,%esi
mov    $0x1,%edx
lea    0xd41(%rip),%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0x19,%esi
mov    $0x1,%edx
lea    0xd3a(%rip),%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0xe,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r13,%rdi
mov    %rbx,%rcx
call   1080 <fwrite@plt>
add    $0x1,%r15d
cmp    %r15d,%ebp
jne    1580 <main+0x420>
lea    0xce4(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xd0b(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
lea    0xcef(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1080 <fwrite@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
jmp    16c7 <main+0x567>
mov    0x295b(%rip),%rax
movslq (%rax),%rdi
mov    0x8(%r14),%rdx
lea    0x9a1(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    16c2 <main+0x562>
mov    0x293d(%rip),%rax
movslq (%rax),%rdi
mov    0x10(%r14),%rdx
lea    0x9a3(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x8(%rsp),%rdi
call   1040 <fclose@plt>
mov    $0x2,%eax
add    $0x438,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: %s <input> <output> <kwsys-name> <array>\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [30 x i8] c"Cannot open input file: \22%s\22\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [31 x i8] c"Cannot open output file: \22%s\22\0A\00"
@.str.5 = [49 x i8] c"/*\0A * DO NOT EDIT\0A * This file is generated by:\0A\00"
@.str.6 = [12 x i8] c" * %s\0A */\0A\0A\00"
@.str.7 = [27 x i8] c"#include \22kwsysPrivate.h\22\0A\00"
@.str.8 = [37 x i8] c"#include KWSYS_HEADER(Configure.h)\0A\0A\00"
@.str.9 = [21 x i8] c"#include <stdio.h>\0A\0A\00"
@.str.10 = [21 x i8] c"#if defined(_WIN32)\0A\00"
@.str.11 = [18 x i8] c"# include <io.h>\0A\00"
@.str.12 = [7 x i8] c"#else\0A\00"
@.str.13 = [22 x i8] c"# include <unistd.h>\0A\00"
@.str.14 = [8 x i8] c"#endif\0A\00"
@.str.15 = [2 x i8] c"\0A\00"
@.str.16 = [45 x i8] c"static void kwsys_unlink(const char* fname)\0A\00"
@.str.17 = [3 x i8] c"{\0A\00"
@.str.18 = [26 x i8] c"#if defined(__WATCOMC__)\0A\00"
@.str.19 = [18 x i8] c" unlink(fname);\0A\00"
@.str.20 = [19 x i8] c" _unlink(fname);\0A\00"
@.str.21 = [3 x i8] c"}\0A\00"
@.str.22 = [53 x i8] c"static unsigned char kwsysEncodedArray%s_%d[%d] = {\0A\00"
@.str.23 = [7 x i8] c"0x%02X\00"
@.str.24 = [3 x i8] c",\0A\00"
@.str.25 = [3 x i8] c", \00"
@.str.26 = [11 x i8] c"0x%02X};\0A\0A\00"
@.str.27 = [63 x i8] c"extern %s_EXPORT int %sEncodedWriteArray%s(const char* fname)\0A\00"
@.str.28 = [35 x i8] c" FILE* ofp = fopen(fname, \22wb\22);\0A\00"
@.str.29 = [26 x i8] c" if(!ofp) { return 0; }\0A\00"
@.str.30 = [131 x i8] c" if(fwrite(kwsysEncodedArray%s_%d, 1,\0A sizeof(kwsysEncodedArray%s_%d), ofp) !=\0A sizeof(kwsysEncodedArray%s_%d))\0A\00"
@.str.31 = [7 x i8] c" {\0A\00"
@.str.32 = [18 x i8] c" fclose(ofp);\0A\00"
@.str.33 = [26 x i8] c" kwsys_unlink(fname);\0A\00"
@.str.34 = [15 x i8] c" return 0;\0A\00"
@.str.35 = [7 x i8] c" }\0A\00"
@.str.36 = [16 x i8] c" fclose(ofp);\0A\00"
@.str.37 = [13 x i8] c" return 1;\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 [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 5
br i1 %13, label %14, label %22
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %20)
store i32 1, i32* %3
br label %209
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %26, i32** %6
%27 = load i32*, i32** %6
%28 = icmp ne i32* %27, null
br i1 %28, label %37, label %29
29: ; preds = %22
%30 = load i32, i32* @stderr
%31 = sext i32 %30 to i64
%32 = inttoptr i64 %31 to i32*
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %35)
store i32 2, i32* %3
br label %209
37: ; preds = %22
%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 ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %41, i32** %7
%42 = load i32*, i32** %7
%43 = icmp ne i32* %42, null
br i1 %43, label %54, label %44
44: ; preds = %37
%45 = load i32, i32* @stderr
%46 = sext i32 %45 to i64
%47 = inttoptr i64 %46 to i32*
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 2
%50 = load i8*, i8** %49
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %50)
%52 = load i32*, i32** %6
%53 = call i32 @fclose(i32* %52)
store i32 2, i32* %3
br label %209
54: ; preds = %37
%55 = load i32*, i32** %7
%56 = call i32 (i32*, i8*, ...) @fprintf(i32* %55, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%57 = load i32*, i32** %7
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 0
%60 = load i8*, i8** %59
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %60)
%62 = load i32*, i32** %7
%63 = call i32 (i32*, i8*, ...) @fprintf(i32* %62, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%64 = load i32*, i32** %7
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%66 = load i32*, i32** %7
%67 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%68 = load i32*, i32** %7
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %68, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%70 = load i32*, i32** %7
%71 = call i32 (i32*, i8*, ...) @fprintf(i32* %70, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%72 = load i32*, i32** %7
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%74 = load i32*, i32** %7
%75 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%76 = load i32*, i32** %7
%77 = call i32 (i32*, i8*, ...) @fprintf(i32* %76, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%78 = load i32*, i32** %7
%79 = call i32 (i32*, i8*, ...) @fprintf(i32* %78, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%80 = load i32*, i32** %7
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%82 = load i32*, i32** %7
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%84 = load i32*, i32** %7
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0))
%86 = load i32*, i32** %7
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i64 0, i64 0))
%88 = load i32*, i32** %7
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%90 = load i32*, i32** %7
%91 = call i32 (i32*, i8*, ...) @fprintf(i32* %90, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
%92 = load i32*, i32** %7
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%94 = load i32*, i32** %7
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
%96 = load i32*, i32** %7
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %98
98: ; preds = %139, %54
%99 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%100 = load i32*, i32** %6
%101 = call i64 @fread(i8* %99, i32 1, i32 1024, i32* %100)
%102 = trunc i64 %101 to i32
store i32 %102, i32* %9
%103 = icmp sgt i32 %102, 0
br i1 %103, label %104, label %148
104: ; preds = %98
%105 = load i32*, i32** %7
%106 = load i8**, i8*** %5
%107 = getelementptr inbounds i8*, i8** %106, i64 4
%108 = load i8*, i8** %107
%109 = load i32, i32* %10
%110 = add nsw i32 %109, 1
store i32 %110, i32* %10
%111 = load i32, i32* %9
%112 = call i32 (i32*, i8*, ...) @fprintf(i32* %105, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.22, i64 0, i64 0), i8* %108, i32 %109, i32 %111)
store i32 0, i32* %8
br label %113
113: ; preds = %136, %104
%114 = load i32, i32* %8
%115 = load i32, i32* %9
%116 = sub nsw i32 %115, 1
%117 = icmp slt i32 %114, %116
br i1 %117, label %118, label %139
118: ; preds = %113
%119 = load i32*, i32** %7
%120 = load i32, i32* %8
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 %121
%123 = load i8, i8* %122
%124 = zext i8 %123 to i32
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %119, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i32 %124)
%126 = load i32, i32* %8
%127 = srem i32 %126, 10
%128 = icmp eq i32 %127, 9
br i1 %128, label %129, label %132
129: ; preds = %118
%130 = load i32*, i32** %7
%131 = call i32 (i32*, i8*, ...) @fprintf(i32* %130, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
br label %135
132: ; preds = %118
%133 = load i32*, i32** %7
%134 = call i32 (i32*, i8*, ...) @fprintf(i32* %133, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
br label %135
135: ; preds = %132, %129
br label %136
136: ; preds = %135
%137 = load i32, i32* %8
%138 = add nsw i32 %137, 1
store i32 %138, i32* %8
br label %113
139: ; preds = %113
%140 = load i32*, i32** %7
%141 = load i32, i32* %9
%142 = sub nsw i32 %141, 1
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 %143
%145 = load i8, i8* %144
%146 = zext i8 %145 to i32
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %140, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %146)
br label %98
148: ; preds = %98
%149 = load i32*, i32** %6
%150 = call i32 @fclose(i32* %149)
%151 = load i32*, i32** %7
%152 = load i8**, i8*** %5
%153 = getelementptr inbounds i8*, i8** %152, i64 3
%154 = load i8*, i8** %153
%155 = load i8**, i8*** %5
%156 = getelementptr inbounds i8*, i8** %155, i64 3
%157 = load i8*, i8** %156
%158 = load i8**, i8*** %5
%159 = getelementptr inbounds i8*, i8** %158, i64 4
%160 = load i8*, i8** %159
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %151, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.27, i64 0, i64 0), i8* %154, i8* %157, i8* %160)
%162 = load i32*, i32** %7
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%164 = load i32*, i32** %7
%165 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.28, i64 0, i64 0))
%166 = load i32*, i32** %7
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %166, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.29, i64 0, i64 0))
store i32 0, i32* %8
br label %168
168: ; preds = %197, %148
%169 = load i32, i32* %8
%170 = load i32, i32* %10
%171 = icmp slt i32 %169, %170
br i1 %171, label %172, label %200
172: ; preds = %168
%173 = load i32*, i32** %7
%174 = load i8**, i8*** %5
%175 = getelementptr inbounds i8*, i8** %174, i64 4
%176 = load i8*, i8** %175
%177 = load i32, i32* %8
%178 = load i8**, i8*** %5
%179 = getelementptr inbounds i8*, i8** %178, i64 4
%180 = load i8*, i8** %179
%181 = load i32, i32* %8
%182 = load i8**, i8*** %5
%183 = getelementptr inbounds i8*, i8** %182, i64 4
%184 = load i8*, i8** %183
%185 = load i32, i32* %8
%186 = call i32 (i32*, i8*, ...) @fprintf(i32* %173, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.30, i64 0, i64 0), i8* %176, i32 %177, i8* %180, i32 %181, i8* %184, i32 %185)
%187 = load i32*, i32** %7
%188 = call i32 (i32*, i8*, ...) @fprintf(i32* %187, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0))
%189 = load i32*, i32** %7
%190 = call i32 (i32*, i8*, ...) @fprintf(i32* %189, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i64 0, i64 0))
%191 = load i32*, i32** %7
%192 = call i32 (i32*, i8*, ...) @fprintf(i32* %191, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.33, i64 0, i64 0))
%193 = load i32*, i32** %7
%194 = call i32 (i32*, i8*, ...) @fprintf(i32* %193, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0))
%195 = load i32*, i32** %7
%196 = call i32 (i32*, i8*, ...) @fprintf(i32* %195, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.35, i64 0, i64 0))
br label %197
197: ; preds = %172
%198 = load i32, i32* %8
%199 = add nsw i32 %198, 1
store i32 %199, i32* %8
br label %168
200: ; preds = %168
%201 = load i32*, i32** %7
%202 = call i32 (i32*, i8*, ...) @fprintf(i32* %201, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.36, i64 0, i64 0))
%203 = load i32*, i32** %7
%204 = call i32 (i32*, i8*, ...) @fprintf(i32* %203, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.37, i64 0, i64 0))
%205 = load i32*, i32** %7
%206 = call i32 (i32*, i8*, ...) @fprintf(i32* %205, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
%207 = load i32*, i32** %7
%208 = call i32 @fclose(i32* %207)
store i32 0, i32* %3
br label %209
209: ; preds = %200, %44, %29, %14
%210 = load i32, i32* %3
ret i32 %210
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: %s <input> <output> <kwsys-name> <array>\0A\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [30 x i8] c"Cannot open input file: \22%s\22\0A\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [31 x i8] c"Cannot open output file: \22%s\22\0A\00"
@.str.5 = [49 x i8] c"/*\0A * DO NOT EDIT\0A * This file is generated by:\0A\00"
@.str.6 = [12 x i8] c" * %s\0A */\0A\0A\00"
@.str.7 = [27 x i8] c"#include \22kwsysPrivate.h\22\0A\00"
@.str.8 = [37 x i8] c"#include KWSYS_HEADER(Configure.h)\0A\0A\00"
@.str.9 = [21 x i8] c"#include <stdio.h>\0A\0A\00"
@.str.10 = [21 x i8] c"#if defined(_WIN32)\0A\00"
@.str.11 = [18 x i8] c"# include <io.h>\0A\00"
@.str.12 = [7 x i8] c"#else\0A\00"
@.str.13 = [22 x i8] c"# include <unistd.h>\0A\00"
@.str.14 = [8 x i8] c"#endif\0A\00"
@.str.16 = [45 x i8] c"static void kwsys_unlink(const char* fname)\0A\00"
@.str.17 = [3 x i8] c"{\0A\00"
@.str.18 = [26 x i8] c"#if defined(__WATCOMC__)\0A\00"
@.str.19 = [18 x i8] c" unlink(fname);\0A\00"
@.str.20 = [19 x i8] c" _unlink(fname);\0A\00"
@.str.21 = [3 x i8] c"}\0A\00"
@.str.22 = [53 x i8] c"static unsigned char kwsysEncodedArray%s_%d[%d] = {\0A\00"
@.str.23 = [7 x i8] c"0x%02X\00"
@.str.24 = [3 x i8] c",\0A\00"
@.str.25 = [3 x i8] c", \00"
@.str.26 = [11 x i8] c"0x%02X};\0A\0A\00"
@.str.27 = [63 x i8] c"extern %s_EXPORT int %sEncodedWriteArray%s(const char* fname)\0A\00"
@.str.28 = [35 x i8] c" FILE* ofp = fopen(fname, \22wb\22);\0A\00"
@.str.29 = [26 x i8] c" if(!ofp) { return 0; }\0A\00"
@.str.30 = [131 x i8] c" if(fwrite(kwsysEncodedArray%s_%d, 1,\0A sizeof(kwsysEncodedArray%s_%d), ofp) !=\0A sizeof(kwsysEncodedArray%s_%d))\0A\00"
@.str.31 = [7 x i8] c" {\0A\00"
@.str.32 = [18 x i8] c" fclose(ofp);\0A\00"
@.str.33 = [26 x i8] c" kwsys_unlink(fname);\0A\00"
@.str.34 = [15 x i8] c" return 0;\0A\00"
@.str.35 = [7 x i8] c" }\0A\00"
@.str.36 = [16 x i8] c" fclose(ofp);\0A\00"
@.str.37 = [13 x i8] c" return 1;\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 5
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load i8*, i8** %1
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %122
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 %23
17: ; preds = %12
%18 = load i32, i32* @stderr
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i32*
%21 = load i8*, i8** %13
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %21)
br label %122
23: ; preds = %12
%24 = getelementptr inbounds i8*, i8** %1, i64 2
%25 = load i8*, i8** %24
%26 = tail call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %35
28: ; preds = %23
%29 = load i32, i32* @stderr
%30 = sext i32 %29 to i64
%31 = inttoptr i64 %30 to i32*
%32 = load i8*, i8** %24
%33 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %31, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %32)
%34 = tail call i32 @fclose(i32* %15)
br label %122
35: ; preds = %23
%36 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i64 48, i64 1, i32* %26)
%37 = load i8*, i8** %1
%38 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %37)
%39 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i64 26, i64 1, i32* %26)
%40 = tail call i64 @fwrite(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i64 36, i64 1, i32* %26)
%41 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i64 20, i64 1, i32* %26)
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0), i64 20, i64 1, i32* %26)
%43 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i64 17, i64 1, i32* %26)
%44 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i64 6, i64 1, i32* %26)
%45 = tail call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i64 21, i64 1, i32* %26)
%46 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i64 7, i64 1, i32* %26)
%47 = tail call i32 @fputc(i32 10, i32* %26)
%48 = tail call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0), i64 44, i64 1, i32* %26)
%49 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i64 2, i64 1, i32* %26)
%50 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i64 25, i64 1, i32* %26)
%51 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i64 0, i64 0), i64 17, i64 1, i32* %26)
%52 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i64 6, i64 1, i32* %26)
%53 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0), i64 18, i64 1, i32* %26)
%54 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i64 7, i64 1, i32* %26)
%55 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i64 2, i64 1, i32* %26)
%56 = tail call i32 @fputc(i32 10, i32* %26)
%57 = call i64 @fread(i8* %4, i32 1, i32 1024, i32* %15)
%58 = trunc i64 %57 to i32
%59 = icmp sgt i32 %58, 0
br i1 %59, label %60, label %94
60: ; preds = %35
%61 = getelementptr inbounds i8*, i8** %1, i64 4
br label %62
62: ; preds = %60, %85
%63 = phi i32 [ %58, %60 ], [ %92, %85 ]
%64 = phi i32 [ 0, %60 ], [ %66, %85 ]
%65 = load i8*, i8** %61
%66 = add nuw nsw i32 %64, 1
%67 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.22, i64 0, i64 0), i8* %65, i32 %64, i32 %63)
%68 = add nsw i32 %63, -1
%69 = icmp ugt i32 %63, 1
br i1 %69, label %70, label %85
70: ; preds = %62
%71 = zext i32 %68 to i64
br label %72
72: ; preds = %70, %72
%73 = phi i64 [ 0, %70 ], [ %83, %72 ]
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %73
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i32 %76)
%78 = trunc i64 %73 to i32
%79 = urem i32 %78, 10
%80 = icmp eq i32 %79, 9
%81 = select i1 %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0)
%82 = tail call i64 @fwrite(i8* %81, i64 2, i64 1, i32* %26)
%83 = add nuw nsw i64 %73, 1
%84 = icmp eq i64 %83, %71
br i1 %84, label %85, label %72
85: ; preds = %72, %62
%86 = sext i32 %68 to i64
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %86
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %89)
%91 = call i64 @fread(i8* %4, i32 1, i32 1024, i32* %15)
%92 = trunc i64 %91 to i32
%93 = icmp sgt i32 %92, 0
br i1 %93, label %62, label %94
94: ; preds = %85, %35
%95 = phi i32 [ 0, %35 ], [ %66, %85 ]
%96 = tail call i32 @fclose(i32* %15)
%97 = getelementptr inbounds i8*, i8** %1, i64 3
%98 = load i8*, i8** %97
%99 = getelementptr inbounds i8*, i8** %1, i64 4
%100 = load i8*, i8** %99
%101 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.27, i64 0, i64 0), i8* %98, i8* %98, i8* %100)
%102 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i64 2, i64 1, i32* %26)
%103 = tail call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.28, i64 0, i64 0), i64 34, i64 1, i32* %26)
%104 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.29, i64 0, i64 0), i64 25, i64 1, i32* %26)
%105 = icmp eq i32 %95, 0
br i1 %105, label %117, label %106
106: ; preds = %94, %106
%107 = phi i32 [ %115, %106 ], [ 0, %94 ]
%108 = load i8*, i8** %99
%109 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.30, i64 0, i64 0), i8* %108, i32 %107, i8* %108, i32 %107, i8* %108, i32 %107)
%110 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0), i64 6, i64 1, i32* %26)
%111 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i64 0, i64 0), i64 17, i64 1, i32* %26)
%112 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.33, i64 0, i64 0), i64 25, i64 1, i32* %26)
%113 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0), i64 14, i64 1, i32* %26)
%114 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.35, i64 0, i64 0), i64 6, i64 1, i32* %26)
%115 = add nuw i32 %107, 1
%116 = icmp eq i32 %115, %95
br i1 %116, label %117, label %106
117: ; preds = %106, %94
%118 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.36, i64 0, i64 0), i64 15, i64 1, i32* %26)
%119 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.37, i64 0, i64 0), i64 12, i64 1, i32* %26)
%120 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i64 2, i64 1, i32* %26)
%121 = tail call i32 @fclose(i32* %26)
br label %122
122: ; preds = %117, %28, %17, %6
%123 = phi i32 [ 1, %6 ], [ 0, %117 ], [ 2, %28 ], [ 2, %17 ]
ret i32 %123
}