#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]);
    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    1604 <main+0x4c4>
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    1604 <main+0x4c4>
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    1233 <main+0xf3>
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>
movl   $0x2,-0x4(%rbp)
jmp    1604 <main+0x4c4>
mov    -0x20(%rbp),%rdi
lea    0xe35(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe4d(%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    0xe50(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe63(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe66(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe69(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe69(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe5e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe62(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdf5(%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    0xff0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe4f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe57(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdd9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe45(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xdd2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xfc6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd53(%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    149e <main+0x35e>
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    0xdd3(%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    1477 <main+0x337>
mov    -0x20(%rbp),%rdi
movslq -0x24(%rbp),%rax
movzbl -0x430(%rbp,%rax,1),%edx
ff
lea    0xdd2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x24(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x9,%edx
jne    1452 <main+0x312>
mov    -0x20(%rbp),%rdi
lea    0xdb3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1464 <main+0x324>
mov    -0x20(%rbp),%rdi
lea    0xd9f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1469 <main+0x329>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13f8 <main+0x2b8>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%eax
sub    $0x1,%eax
cltq
movzbl -0x430(%rbp,%rax,1),%edx
ff
lea    0xd6d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13a2 <main+0x262>
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    0xd40(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xe31(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd5b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    15be <main+0x47e>
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    0xd3f(%rip),%rsi
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xda8(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd9d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd9d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xda5(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xda2(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    150e <main+0x3ce>
mov    -0x20(%rbp),%rdi
lea    0xd49(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd77(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xd62(%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     1695 <main+0x535>
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    %r15d,%r15d
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),%r12
mov    $0x6,%esi
mov    $0x1,%edx
mov    %r12,%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    %r12,%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    %r15d,%r15d
mov    %r14,0x20(%rsp)
jmp    1410 <main+0x2b0>
nopl   (%rax)
mov    0x14(%rsp),%r15d
add    $0x1,%r15d
mov    0x18(%rsp),%rax
movzbl 0x30(%rsp,%rax,1),%edx
mov    %r12,%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    %r12,%rbx
jle    14f2 <main+0x392>
mov    0x20(%r14),%rdx
mov    %rbx,%rdi
lea    0xd9f(%rip),%rsi
mov    %r15d,0x14(%rsp)
mov    %r15d,%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,%r12
lea    0xda4(%rip),%rbx
lea    0xda0(%rip),%rbp
jb     13c0 <main+0x260>
mov    0x18(%rsp),%eax
mov    %rax,0x28(%rsp)
xor    %r15d,%r15d
xchg   %ax,%ax
mov    %r15d,%eax
imul   %rcx,%rax
shr    $0x23,%rax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,1),%r14d
add    $0x9,%r14d
movzbl 0x30(%rsp,%r15,1),%edx
mov    %r12,%rdi
mov    %rsi,%r13
xor    %eax,%eax
call   1060 <fprintf@plt>
cmp    %r15d,%r14d
mov    %rbp,%rdi
cmove  %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1080 <fwrite@plt>
mov    %r13,%rsi
mov    $0xcccccccd,%ecx
add    $0x1,%r15
cmp    %r15,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    16b6 <main+0x556>
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   %r15d,%r15d
je     1627 <main+0x4c7>
mov    %r15d,%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    16b6 <main+0x556>
mov    0x295b(%rip),%rax
movslq (%rax),%rdi
mov    0x8(%r14),%rdx
lea    0x9a1(%rip),%rsi
jmp    16aa <main+0x54a>
mov    0x2944(%rip),%rax
movslq (%rax),%rdi
mov    0x10(%r14),%rdx
lea    0x9aa(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@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 %207
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 %207
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 %52, 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)
store i32 2, i32* %3
br label %207
52: ; preds = %37
%53 = load i32*, i32** %7
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%55 = load i32*, i32** %7
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 0
%58 = load i8*, i8** %57
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %55, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %58)
%60 = load i32*, i32** %7
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %60, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%62 = load i32*, i32** %7
%63 = call i32 (i32*, i8*, ...) @fprintf(i32* %62, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%64 = load i32*, i32** %7
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, 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.10, i64 0, i64 0))
%68 = load i32*, i32** %7
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %68, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%70 = load i32*, i32** %7
%71 = call i32 (i32*, i8*, ...) @fprintf(i32* %70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%72 = load i32*, i32** %7
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%74 = load i32*, i32** %7
%75 = call i32 (i32*, i8*, ...) @fprintf(i32* %74, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%76 = load i32*, i32** %7
%77 = call i32 (i32*, i8*, ...) @fprintf(i32* %76, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%78 = load i32*, i32** %7
%79 = call i32 (i32*, i8*, ...) @fprintf(i32* %78, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%80 = load i32*, i32** %7
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%82 = load i32*, i32** %7
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %82, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0))
%84 = load i32*, i32** %7
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i64 0, i64 0))
%86 = load i32*, i32** %7
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%88 = load i32*, i32** %7
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %88, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
%90 = load i32*, i32** %7
%91 = call i32 (i32*, i8*, ...) @fprintf(i32* %90, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%92 = load i32*, i32** %7
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
%94 = load i32*, i32** %7
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %96
96: ; preds = %137, %52
%97 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%98 = load i32*, i32** %6
%99 = call i64 @fread(i8* %97, i32 1, i32 1024, i32* %98)
%100 = trunc i64 %99 to i32
store i32 %100, i32* %9
%101 = icmp sgt i32 %100, 0
br i1 %101, label %102, label %146
102: ; preds = %96
%103 = load i32*, i32** %7
%104 = load i8**, i8*** %5
%105 = getelementptr inbounds i8*, i8** %104, i64 4
%106 = load i8*, i8** %105
%107 = load i32, i32* %10
%108 = add nsw i32 %107, 1
store i32 %108, i32* %10
%109 = load i32, i32* %9
%110 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.22, i64 0, i64 0), i8* %106, i32 %107, i32 %109)
store i32 0, i32* %8
br label %111
111: ; preds = %134, %102
%112 = load i32, i32* %8
%113 = load i32, i32* %9
%114 = sub nsw i32 %113, 1
%115 = icmp slt i32 %112, %114
br i1 %115, label %116, label %137
116: ; preds = %111
%117 = load i32*, i32** %7
%118 = load i32, i32* %8
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 %119
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = call i32 (i32*, i8*, ...) @fprintf(i32* %117, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i32 %122)
%124 = load i32, i32* %8
%125 = srem i32 %124, 10
%126 = icmp eq i32 %125, 9
br i1 %126, label %127, label %130
127: ; preds = %116
%128 = load i32*, i32** %7
%129 = call i32 (i32*, i8*, ...) @fprintf(i32* %128, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
br label %133
130: ; preds = %116
%131 = load i32*, i32** %7
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
br label %133
133: ; preds = %130, %127
br label %134
134: ; preds = %133
%135 = load i32, i32* %8
%136 = add nsw i32 %135, 1
store i32 %136, i32* %8
br label %111
137: ; preds = %111
%138 = load i32*, i32** %7
%139 = load i32, i32* %9
%140 = sub nsw i32 %139, 1
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 %141
%143 = load i8, i8* %142
%144 = zext i8 %143 to i32
%145 = call i32 (i32*, i8*, ...) @fprintf(i32* %138, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %144)
br label %96
146: ; preds = %96
%147 = load i32*, i32** %6
%148 = call i32 @fclose(i32* %147)
%149 = load i32*, i32** %7
%150 = load i8**, i8*** %5
%151 = getelementptr inbounds i8*, i8** %150, i64 3
%152 = load i8*, i8** %151
%153 = load i8**, i8*** %5
%154 = getelementptr inbounds i8*, i8** %153, i64 3
%155 = load i8*, i8** %154
%156 = load i8**, i8*** %5
%157 = getelementptr inbounds i8*, i8** %156, i64 4
%158 = load i8*, i8** %157
%159 = call i32 (i32*, i8*, ...) @fprintf(i32* %149, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.27, i64 0, i64 0), i8* %152, i8* %155, i8* %158)
%160 = load i32*, i32** %7
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%162 = load i32*, i32** %7
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.28, i64 0, i64 0))
%164 = load i32*, i32** %7
%165 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.29, i64 0, i64 0))
store i32 0, i32* %8
br label %166
166: ; preds = %195, %146
%167 = load i32, i32* %8
%168 = load i32, i32* %10
%169 = icmp slt i32 %167, %168
br i1 %169, label %170, label %198
170: ; preds = %166
%171 = load i32*, i32** %7
%172 = load i8**, i8*** %5
%173 = getelementptr inbounds i8*, i8** %172, i64 4
%174 = load i8*, i8** %173
%175 = load i32, i32* %8
%176 = load i8**, i8*** %5
%177 = getelementptr inbounds i8*, i8** %176, i64 4
%178 = load i8*, i8** %177
%179 = load i32, i32* %8
%180 = load i8**, i8*** %5
%181 = getelementptr inbounds i8*, i8** %180, i64 4
%182 = load i8*, i8** %181
%183 = load i32, i32* %8
%184 = call i32 (i32*, i8*, ...) @fprintf(i32* %171, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.30, i64 0, i64 0), i8* %174, i32 %175, i8* %178, i32 %179, i8* %182, i32 %183)
%185 = load i32*, i32** %7
%186 = call i32 (i32*, i8*, ...) @fprintf(i32* %185, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0))
%187 = load i32*, i32** %7
%188 = call i32 (i32*, i8*, ...) @fprintf(i32* %187, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.32, i64 0, i64 0))
%189 = load i32*, i32** %7
%190 = call i32 (i32*, i8*, ...) @fprintf(i32* %189, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.33, i64 0, i64 0))
%191 = load i32*, i32** %7
%192 = call i32 (i32*, i8*, ...) @fprintf(i32* %191, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.34, i64 0, i64 0))
%193 = load i32*, i32** %7
%194 = call i32 (i32*, i8*, ...) @fprintf(i32* %193, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.35, i64 0, i64 0))
br label %195
195: ; preds = %170
%196 = load i32, i32* %8
%197 = add nsw i32 %196, 1
store i32 %197, i32* %8
br label %166
198: ; preds = %166
%199 = load i32*, i32** %7
%200 = call i32 (i32*, i8*, ...) @fprintf(i32* %199, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.36, i64 0, i64 0))
%201 = load i32*, i32** %7
%202 = call i32 (i32*, i8*, ...) @fprintf(i32* %201, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.37, i64 0, i64 0))
%203 = load i32*, i32** %7
%204 = call i32 (i32*, i8*, ...) @fprintf(i32* %203, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0))
%205 = load i32*, i32** %7
%206 = call i32 @fclose(i32* %205)
store i32 0, i32* %3
br label %207
207: ; preds = %198, %44, %29, %14
%208 = load i32, i32* %3
ret i32 %208
}

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 %121
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 %121
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 %34
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)
br label %121
34: ; preds = %23
%35 = 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)
%36 = load i8*, i8** %1
%37 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8* %36)
%38 = 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)
%39 = 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)
%40 = 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)
%41 = 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)
%42 = 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)
%43 = 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)
%44 = 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)
%45 = 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)
%46 = tail call i32 @fputc(i32 10, i32* %26)
%47 = 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)
%48 = 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)
%49 = 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)
%50 = 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)
%51 = 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)
%52 = 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)
%53 = 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)
%54 = 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)
%55 = tail call i32 @fputc(i32 10, i32* %26)
%56 = call i64 @fread(i8* %4, i32 1, i32 1024, i32* %15)
%57 = trunc i64 %56 to i32
%58 = icmp sgt i32 %57, 0
br i1 %58, label %59, label %93
59: ; preds = %34
%60 = getelementptr inbounds i8*, i8** %1, i64 4
br label %61
61: ; preds = %59, %84
%62 = phi i32 [ %57, %59 ], [ %91, %84 ]
%63 = phi i32 [ 0, %59 ], [ %65, %84 ]
%64 = load i8*, i8** %60
%65 = add nuw nsw i32 %63, 1
%66 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.22, i64 0, i64 0), i8* %64, i32 %63, i32 %62)
%67 = add nsw i32 %62, -1
%68 = icmp ugt i32 %62, 1
br i1 %68, label %69, label %84
69: ; preds = %61
%70 = zext i32 %67 to i64
br label %71
71: ; preds = %69, %71
%72 = phi i64 [ 0, %69 ], [ %82, %71 ]
%73 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %72
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i32 %75)
%77 = trunc i64 %72 to i32
%78 = urem i32 %77, 10
%79 = icmp eq i32 %78, 9
%80 = select i1 %79, 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)
%81 = tail call i64 @fwrite(i8* %80, i64 2, i64 1, i32* %26)
%82 = add nuw nsw i64 %72, 1
%83 = icmp eq i64 %82, %70
br i1 %83, label %84, label %71
84: ; preds = %71, %61
%85 = sext i32 %67 to i64
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %85
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0), i32 %88)
%90 = call i64 @fread(i8* %4, i32 1, i32 1024, i32* %15)
%91 = trunc i64 %90 to i32
%92 = icmp sgt i32 %91, 0
br i1 %92, label %61, label %93
93: ; preds = %84, %34
%94 = phi i32 [ 0, %34 ], [ %65, %84 ]
%95 = tail call i32 @fclose(i32* %15)
%96 = getelementptr inbounds i8*, i8** %1, i64 3
%97 = load i8*, i8** %96
%98 = getelementptr inbounds i8*, i8** %1, i64 4
%99 = load i8*, i8** %98
%100 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.27, i64 0, i64 0), i8* %97, i8* %97, i8* %99)
%101 = 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)
%102 = 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)
%103 = 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)
%104 = icmp eq i32 %94, 0
br i1 %104, label %116, label %105
105: ; preds = %93, %105
%106 = phi i32 [ %114, %105 ], [ 0, %93 ]
%107 = load i8*, i8** %98
%108 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.30, i64 0, i64 0), i8* %107, i32 %106, i8* %107, i32 %106, i8* %107, i32 %106)
%109 = 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)
%110 = 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)
%111 = 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)
%112 = 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)
%113 = 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)
%114 = add nuw i32 %106, 1
%115 = icmp eq i32 %114, %94
br i1 %115, label %116, label %105
116: ; preds = %105, %93
%117 = 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)
%118 = 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)
%119 = 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)
%120 = tail call i32 @fclose(i32* %26)
br label %121
121: ; preds = %116, %28, %17, %6
%122 = phi i32 [ 1, %6 ], [ 0, %116 ], [ 2, %28 ], [ 2, %17 ]
ret i32 %122
}