#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 */
struct stat {
  scalar_t__ st_size;
};
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ print_common_head(int /*<<< orphan*/ *);
int /*<<< orphan*/ print_title(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int proc_cgi(char *, int /*<<< orphan*/ *, char *, char *, int);
char *proc_fake(char *, int *, char *);
int proc_file_type(char *, char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, ...);
int stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
char *strerror(int);
size_t strlen(char *);
scalar_t__ strncmp(char *, char *, size_t);
char *strstr(char *, char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ unlink(char *);
int /*<<< orphan*/ write_array(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               char *, int, char *, int);
int compile(char *infile, char *prefix, char *outdir, char *indexfile,
            char *pflag, char *optfile) {
  FILE *infp, *c_outfp, *c1_outfp, *h_outfp, *idxfp, *dbg_outfp;
  char outfile[255], basic_name[255];
  char *cp, *sl;
  char buf[1000];
  int len, nsection;
  int process_inline_c;
  char *proc_blk;
  int proc_blk_len;
  char *last, *next;
  char *inputf;
  int size;
  char cmdstr[255];
  struct stat st;
  int rc;
  int bad = 1;
  int do_cgi = 0;
  int total_send_len = 0, send_len = 0;
  printf("infile:%s\n", infile);
  if ((infp = fopen(infile, "r")) == NULL) {
    fprintf(stderr, "Can't open infile: %s\n", infile);
    return -1;
  }
  if (!strncmp(infile, prefix, strlen(prefix)))
    inputf = &infile[strlen(prefix)];
  else
    inputf = infile;
  process_inline_c = proc_file_type(inputf, basic_name);
  sprintf(outfile, "%s/web_%s.c", outdir, basic_name);
  if ((c_outfp = fopen(outfile, "w")) == NULL) {
    fprintf(stderr, "Can't open outfile: %s\n", outfile);
    return -1;
  }
  sprintf(outfile, "%s/web_%s_1.c", outdir, basic_name);
  if ((c1_outfp = fopen(outfile, "w")) == NULL) {
    fprintf(stderr, "Can't open c1_outfile list %s\n", outfile);
    return -1;
  }
  sprintf(outfile, "%s/web_%s.dbg", outdir, basic_name);
  if ((dbg_outfp = fopen(outfile, "w")) == NULL) {
    fprintf(stderr, "Can't open file: %s\n", outfile);
    return -1;
  }
  nsection = 0;
  proc_blk = 0;
  proc_blk_len = 0;
  last = 0;
  print_title(c_outfp);
  print_common_head(c_outfp);
  {
    if ((rc = stat(infile, &st))) {
      printf("stat err =%d, %s\n", rc, strerror(rc));
      goto bad;
    }
    if (st.st_size) {
      len = (int)st.st_size;
      printf("read file size=%d\n", len);
      if ((proc_blk = (char *)malloc(len + 1)) == 0) {
        printf("malloc err\n");
        goto bad;
      }
      if ((rc = fread(proc_blk, len, 1, infp)) == 1) {
        proc_blk_len = len;
        proc_blk[proc_blk_len] = '\0';
      } else {
        printf("fread errr\n");
        goto bad;
      }
    } else {
      printf("file size=0\n");
      goto bad;
    }
  }
  do_cgi = proc_cgi(outdir, c1_outfp, basic_name, proc_blk, proc_blk_len);
  printf("before proc_fake: proc_blk_len:%d\n", proc_blk_len);
  fprintf(c1_outfp, "\n\nint web_%s(struct connstruct *cn, char *datap)\n{\n",
          basic_name);
  fprintf(c1_outfp, "\n\tint send_len = 0;\n");
  fprintf(c1_outfp, "\n\tint total_send_len = 0;\n");
  if (process_inline_c) {
    int outbytes = 0;
    proc_blk = proc_fake(proc_blk, &proc_blk_len, optfile);
    if (proc_blk == NULL)
      goto bad;
    printf("after proc_fake: proc_blk_len:%d\n", proc_blk_len);
    last = proc_blk;
    while (*last && ((next = strstr(last, "<%")) != NULL)) {
      char *endp;
      int outside = 0;
      if (next > last) {
        write_array(h_outfp, dbg_outfp, last, (next - last), basic_name,
                    nsection);
        fprintf(c1_outfp, "\tsend_len = WEB_write_blk(cn, datap, %d, %d);\n\n",
                outbytes, (int)(next - last));
        fprintf(c1_outfp,
                "\tif(send_len != %d)\n \t\treturn send_len;\n "
                "\ttotal_send_len += send_len;\n\n",
                (int)(next - last));
        outbytes += (next - last);
        nsection++;
      }
      next += 2;
      if (*next == '+') {
        outside = 1;
        next++;
      }
      if ((endp = strstr(next, "%>")) != NULL) {
        if (outside) {
          if (*(endp - 1) != '+') {
            printf("ERROR: Unterminated inline C in %s", infile);
            goto done;
          }
          endp--;
        }
        *endp = '\0';
        last = endp + (outside ? 3 : 2);
        fwrite(next, endp - next, 1, (outside ? c_outfp : c1_outfp));
        fprintf((outside ? c_outfp : c1_outfp), "\n\n");
      } else {
        printf("ERROR: Unterminated inline C in %s", infile);
        goto done;
      }
    }
    if (last && *last) {
      write_array(h_outfp, dbg_outfp, last, strlen(last), basic_name, nsection);
      fprintf(c1_outfp, "\tsend_len = WEB_write_blk(cn, datap, %d, %d);\n\n",
              outbytes, (int)strlen(last));
      fprintf(c1_outfp,
              "\tif(send_len != %d)\n \t\treturn send_len;\n \ttotal_send_len "
              "+= send_len;\n\n",
              (int)strlen(last));
      nsection++;
    }
  } else {
    write_array(h_outfp, dbg_outfp, proc_blk, proc_blk_len, basic_name,
                nsection);
    fprintf(c1_outfp, "\tsend_len = WEB_write_blk(cn, datap, 0, %d);\n\n",
            proc_blk_len);
    fprintf(c1_outfp,
            "\tif(send_len != %d)\n \t\treturn send_len;\n \ttotal_send_len += "
            "send_len;\n\n",
            proc_blk_len);
    nsection++;
  }
  fprintf(c1_outfp, "\treturn total_send_len;\n");
  fprintf(c1_outfp, "\n}\n");
done:
  if (proc_blk) {
    free(proc_blk);
  }
  if (strncmp(infile, prefix, strlen(prefix)) == 0) {
    cp = &infile[strlen(prefix)];
  } else {
    cp = infile;
  }
  while ((sl = strchr(infile, '\\')) != NULL) {
    *sl = '/';
  }
  if (*cp == '/') {
    cp++;
  }
  bad = 0;
bad:
  if (c_outfp)
    fclose(c_outfp);
  if (c1_outfp)
    fclose(c1_outfp);
  if (infp)
    fclose(infp);
  if (dbg_outfp)
    fclose(dbg_outfp);
  if (!bad) {
    sprintf(outfile, "%s/web_%s.c", outdir, basic_name);
    if ((c_outfp = fopen(outfile, "a")) == NULL) {
      fprintf(stderr, "Can't open file: %s\n", outfile);
      return -1;
    }
    sprintf(outfile, "%s/web_%s_1.c", outdir, basic_name);
    if ((c1_outfp = fopen(outfile, "r")) == NULL) {
      fprintf(stderr, "Can't open file: %s\n", outfile);
      return -1;
    }
    while ((len = fread(buf, 1, sizeof(buf), c1_outfp)) > 0) {
      fwrite(buf, 1, len, c_outfp);
    }
    if (c_outfp)
      fclose(c_outfp);
    if (c1_outfp)
      fclose(c1_outfp);
    unlink(outfile);
  } else {
    sprintf(outfile, "%s/web_%s.c", outdir, basic_name);
    unlink(outfile);
    sprintf(outfile, "%s/web_%s.dbg", outdir, basic_name);
    unlink(outfile);
    sprintf(outfile, "%s/web_%s_1.c", outdir, basic_name);
    unlink(outfile);
  }
  sprintf(cmdstr, "dos2unix %s/web_%s.dbg", outdir, basic_name);
  system(cmdstr);
  sleep(2);
  sprintf(cmdstr, "dos2unix %s/web_%s.c", outdir, basic_name);
  system(cmdstr);
  sleep(2);
  if (!bad && indexfile) {
    if ((idxfp = fopen(indexfile, "a")) == NULL) {
      fprintf(stderr, "Can't open indexfile: %s\n", indexfile);
      return -1;
    }
    if (strstr(pflag, "WEBP_COMPRESS") != NULL) {
      sprintf(cmdstr,
              "../../../tools/bin/lzma e %s/web_%s.dbg %s/web_%s.bin -d16",
              outdir, basic_name, outdir, basic_name);
    } else {
      sprintf(cmdstr, "cp %s/web_%s.dbg %s/web_%s.bin", outdir, basic_name,
              outdir, basic_name);
    }
    system(cmdstr);
    sprintf(cmdstr, "cat %s/web_%s.bin >> webdata.bin", outdir, basic_name);
    system(cmdstr);
    sprintf(cmdstr, "%s/web_%s.bin", outdir, basic_name);
    if ((rc = stat(cmdstr, &st))) {
      printf("stat err =%d, %s\n", rc, strerror(rc));
      goto bad;
    }
    size = (int)st.st_size;
    if (do_cgi) {
      fprintf(idxfp, "{ \"%s\", web_%s, %d, %s, (void *)0, cgi_%s, 0},\n",
              inputf, basic_name, size, pflag, basic_name);
    } else {
      fprintf(idxfp, "{ \"%s\", web_%s, %d, %s, (void *)0, NULL, 0 },\n",
              inputf, basic_name, size, pflag);
    }
    fclose(idxfp);
  }
  return 0;
}


x86 assembly (clang, -O0):
<compile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x880,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movl   $0x1,-0x7c0(%rbp)
movl   $0x0,-0x7c4(%rbp)
movl   $0x0,-0x7c8(%rbp)
movl   $0x0,-0x7cc(%rbp)
mov    -0x10(%rbp),%rsi
lea    0x1d2a(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    -0x10(%rbp),%rdi
lea    0x1d23(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
jne    1323 <compile+0xa3>
mov    0x3cde(%rip),%rax
movslq (%rax),%rdi
mov    -0x10(%rbp),%rdx
lea    0x1cfd(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    214c <compile+0xecc>
mov    -0x10(%rbp),%rax
mov    %rax,-0x7f0(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x7e8(%rbp)
mov    -0x18(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x7f0(%rbp),%rdi
mov    -0x7e8(%rbp),%rsi
mov    %rax,%rdx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
jne    138f <compile+0x10f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x7f8(%rbp)
mov    -0x18(%rbp),%rdi
call   1080 <strlen@plt>
mov    %rax,%rcx
mov    -0x7f8(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x6a8(%rbp)
jmp    139a <compile+0x11a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x6a8(%rbp)
mov    -0x6a8(%rbp),%rdi
lea    -0x270(%rbp),%rsi
call   1150 <proc_file_type@plt>
mov    %eax,-0x67c(%rbp)
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x1eb6(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
lea    0x1c43(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    141f <compile+0x19f>
mov    0x3be5(%rip),%rax
movslq (%rax),%rdi
lea    -0x170(%rbp),%rdx
lea    0x1c1a(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    214c <compile+0xecc>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x1c06(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
lea    0x1bd7(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    148b <compile+0x20b>
mov    0x3b79(%rip),%rax
movslq (%rax),%rdi
lea    -0x170(%rbp),%rdx
lea    0x1bd4(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    214c <compile+0xecc>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x1dc7(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
lea    0x1b6b(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x68(%rbp)
cmp    $0x0,%rax
jne    14f7 <compile+0x277>
mov    0x3b0d(%rip),%rax
movslq (%rax),%rdi
lea    -0x170(%rbp),%rdx
lea    0x1b87(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    214c <compile+0xecc>
movl   $0x0,-0x678(%rbp)
movq   $0x0,-0x688(%rbp)
movl   $0x0,-0x68c(%rbp)
movq   $0x0,-0x698(%rbp)
mov    -0x48(%rbp),%rdi
call   10f0 <print_title@plt>
mov    -0x48(%rbp),%rdi
call   1170 <print_common_head@plt>
mov    -0x10(%rbp),%rdi
lea    -0x7b8(%rbp),%rsi
call   10d0 <stat@plt>
mov    %eax,-0x7bc(%rbp)
cmp    $0x0,%eax
je     1585 <compile+0x305>
mov    -0x7bc(%rbp),%eax
mov    %eax,-0x7fc(%rbp)
mov    -0x7bc(%rbp),%edi
call   1180 <strerror@plt>
mov    -0x7fc(%rbp),%esi
mov    %rax,%rdx
lea    0x1b07(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    1c90 <compile+0xa10>
cmpq   $0x0,-0x7b8(%rbp)
je     164b <compile+0x3cb>
mov    -0x7b8(%rbp),%rax
mov    %eax,-0x674(%rbp)
mov    -0x674(%rbp),%esi
lea    0x1ae5(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    -0x674(%rbp),%edi
add    $0x1,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x688(%rbp)
cmp    $0x0,%rax
jne    15e6 <compile+0x366>
lea    0x1acb(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    1c90 <compile+0xa10>
mov    -0x688(%rbp),%rdi
mov    -0x674(%rbp),%esi
mov    -0x40(%rbp),%rcx
mov    $0x1,%edx
call   1060 <fread@plt>
mov    %eax,-0x7bc(%rbp)
cmp    $0x1,%eax
jne    1633 <compile+0x3b3>
mov    -0x674(%rbp),%eax
mov    %eax,-0x68c(%rbp)
mov    -0x688(%rbp),%rax
movslq -0x68c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1646 <compile+0x3c6>
lea    0x1a77(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    1c90 <compile+0xa10>
jmp    165e <compile+0x3de>
lea    0x1a6b(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    1c90 <compile+0xa10>
mov    -0x20(%rbp),%rdi
mov    -0x50(%rbp),%rsi
lea    -0x270(%rbp),%rdx
mov    -0x688(%rbp),%rcx
mov    -0x68c(%rbp),%r8d
call   1110 <proc_cgi@plt>
mov    %eax,-0x7c4(%rbp)
mov    -0x68c(%rbp),%esi
lea    0x1a37(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    -0x50(%rbp),%rdi
lea    -0x270(%rbp),%rdx
lea    0x1a41(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x1a63(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x1a66(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
cmpl   $0x0,-0x67c(%rbp)
je     1b12 <compile+0x892>
movl   $0x0,-0x7d0(%rbp)
mov    -0x688(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    -0x68c(%rbp),%rsi
call   1130 <proc_fake@plt>
mov    %rax,-0x688(%rbp)
cmpq   $0x0,-0x688(%rbp)
jne    171f <compile+0x49f>
jmp    1c90 <compile+0xa10>
mov    -0x68c(%rbp),%esi
lea    0x1a25(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
mov    -0x688(%rbp),%rax
mov    %rax,-0x698(%rbp)
mov    -0x698(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x7fd(%rbp)
je     1783 <compile+0x503>
mov    -0x698(%rbp),%rdi
lea    0x1a09(%rip),%rsi
call   11a0 <strstr@plt>
mov    %rax,-0x6a0(%rbp)
cmp    $0x0,%rax
setne  %al
mov    %al,-0x7fd(%rbp)
mov    -0x7fd(%rbp),%al
test   $0x1,%al
jne    1796 <compile+0x516>
jmp    1a15 <compile+0x795>
movl   $0x0,-0x7dc(%rbp)
mov    -0x6a0(%rbp),%rax
cmp    -0x698(%rbp),%rax
jbe    1869 <compile+0x5e9>
mov    -0x58(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x698(%rbp),%rdx
mov    -0x6a0(%rbp),%rax
mov    -0x698(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%ecx
lea    -0x270(%rbp),%r8
mov    -0x678(%rbp),%r9d
call   1120 <write_array@plt>
mov    -0x50(%rbp),%rdi
mov    -0x7d0(%rbp),%edx
mov    -0x6a0(%rbp),%rax
mov    -0x698(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%ecx
lea    0x1969(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x6a0(%rbp),%rax
mov    -0x698(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
lea    0x1974(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x6a0(%rbp),%rcx
mov    -0x698(%rbp),%rax
sub    %rax,%rcx
movslq -0x7d0(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x7d0(%rbp)
mov    -0x678(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x678(%rbp)
mov    -0x6a0(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x6a0(%rbp)
mov    -0x6a0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    18aa <compile+0x62a>
movl   $0x1,-0x7dc(%rbp)
mov    -0x6a0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x6a0(%rbp)
mov    -0x6a0(%rbp),%rdi
lea    0x1936(%rip),%rsi
call   11a0 <strstr@plt>
mov    %rax,-0x7d8(%rbp)
cmp    $0x0,%rax
je     19f9 <compile+0x779>
cmpl   $0x0,-0x7dc(%rbp)
je     1918 <compile+0x698>
mov    -0x7d8(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x2b,%eax
je     1906 <compile+0x686>
mov    -0x10(%rbp),%rsi
lea    0x18f7(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    1b9d <compile+0x91d>
mov    -0x7d8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x7d8(%rbp)
mov    -0x7d8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x7d8(%rbp),%rax
mov    -0x7dc(%rbp),%esi
mov    $0x2,%ecx
mov    $0x3,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x698(%rbp)
mov    -0x6a0(%rbp),%rax
mov    %rax,-0x810(%rbp)
mov    -0x7d8(%rbp),%rax
mov    -0x6a0(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x804(%rbp)
cmpl   $0x0,-0x7dc(%rbp)
je     198e <compile+0x70e>
mov    -0x48(%rbp),%rax
mov    %rax,-0x818(%rbp)
jmp    1999 <compile+0x719>
mov    -0x50(%rbp),%rax
mov    %rax,-0x818(%rbp)
mov    -0x804(%rbp),%esi
mov    -0x810(%rbp),%rdi
mov    -0x818(%rbp),%rcx
mov    $0x1,%edx
call   1160 <fwrite@plt>
cmpl   $0x0,-0x7dc(%rbp)
je     19d4 <compile+0x754>
mov    -0x48(%rbp),%rax
mov    %rax,-0x820(%rbp)
jmp    19df <compile+0x75f>
mov    -0x50(%rbp),%rax
mov    %rax,-0x820(%rbp)
mov    -0x820(%rbp),%rdi
lea    0x1853(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1a10 <compile+0x790>
mov    -0x10(%rbp),%rsi
lea    0x17ed(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    1b9d <compile+0x91d>
jmp    1741 <compile+0x4c1>
cmpq   $0x0,-0x698(%rbp)
je     1b0d <compile+0x88d>
mov    -0x698(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1b0d <compile+0x88d>
mov    -0x58(%rbp),%rax
mov    %rax,-0x850(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x848(%rbp)
mov    -0x698(%rbp),%rax
mov    %rax,-0x840(%rbp)
mov    -0x698(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x850(%rbp),%rdi
mov    -0x848(%rbp),%rsi
mov    -0x840(%rbp),%rdx
mov    %eax,%ecx
lea    -0x270(%rbp),%r8
mov    -0x678(%rbp),%r9d
call   1120 <write_array@plt>
mov    -0x50(%rbp),%rax
mov    %rax,-0x838(%rbp)
mov    -0x7d0(%rbp),%eax
mov    %eax,-0x82c(%rbp)
mov    -0x698(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x838(%rbp),%rdi
mov    -0x82c(%rbp),%edx
mov    %eax,%ecx
lea    0x16ad(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x50(%rbp),%rax
mov    %rax,-0x828(%rbp)
mov    -0x698(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x828(%rbp),%rdi
mov    %eax,%edx
lea    0x16af(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x678(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x678(%rbp)
jmp    1b79 <compile+0x8f9>
mov    -0x58(%rbp),%rdi
mov    -0x68(%rbp),%rsi
mov    -0x688(%rbp),%rdx
mov    -0x68c(%rbp),%ecx
lea    -0x270(%rbp),%r8
mov    -0x678(%rbp),%r9d
call   1120 <write_array@plt>
mov    -0x50(%rbp),%rdi
mov    -0x68c(%rbp),%edx
lea    0x16c9(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x50(%rbp),%rdi
mov    -0x68c(%rbp),%edx
lea    0x1643(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x678(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x678(%rbp)
mov    -0x50(%rbp),%rdi
lea    0x16bf(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x50(%rbp),%rdi
lea    0x16c6(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
cmpq   $0x0,-0x688(%rbp)
je     1bb7 <compile+0x937>
mov    -0x688(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x860(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x858(%rbp)
mov    -0x18(%rbp),%rdi
call   1080 <strlen@plt>
mov    -0x860(%rbp),%rdi
mov    -0x858(%rbp),%rsi
mov    %rax,%rdx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
jne    1c23 <compile+0x9a3>
mov    -0x10(%rbp),%rax
mov    %rax,-0x868(%rbp)
mov    -0x18(%rbp),%rdi
call   1080 <strlen@plt>
mov    %rax,%rcx
mov    -0x868(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x278(%rbp)
jmp    1c2e <compile+0x9ae>
mov    -0x10(%rbp),%rax
mov    %rax,-0x278(%rbp)
jmp    1c33 <compile+0x9b3>
mov    -0x10(%rbp),%rdi
mov    $0x5c,%esi
call   10a0 <strchr@plt>
mov    %rax,-0x280(%rbp)
cmp    $0x0,%rax
je     1c61 <compile+0x9e1>
mov    -0x280(%rbp),%rax
movb   $0x2f,(%rax)
jmp    1c33 <compile+0x9b3>
mov    -0x278(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1c86 <compile+0xa06>
mov    -0x278(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x278(%rbp)
movl   $0x0,-0x7c0(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     1ca4 <compile+0xa24>
mov    -0x48(%rbp),%rdi
call   1070 <fclose@plt>
cmpq   $0x0,-0x50(%rbp)
je     1cb8 <compile+0xa38>
mov    -0x50(%rbp),%rdi
call   1070 <fclose@plt>
cmpq   $0x0,-0x40(%rbp)
je     1ccc <compile+0xa4c>
mov    -0x40(%rbp),%rdi
call   1070 <fclose@plt>
cmpq   $0x0,-0x68(%rbp)
je     1ce0 <compile+0xa60>
mov    -0x68(%rbp),%rdi
call   1070 <fclose@plt>
cmpl   $0x0,-0x7c0(%rbp)
jne    1e4c <compile+0xbcc>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x157c(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
lea    0x1545(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    1d59 <compile+0xad9>
mov    0x32ab(%rip),%rax
movslq (%rax),%rdi
lea    -0x170(%rbp),%rdx
lea    0x1325(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    214c <compile+0xecc>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x12cc(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
lea    0x1284(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
jne    1dc5 <compile+0xb45>
mov    0x323f(%rip),%rax
movslq (%rax),%rdi
lea    -0x170(%rbp),%rdx
lea    0x12b9(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    214c <compile+0xecc>
jmp    1dca <compile+0xb4a>
lea    -0x670(%rbp),%rdi
mov    -0x50(%rbp),%rcx
mov    $0x1,%esi
mov    $0x3e8,%edx
call   1060 <fread@plt>
mov    %eax,-0x674(%rbp)
cmp    $0x0,%eax
jle    1e13 <compile+0xb93>
lea    -0x670(%rbp),%rdi
mov    -0x674(%rbp),%edx
mov    -0x48(%rbp),%rcx
mov    $0x1,%esi
call   1160 <fwrite@plt>
jmp    1dca <compile+0xb4a>
cmpq   $0x0,-0x48(%rbp)
je     1e27 <compile+0xba7>
mov    -0x48(%rbp),%rdi
call   1070 <fclose@plt>
cmpq   $0x0,-0x50(%rbp)
je     1e3b <compile+0xbbb>
mov    -0x50(%rbp),%rdi
call   1070 <fclose@plt>
lea    -0x170(%rbp),%rdi
call   1040 <unlink@plt>
jmp    1ed0 <compile+0xc50>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x141d(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
call   1040 <unlink@plt>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x13da(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
call   1040 <unlink@plt>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x1181(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x170(%rbp),%rdi
call   1040 <unlink@plt>
lea    -0x7b0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x1379(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x7b0(%rbp),%rdi
call   1090 <system@plt>
mov    $0x2,%edi
call   1190 <sleep@plt>
lea    -0x7b0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x135a(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x7b0(%rbp),%rdi
call   1090 <system@plt>
mov    $0x2,%edi
call   1190 <sleep@plt>
cmpl   $0x0,-0x7c0(%rbp)
jne    2145 <compile+0xec5>
cmpq   $0x0,-0x28(%rbp)
je     2145 <compile+0xec5>
mov    -0x28(%rbp),%rdi
lea    0x1301(%rip),%rsi
call   1100 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
jne    1f9a <compile+0xd1a>
mov    0x3067(%rip),%rax
movslq (%rax),%rdi
mov    -0x28(%rbp),%rdx
lea    0x1307(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    214c <compile+0xecc>
mov    -0x30(%rbp),%rdi
lea    0x1303(%rip),%rsi
call   11a0 <strstr@plt>
cmp    $0x0,%rax
je     1fe4 <compile+0xd64>
lea    -0x7b0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    -0x270(%rbp),%r9
lea    0x12de(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
jmp    200f <compile+0xd8f>
lea    -0x7b0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    -0x270(%rbp),%r9
lea    0x12e9(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x7b0(%rbp),%rdi
call   1090 <system@plt>
lea    -0x7b0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x12dc(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x7b0(%rbp),%rdi
call   1090 <system@plt>
lea    -0x7b0(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x270(%rbp),%rcx
lea    0x12a2(%rip),%rsi
mov    $0x0,%al
call   1140 <sprintf@plt>
lea    -0x7b0(%rbp),%rdi
lea    -0x7b8(%rbp),%rsi
call   10d0 <stat@plt>
mov    %eax,-0x7bc(%rbp)
cmp    $0x0,%eax
je     20bc <compile+0xe3c>
mov    -0x7bc(%rbp),%eax
mov    %eax,-0x86c(%rbp)
mov    -0x7bc(%rbp),%edi
call   1180 <strerror@plt>
mov    -0x86c(%rbp),%esi
mov    %rax,%rdx
lea    0xfd0(%rip),%rdi
mov    $0x0,%al
call   10b0 <printf@plt>
jmp    1c90 <compile+0xa10>
mov    -0x7b8(%rbp),%rax
mov    %eax,-0x6ac(%rbp)
cmpl   $0x0,-0x7c4(%rbp)
je     2111 <compile+0xe91>
mov    -0x60(%rbp),%rdi
mov    -0x6a8(%rbp),%rdx
lea    -0x270(%rbp),%rcx
mov    -0x6ac(%rbp),%r8d
mov    -0x30(%rbp),%r9
lea    -0x270(%rbp),%rax
lea    0x1230(%rip),%rsi
mov    %rax,(%rsp)
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    213c <compile+0xebc>
mov    -0x60(%rbp),%rdi
mov    -0x6a8(%rbp),%rdx
lea    -0x270(%rbp),%rcx
mov    -0x6ac(%rbp),%r8d
mov    -0x30(%rbp),%r9
lea    0x122c(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
call   1070 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x880,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compile>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x758,%rsp
mov    %r9,%rbx
mov    %r8,0x40(%rsp)
mov    %rcx,0x68(%rsp)
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%r14
lea    0xd42(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
lea    0x10ba(%rip),%rsi
mov    %r14,%rdi
call   1110 <fopen@plt>
mov    %rax,0x58(%rsp)
test   %rax,%rax
je     1460 <compile+0x1d0>
mov    %rbx,0x30(%rsp)
mov    %r13,%rdi
call   1090 <strlen@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rax,%rdx
call   1050 <strncmp@plt>
mov    %r14,%rbx
test   %rax,%rax
jne    1316 <compile+0x86>
mov    %r13,%rdi
call   1090 <strlen@plt>
mov    %rax,%rbx
add    %r14,%rbx
lea    0x170(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1160 <proc_file_type@plt>
mov    %eax,0x8(%rsp)
lea    0xf27(%rip),%rsi
lea    0x70(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
lea    0xcd2(%rip),%rsi
mov    %rbp,%rdi
call   1110 <fopen@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
je     1479 <compile+0x1e9>
mov    %rbx,0x50(%rsp)
lea    0xcca(%rip),%rsi
lea    0x70(%rsp),%rbx
lea    0x170(%rsp),%rcx
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1150 <sprintf@plt>
lea    0xc8f(%rip),%rsi
mov    %rbx,%rdi
call   1110 <fopen@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     148f <compile+0x1ff>
lea    0xe94(%rip),%rsi
lea    0x70(%rsp),%rbx
lea    0x170(%rsp),%rcx
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1150 <sprintf@plt>
lea    0xc51(%rip),%rsi
mov    %rbx,%rdi
call   1110 <fopen@plt>
mov    %rax,0x38(%rsp)
test   %rax,%rax
je     1b14 <compile+0x884>
mov    %r15,0x28(%rsp)
movl   $0x0,0xc(%rsp)
mov    0x18(%rsp),%rbx
mov    %rbx,%rdi
call   1100 <print_title@plt>
mov    %rbx,%rdi
call   1180 <print_common_head@plt>
lea    0x48(%rsp),%rsi
mov    %r14,%rdi
call   10e0 <stat@plt>
test   %eax,%eax
je     14a5 <compile+0x215>
mov    %eax,%r15d
mov    %eax,%edi
call   1190 <strerror@plt>
lea    0xc4f(%rip),%rdi
movl   $0x0,0x8(%rsp)
mov    %r15d,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   10c0 <printf@plt>
movl   $0x0,0x24(%rsp)
mov    0x28(%rsp),%r13
mov    0x18(%rsp),%rbx
mov    0x10(%rsp),%rbp
jmp    1839 <compile+0x5a9>
mov    0x2b79(%rip),%rax
movslq (%rax),%rdi
lea    0xb9a(%rip),%rsi
mov    %r14,%rdx
jmp    1b2a <compile+0x89a>
mov    0x2b60(%rip),%rax
movslq (%rax),%rdi
lea    0xb9a(%rip),%rsi
jmp    1b25 <compile+0x895>
mov    0x2b4a(%rip),%rax
movslq (%rax),%rdi
lea    0xbaa(%rip),%rsi
jmp    1b25 <compile+0x895>
mov    0x48(%rsp),%rbx
test   %rbx,%rbx
je     15e2 <compile+0x352>
mov    %r13,0x60(%rsp)
lea    0xbd1(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   10c0 <printf@plt>
lea    0x1(%rbx),%edi
call   10f0 <malloc@plt>
test   %rax,%rax
mov    0x28(%rsp),%r13
mov    0x10(%rsp),%rbp
je     15fb <compile+0x36b>
mov    %rax,%r15
mov    %rax,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
mov    0x58(%rsp),%rcx
call   1070 <fread@plt>
cmp    $0x1,%eax
jne    1744 <compile+0x4b4>
mov    %ebx,0xc(%rsp)
movslq %ebx,%rax
movb   $0x0,(%r15,%rax,1)
mov    0xc(%rsp),%r8d
lea    0x170(%rsp),%rbx
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1120 <proc_cgi@plt>
mov    %eax,0x24(%rsp)
mov    0xc(%rsp),%esi
lea    0xb67(%rip),%rdi
xor    %eax,%eax
call   10c0 <printf@plt>
lea    0xb7c(%rip),%rsi
mov    %rbp,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   10d0 <fprintf@plt>
lea    0xb9c(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1170 <fwrite@plt>
lea    0xb98(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1170 <fwrite@plt>
cmpl   $0x0,0x8(%rsp)
je     1765 <compile+0x4d5>
lea    0xc(%rsp),%rsi
mov    %r15,%rdi
mov    0x30(%rsp),%rdx
call   1140 <proc_fake@plt>
test   %rax,%rax
je     160f <compile+0x37f>
mov    %rax,%r15
mov    0xc(%rsp),%esi
lea    0xb71(%rip),%rdi
xor    %eax,%eax
call   10c0 <printf@plt>
cmpb   $0x0,(%r15)
je     17ab <compile+0x51b>
xor    %r13d,%r13d
mov    %r15,%r12
movl   $0x0,0x8(%rsp)
mov    %r15,0x30(%rsp)
jmp    1669 <compile+0x3d9>
lea    0xd80(%rip),%rdi
call   1060 <puts@plt>
movl   $0x0,0x8(%rsp)
jmp    1444 <compile+0x1b4>
movl   $0x0,0x24(%rsp)
lea    0xd76(%rip),%rdi
call   1060 <puts@plt>
movl   $0x0,0x8(%rsp)
jmp    1834 <compile+0x5a4>
mov    0x10(%rsp),%rbp
movb   $0x0,(%rbx)
lea    (%rbx,%rax,1),%r12
mov    %ebx,%esi
sub    %r15d,%esi
mov    %r15,%rdi
mov    $0x1,%edx
mov    %rbp,%rcx
mov    %rax,%r15
call   1170 <fwrite@plt>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xbc8(%rip),%rdi
mov    %rbp,%rcx
call   1170 <fwrite@plt>
cmpb   $0x0,(%rbx,%r15,1)
mov    0x30(%rsp),%r15
je     1bd6 <compile+0x946>
mov    %r15,%rbx
mov    %r12,%rdi
lea    0xad6(%rip),%rsi
call   11b0 <strstr@plt>
test   %rax,%rax
je     1be5 <compile+0x955>
mov    %rax,%r15
cmp    %r12,%rax
jbe    16e8 <compile+0x458>
mov    %r15d,%ebx
sub    %r12d,%ebx
mov    0x38(%rsp),%rsi
mov    %r12,%rdx
mov    %ebx,%ecx
lea    0x170(%rsp),%r8
mov    0x8(%rsp),%ebp
mov    %ebp,%r9d
call   1130 <write_array@plt>
mov    0x10(%rsp),%r12
mov    %r12,%rdi
lea    0xa90(%rip),%rsi
mov    %r13d,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   10d0 <fprintf@plt>
mov    %r12,%rdi
lea    0xaaa(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   10d0 <fprintf@plt>
add    %ebx,%r13d
add    $0x1,%ebp
mov    %ebp,0x8(%rsp)
lea    0x2(%r15),%rax
movzbl 0x2(%r15),%ebp
add    $0x3,%r15
cmp    $0x2b,%bpl
cmovne %rax,%r15
mov    %r15,%rdi
lea    0xac0(%rip),%rsi
call   11b0 <strstr@plt>
test   %rax,%rax
je     1bb1 <compile+0x921>
mov    %rax,%rbx
mov    $0x2,%eax
cmp    $0x2b,%bpl
jne    161c <compile+0x38c>
cmpb   $0x2b,-0x1(%rbx)
jne    1bb1 <compile+0x921>
add    $0xffffffffffffffff,%rbx
mov    $0x3,%eax
mov    0x18(%rsp),%rbp
jmp    1621 <compile+0x391>
lea    0xc2a(%rip),%rdi
call   1060 <puts@plt>
movl   $0x0,0x8(%rsp)
movl   $0x0,0x24(%rsp)
jmp    1834 <compile+0x5a4>
mov    0xc(%rsp),%ecx
lea    0x170(%rsp),%r8
mov    0x38(%rsp),%rsi
mov    %r15,%rdx
xor    %r9d,%r9d
call   1130 <write_array@plt>
mov    0xc(%rsp),%edx
lea    0xa61(%rip),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   10d0 <fprintf@plt>
mov    0xc(%rsp),%edx
lea    0x9de(%rip),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   10d0 <fprintf@plt>
lea    0xa6a(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1170 <fwrite@plt>
lea    0xa6a(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1170 <fwrite@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rbx
mov    %rbx,%rdi
call   1090 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1050 <strncmp@plt>
mov    %r14,%rdi
mov    $0x5c,%esi
call   10b0 <strchr@plt>
mov    $0x1,%cl
mov    %ecx,0x8(%rsp)
test   %rax,%rax
je     1834 <compile+0x5a4>
mov    0x18(%rsp),%rbx
movb   $0x2f,(%rax)
mov    %r14,%rdi
mov    $0x5c,%esi
call   10b0 <strchr@plt>
test   %rax,%rax
jne    181d <compile+0x58d>
jmp    1839 <compile+0x5a9>
mov    0x18(%rsp),%rbx
lea    0x170(%rsp),%r15
lea    0x370(%rsp),%r14
test   %rbx,%rbx
je     1858 <compile+0x5c8>
xchg   %ax,%ax
mov    %rbx,%rdi
call   1080 <fclose@plt>
test   %rbp,%rbp
je     1865 <compile+0x5d5>
mov    %rbp,%rdi
call   1080 <fclose@plt>
mov    0x58(%rsp),%rdi
call   1080 <fclose@plt>
mov    0x38(%rsp),%rdi
call   1080 <fclose@plt>
lea    0x70(%rsp),%r12
mov    %r12,%rdi
lea    0x9d3(%rip),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
testb  $0x1,0x8(%rsp)
je     1920 <compile+0x690>
mov    %r12,%rdi
lea    0x98f(%rip),%rsi
call   1110 <fopen@plt>
test   %rax,%rax
je     1b14 <compile+0x884>
mov    %rax,%rbx
mov    %r12,%rdi
lea    0x777(%rip),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r12,%rdi
lea    0xaad(%rip),%rsi
call   1110 <fopen@plt>
test   %rax,%rax
je     1b14 <compile+0x884>
mov    %rax,%rbp
nopl   (%rax)
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x3e8,%edx
mov    %rbp,%rcx
call   1070 <fread@plt>
test   %eax,%eax
jle    1970 <compile+0x6e0>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %rbx,%rcx
call   1170 <fwrite@plt>
jmp    18f0 <compile+0x660>
nopl   (%rax)
mov    %rbp,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r12,%rdi
call   1040 <unlink@plt>
mov    %r12,%rdi
lea    0x908(%rip),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r12,%rdi
call   1040 <unlink@plt>
mov    %r12,%rdi
lea    0x6e1(%rip),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r13,%rbx
mov    %r15,%rbp
jmp    1995 <compile+0x705>
mov    %rbx,0x18(%rsp)
mov    %rbx,%rdi
call   1080 <fclose@plt>
mov    %rbp,0x10(%rsp)
mov    %rbp,%rdi
call   1080 <fclose@plt>
mov    %r13,%rbx
mov    %r15,%rbp
lea    0x70(%rsp),%r12
mov    0x68(%rsp),%r13
test   %r13,%r13
sete   0x30(%rsp)
mov    %r12,%rdi
call   1040 <unlink@plt>
lea    0x270(%rsp),%r12
mov    %r12,%rdi
lea    0x87f(%rip),%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r12,%rdi
call   10a0 <system@plt>
mov    $0x2,%edi
call   11a0 <sleep@plt>
mov    %r12,%rdi
lea    0x86d(%rip),%rsi
mov    %rbx,%rdx
mov    %rbp,%r15
mov    %rbp,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r12,%rdi
call   10a0 <system@plt>
mov    $0x2,%edi
call   11a0 <sleep@plt>
mov    0x8(%rsp),%eax
not    %al
or     0x30(%rsp),%al
test   $0x1,%al
jne    1bad <compile+0x91d>
mov    %r13,%rdi
lea    0x816(%rip),%rsi
call   1110 <fopen@plt>
test   %rax,%rax
je     1b48 <compile+0x8b8>
mov    %rax,%r12
mov    0x40(%rsp),%rdi
lea    0x841(%rip),%rsi
call   11b0 <strstr@plt>
test   %rax,%rax
lea    0x840(%rip),%rsi
lea    0x874(%rip),%rax
cmove  %rax,%rsi
lea    0x270(%rsp),%r13
mov    %r13,%rdi
mov    0x28(%rsp),%rbp
mov    %rbp,%rdx
mov    %r15,%rbx
mov    %r15,%rcx
mov    %rbp,%r8
mov    %r15,%r9
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r13,%rdi
call   10a0 <system@plt>
mov    %r13,%rdi
lea    0x857(%rip),%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r13,%rdi
call   10a0 <system@plt>
mov    %r13,%rdi
lea    0x82a(%rip),%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1150 <sprintf@plt>
mov    %r13,%rdi
lea    0x48(%rsp),%rsi
call   10e0 <stat@plt>
test   %eax,%eax
je     1b5e <compile+0x8ce>
mov    %eax,%r13d
mov    %eax,%edi
call   1190 <strerror@plt>
lea    0x59a(%rip),%rdi
mov    %r13d,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   10c0 <printf@plt>
mov    $0x1,%al
mov    %eax,0x8(%rsp)
mov    0x28(%rsp),%r13
mov    0x18(%rsp),%rbx
mov    0x10(%rsp),%rbp
test   %rbx,%rbx
jne    1850 <compile+0x5c0>
jmp    1858 <compile+0x5c8>
mov    0x24c5(%rip),%rax
movslq (%rax),%rdi
lea    0x544(%rip),%rsi
lea    0x70(%rsp),%rdx
xor    %eax,%eax
call   10d0 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x758,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2491(%rip),%rax
movslq (%rax),%rdi
lea    0x70e(%rip),%rsi
mov    %r13,%rdx
jmp    1b2a <compile+0x89a>
mov    0x48(%rsp),%r8d
cmpl   $0x0,0x24(%rsp)
je     1b82 <compile+0x8f2>
mov    %r15,(%rsp)
lea    0x795(%rip),%rsi
mov    %r12,%rdi
mov    0x50(%rsp),%rdx
mov    %r15,%rcx
jmp    1b99 <compile+0x909>
lea    0x7b1(%rip),%rsi
lea    0x170(%rsp),%rcx
mov    %r12,%rdi
mov    0x50(%rsp),%rdx
mov    0x40(%rsp),%r9
xor    %eax,%eax
call   10d0 <fprintf@plt>
mov    %r12,%rdi
call   1080 <fclose@plt>
xor    %eax,%eax
jmp    1b36 <compile+0x8a6>
lea    0x612(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   10c0 <printf@plt>
mov    0x28(%rsp),%r13
mov    0x30(%rsp),%r15
mov    0x10(%rsp),%rbp
jmp    17dd <compile+0x54d>
mov    0x28(%rsp),%r13
mov    0x10(%rsp),%rbp
jmp    17ab <compile+0x51b>
mov    %r12,%rdi
call   1090 <strlen@plt>
lea    0x170(%rsp),%r8
mov    0x38(%rsp),%rsi
mov    %r12,%rdx
mov    %eax,%ecx
mov    0x8(%rsp),%r9d
call   1130 <write_array@plt>
mov    %r12,%rdi
call   1090 <strlen@plt>
lea    0x537(%rip),%rsi
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r13d,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   10d0 <fprintf@plt>
mov    %r12,%rdi
call   1090 <strlen@plt>
mov    %rax,%rdx
mov    0x28(%rsp),%r13
mov    %rbx,%r15
jmp    179a <compile+0x50a>

LLVM IR (-O0):
%struct.stat = type { i64 }
@.str = [11 x i8] c"infile:%s\0A\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [23 x i8] c"Can't open infile: %s\0A\00"
@.str.3 = [12 x i8] c"%s/web_%s.c\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [24 x i8] c"Can't open outfile: %s\0A\00"
@.str.6 = [14 x i8] c"%s/web_%s_1.c\00"
@.str.7 = [31 x i8] c"Can't open c1_outfile list %s\0A\00"
@.str.8 = [14 x i8] c"%s/web_%s.dbg\00"
@.str.9 = [21 x i8] c"Can't open file: %s\0A\00"
@.str.10 = [18 x i8] c"stat err =%d, %s\0A\00"
@.str.11 = [19 x i8] c"read file size=%d\0A\00"
@.str.12 = [12 x i8] c"malloc err\0A\00"
@.str.13 = [12 x i8] c"fread errr\0A\00"
@.str.14 = [13 x i8] c"file size=0\0A\00"
@.str.15 = [35 x i8] c"before proc_fake: proc_blk_len:%d\0A\00"
@.str.16 = [52 x i8] c"\0A\0Aint web_%s(struct connstruct *cn, char *datap)\0A{\0A\00"
@.str.17 = [21 x i8] c"\0A\09int send_len = 0;\0A\00"
@.str.18 = [27 x i8] c"\0A\09int total_send_len = 0;\0A\00"
@.str.19 = [34 x i8] c"after proc_fake: proc_blk_len:%d\0A\00"
@.str.20 = [3 x i8] c"<%\00"
@.str.21 = [48 x i8] c"\09send_len = WEB_write_blk(cn, datap, %d, %d);\0A\0A\00"
@.str.22 = [72 x i8] c"\09if(send_len != %d)\0A \09\09return send_len;\0A \09total_send_len += send_len;\0A\0A\00"
@.str.23 = [3 x i8] c"%>\00"
@.str.24 = [35 x i8] c"ERROR: Unterminated inline C in %s\00"
@.str.25 = [3 x i8] c"\0A\0A\00"
@.str.26 = [47 x i8] c"\09send_len = WEB_write_blk(cn, datap, 0, %d);\0A\0A\00"
@.str.27 = [25 x i8] c"\09return total_send_len;\0A\00"
@.str.28 = [4 x i8] c"\0A}\0A\00"
@.str.29 = [2 x i8] c"a\00"
@.str.30 = [23 x i8] c"dos2unix %s/web_%s.dbg\00"
@.str.31 = [21 x i8] c"dos2unix %s/web_%s.c\00"
@.str.32 = [26 x i8] c"Can't open indexfile: %s\0A\00"
@.str.33 = [14 x i8] c"WEBP_COMPRESS\00"
@.str.34 = [59 x i8] c"../../../tools/bin/lzma e %s/web_%s.dbg %s/web_%s.bin -d16\00"
@.str.35 = [31 x i8] c"cp %s/web_%s.dbg %s/web_%s.bin\00"
@.str.36 = [33 x i8] c"cat %s/web_%s.bin >> webdata.bin\00"
@.str.37 = [14 x i8] c"%s/web_%s.bin\00"
@.str.38 = [48 x i8] c"{ \22%s\22, web_%s, %d, %s, (void *)0, cgi_%s, 0},\0A\00"
@.str.39 = [47 x i8] c"{ \22%s\22, web_%s, %d, %s, (void *)0, NULL, 0 },\0A\00"
define i32 @compile(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca [255 x i8]
%21 = alloca [255 x i8]
%22 = alloca i8*
%23 = alloca i8*
%24 = alloca [1000 x i8]
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i8*
%29 = alloca i32
%30 = alloca i8*
%31 = alloca i8*
%32 = alloca i8*
%33 = alloca i32
%34 = alloca [255 x i8]
%35 = alloca %struct.stat
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i8*
%43 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i32 1, i32* %37
store i32 0, i32* %38
store i32 0, i32* %39
store i32 0, i32* %40
%44 = load i8*, i8** %8
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %44)
%46 = load i8*, i8** %8
%47 = call i32* @fopen(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %47, i32** %14
%48 = icmp eq i32* %47, null
br i1 %48, label %49, label %55
49: ; preds = %6
%50 = load i32, i32* @stderr
%51 = sext i32 %50 to i64
%52 = inttoptr i64 %51 to i32*
%53 = load i8*, i8** %8
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %53)
store i32 -1, i32* %7
br label %596
55: ; preds = %6
%56 = load i8*, i8** %8
%57 = load i8*, i8** %9
%58 = load i8*, i8** %9
%59 = call i64 @strlen(i8* %58)
%60 = call i64 @strncmp(i8* %56, i8* %57, i64 %59)
%61 = icmp ne i64 %60, 0
br i1 %61, label %67, label %62
62: ; preds = %55
%63 = load i8*, i8** %8
%64 = load i8*, i8** %9
%65 = call i64 @strlen(i8* %64)
%66 = getelementptr inbounds i8, i8* %63, i64 %65
store i8* %66, i8** %32
br label %69
67: ; preds = %55
%68 = load i8*, i8** %8
store i8* %68, i8** %32
br label %69
69: ; preds = %67, %62
%70 = load i8*, i8** %32
%71 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%72 = call i32 @proc_file_type(i8* %70, i8* %71)
store i32 %72, i32* %27
%73 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%74 = load i8*, i8** %10
%75 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%76 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %73, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %74, i8* %75)
%77 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%78 = call i32* @fopen(i8* %77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %78, i32** %15
%79 = icmp eq i32* %78, null
br i1 %79, label %80, label %86
80: ; preds = %69
%81 = load i32, i32* @stderr
%82 = sext i32 %81 to i64
%83 = inttoptr i64 %82 to i32*
%84 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %84)
store i32 -1, i32* %7
br label %596
86: ; preds = %69
%87 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%88 = load i8*, i8** %10
%89 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%90 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %87, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %88, i8* %89)
%91 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%92 = call i32* @fopen(i8* %91, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %92, i32** %16
%93 = icmp eq i32* %92, null
br i1 %93, label %94, label %100
94: ; preds = %86
%95 = load i32, i32* @stderr
%96 = sext i32 %95 to i64
%97 = inttoptr i64 %96 to i32*
%98 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %97, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* %98)
store i32 -1, i32* %7
br label %596
100: ; preds = %86
%101 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%102 = load i8*, i8** %10
%103 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%104 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %101, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %102, i8* %103)
%105 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%106 = call i32* @fopen(i8* %105, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %106, i32** %19
%107 = icmp eq i32* %106, null
br i1 %107, label %108, label %114
108: ; preds = %100
%109 = load i32, i32* @stderr
%110 = sext i32 %109 to i64
%111 = inttoptr i64 %110 to i32*
%112 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%113 = call i32 (i32*, i8*, ...) @fprintf(i32* %111, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %112)
store i32 -1, i32* %7
br label %596
114: ; preds = %100
store i32 0, i32* %26
store i8* null, i8** %28
store i32 0, i32* %29
store i8* null, i8** %30
%115 = load i32*, i32** %15
%116 = call i32 @print_title(i32* %115)
%117 = load i32*, i32** %15
%118 = call i32 @print_common_head(i32* %117)
%119 = load i8*, i8** %8
%120 = call i32 @stat(i8* %119, %struct.stat* %35)
store i32 %120, i32* %36
%121 = icmp ne i32 %120, 0
br i1 %121, label %122, label %127
122: ; preds = %114
%123 = load i32, i32* %36
%124 = load i32, i32* %36
%125 = call i8* @strerror(i32 %124)
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %123, i8* %125)
br label %402
127: ; preds = %114
%128 = getelementptr inbounds %struct.stat, %struct.stat* %35, i32 0, i32 0
%129 = load i64, i64* %128
%130 = icmp ne i64 %129, 0
br i1 %130, label %131, label %159
131: ; preds = %127
%132 = getelementptr inbounds %struct.stat, %struct.stat* %35, i32 0, i32 0
%133 = load i64, i64* %132
%134 = trunc i64 %133 to i32
store i32 %134, i32* %25
%135 = load i32, i32* %25
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %135)
%137 = load i32, i32* %25
%138 = add nsw i32 %137, 1
%139 = call i64 @malloc(i32 %138)
%140 = inttoptr i64 %139 to i8*
store i8* %140, i8** %28
%141 = icmp eq i8* %140, null
br i1 %141, label %142, label %144
142: ; preds = %131
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
br label %402
144: ; preds = %131
%145 = load i8*, i8** %28
%146 = load i32, i32* %25
%147 = load i32*, i32** %14
%148 = call i32 @fread(i8* %145, i32 %146, i32 1, i32* %147)
store i32 %148, i32* %36
%149 = icmp eq i32 %148, 1
br i1 %149, label %150, label %156
150: ; preds = %144
%151 = load i32, i32* %25
store i32 %151, i32* %29
%152 = load i8*, i8** %28
%153 = load i32, i32* %29
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds i8, i8* %152, i64 %154
store i8 0, i8* %155
br label %158
156: ; preds = %144
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
br label %402
158: ; preds = %150
br label %161
159: ; preds = %127
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
br label %402
161: ; preds = %158
%162 = load i8*, i8** %10
%163 = load i32*, i32** %16
%164 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%165 = load i8*, i8** %28
%166 = load i32, i32* %29
%167 = call i32 @proc_cgi(i8* %162, i32* %163, i8* %164, i8* %165, i32 %166)
store i32 %167, i32* %38
%168 = load i32, i32* %29
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), i32 %168)
%170 = load i32*, i32** %16
%171 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.16, i64 0, i64 0), i8* %171)
%173 = load i32*, i32** %16
%174 = call i32 (i32*, i8*, ...) @fprintf(i32* %173, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0))
%175 = load i32*, i32** %16
%176 = call i32 (i32*, i8*, ...) @fprintf(i32* %175, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0))
%177 = load i32, i32* %27
%178 = icmp ne i32 %177, 0
br i1 %178, label %179, label %345
179: ; preds = %161
store i32 0, i32* %41
%180 = load i8*, i8** %28
%181 = load i8*, i8** %13
%182 = call i8* @proc_fake(i8* %180, i32* %29, i8* %181)
store i8* %182, i8** %28
%183 = load i8*, i8** %28
%184 = icmp eq i8* %183, null
br i1 %184, label %185, label %186
185: ; preds = %179
br label %402
186: ; preds = %179
%187 = load i32, i32* %29
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0), i32 %187)
%189 = load i8*, i8** %28
store i8* %189, i8** %30
br label %190
190: ; preds = %312, %186
%191 = load i8*, i8** %30
%192 = load i8, i8* %191
%193 = sext i8 %192 to i32
%194 = icmp ne i32 %193, 0
br i1 %194, label %195, label %199
195: ; preds = %190
%196 = load i8*, i8** %30
%197 = call i8* @strstr(i8* %196, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
store i8* %197, i8** %31
%198 = icmp ne i8* %197, null
br label %199
199: ; preds = %195, %190
%200 = phi i1 [ false, %190 ], [ %198, %195 ]
br i1 %200, label %201, label %313
201: ; preds = %199
store i32 0, i32* %43
%202 = load i8*, i8** %31
%203 = load i8*, i8** %30
%204 = icmp ugt i8* %202, %203
br i1 %204, label %205, label %246
205: ; preds = %201
%206 = load i32*, i32** %17
%207 = load i32*, i32** %19
%208 = load i8*, i8** %30
%209 = load i8*, i8** %31
%210 = load i8*, i8** %30
%211 = ptrtoint i8* %209 to i64
%212 = ptrtoint i8* %210 to i64
%213 = sub i64 %211, %212
%214 = trunc i64 %213 to i32
%215 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%216 = load i32, i32* %26
%217 = call i32 @write_array(i32* %206, i32* %207, i8* %208, i32 %214, i8* %215, i32 %216)
%218 = load i32*, i32** %16
%219 = load i32, i32* %41
%220 = load i8*, i8** %31
%221 = load i8*, i8** %30
%222 = ptrtoint i8* %220 to i64
%223 = ptrtoint i8* %221 to i64
%224 = sub i64 %222, %223
%225 = trunc i64 %224 to i32
%226 = call i32 (i32*, i8*, ...) @fprintf(i32* %218, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.21, i64 0, i64 0), i32 %219, i32 %225)
%227 = load i32*, i32** %16
%228 = load i8*, i8** %31
%229 = load i8*, i8** %30
%230 = ptrtoint i8* %228 to i64
%231 = ptrtoint i8* %229 to i64
%232 = sub i64 %230, %231
%233 = trunc i64 %232 to i32
%234 = call i32 (i32*, i8*, ...) @fprintf(i32* %227, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.22, i64 0, i64 0), i32 %233)
%235 = load i8*, i8** %31
%236 = load i8*, i8** %30
%237 = ptrtoint i8* %235 to i64
%238 = ptrtoint i8* %236 to i64
%239 = sub i64 %237, %238
%240 = load i32, i32* %41
%241 = sext i32 %240 to i64
%242 = add nsw i64 %241, %239
%243 = trunc i64 %242 to i32
store i32 %243, i32* %41
%244 = load i32, i32* %26
%245 = add nsw i32 %244, 1
store i32 %245, i32* %26
br label %246
246: ; preds = %205, %201
%247 = load i8*, i8** %31
%248 = getelementptr inbounds i8, i8* %247, i64 2
store i8* %248, i8** %31
%249 = load i8*, i8** %31
%250 = load i8, i8* %249
%251 = sext i8 %250 to i32
%252 = icmp eq i32 %251, 43
br i1 %252, label %253, label %256
253: ; preds = %246
store i32 1, i32* %43
%254 = load i8*, i8** %31
%255 = getelementptr inbounds i8, i8* %254, i32 1
store i8* %255, i8** %31
br label %256
256: ; preds = %253, %246
%257 = load i8*, i8** %31
%258 = call i8* @strstr(i8* %257, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0))
store i8* %258, i8** %42
%259 = icmp ne i8* %258, null
br i1 %259, label %260, label %309
260: ; preds = %256
%261 = load i32, i32* %43
%262 = icmp ne i32 %261, 0
br i1 %262, label %263, label %275
263: ; preds = %260
%264 = load i8*, i8** %42
%265 = getelementptr inbounds i8, i8* %264, i64 -1
%266 = load i8, i8* %265
%267 = sext i8 %266 to i32
%268 = icmp ne i32 %267, 43
br i1 %268, label %269, label %272
269: ; preds = %263
%270 = load i8*, i8** %8
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i8* %270)
br label %366
272: ; preds = %263
%273 = load i8*, i8** %42
%274 = getelementptr inbounds i8, i8* %273, i32 -1
store i8* %274, i8** %42
br label %275
275: ; preds = %272, %260
%276 = load i8*, i8** %42
store i8 0, i8* %276
%277 = load i8*, i8** %42
%278 = load i32, i32* %43
%279 = icmp ne i32 %278, 0
%280 = zext i1 %279 to i64
%281 = select i1 %279, i32 3, i32 2
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds i8, i8* %277, i64 %282
store i8* %283, i8** %30
%284 = load i8*, i8** %31
%285 = load i8*, i8** %42
%286 = load i8*, i8** %31
%287 = ptrtoint i8* %285 to i64
%288 = ptrtoint i8* %286 to i64
%289 = sub i64 %287, %288
%290 = trunc i64 %289 to i32
%291 = load i32, i32* %43
%292 = icmp ne i32 %291, 0
br i1 %292, label %293, label %295
293: ; preds = %275
%294 = load i32*, i32** %15
br label %297
295: ; preds = %275
%296 = load i32*, i32** %16
br label %297
297: ; preds = %295, %293
%298 = phi i32* [ %294, %293 ], [ %296, %295 ]
%299 = call i32 @fwrite(i8* %284, i32 %290, i32 1, i32* %298)
%300 = load i32, i32* %43
%301 = icmp ne i32 %300, 0
br i1 %301, label %302, label %304
302: ; preds = %297
%303 = load i32*, i32** %15
br label %306
304: ; preds = %297
%305 = load i32*, i32** %16
br label %306
306: ; preds = %304, %302
%307 = phi i32* [ %303, %302 ], [ %305, %304 ]
%308 = call i32 (i32*, i8*, ...) @fprintf(i32* %307, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
br label %312
309: ; preds = %256
%310 = load i8*, i8** %8
%311 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i8* %310)
br label %366
312: ; preds = %306
br label %190
313: ; preds = %199
%314 = load i8*, i8** %30
%315 = icmp ne i8* %314, null
br i1 %315, label %316, label %344
316: ; preds = %313
%317 = load i8*, i8** %30
%318 = load i8, i8* %317
%319 = sext i8 %318 to i32
%320 = icmp ne i32 %319, 0
br i1 %320, label %321, label %344
321: ; preds = %316
%322 = load i32*, i32** %17
%323 = load i32*, i32** %19
%324 = load i8*, i8** %30
%325 = load i8*, i8** %30
%326 = call i64 @strlen(i8* %325)
%327 = trunc i64 %326 to i32
%328 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%329 = load i32, i32* %26
%330 = call i32 @write_array(i32* %322, i32* %323, i8* %324, i32 %327, i8* %328, i32 %329)
%331 = load i32*, i32** %16
%332 = load i32, i32* %41
%333 = load i8*, i8** %30
%334 = call i64 @strlen(i8* %333)
%335 = trunc i64 %334 to i32
%336 = call i32 (i32*, i8*, ...) @fprintf(i32* %331, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.21, i64 0, i64 0), i32 %332, i32 %335)
%337 = load i32*, i32** %16
%338 = load i8*, i8** %30
%339 = call i64 @strlen(i8* %338)
%340 = trunc i64 %339 to i32
%341 = call i32 (i32*, i8*, ...) @fprintf(i32* %337, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.22, i64 0, i64 0), i32 %340)
%342 = load i32, i32* %26
%343 = add nsw i32 %342, 1
store i32 %343, i32* %26
br label %344
344: ; preds = %321, %316, %313
br label %361
345: ; preds = %161
%346 = load i32*, i32** %17
%347 = load i32*, i32** %19
%348 = load i8*, i8** %28
%349 = load i32, i32* %29
%350 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%351 = load i32, i32* %26
%352 = call i32 @write_array(i32* %346, i32* %347, i8* %348, i32 %349, i8* %350, i32 %351)
%353 = load i32*, i32** %16
%354 = load i32, i32* %29
%355 = call i32 (i32*, i8*, ...) @fprintf(i32* %353, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.26, i64 0, i64 0), i32 %354)
%356 = load i32*, i32** %16
%357 = load i32, i32* %29
%358 = call i32 (i32*, i8*, ...) @fprintf(i32* %356, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.22, i64 0, i64 0), i32 %357)
%359 = load i32, i32* %26
%360 = add nsw i32 %359, 1
store i32 %360, i32* %26
br label %361
361: ; preds = %345, %344
%362 = load i32*, i32** %16
%363 = call i32 (i32*, i8*, ...) @fprintf(i32* %362, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.27, i64 0, i64 0))
%364 = load i32*, i32** %16
%365 = call i32 (i32*, i8*, ...) @fprintf(i32* %364, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0))
br label %366
366: ; preds = %361, %309, %269
%367 = load i8*, i8** %28
%368 = icmp ne i8* %367, null
br i1 %368, label %369, label %372
369: ; preds = %366
%370 = load i8*, i8** %28
%371 = call i32 @free(i8* %370)
br label %372
372: ; preds = %369, %366
%373 = load i8*, i8** %8
%374 = load i8*, i8** %9
%375 = load i8*, i8** %9
%376 = call i64 @strlen(i8* %375)
%377 = call i64 @strncmp(i8* %373, i8* %374, i64 %376)
%378 = icmp eq i64 %377, 0
br i1 %378, label %379, label %384
379: ; preds = %372
%380 = load i8*, i8** %8
%381 = load i8*, i8** %9
%382 = call i64 @strlen(i8* %381)
%383 = getelementptr inbounds i8, i8* %380, i64 %382
store i8* %383, i8** %22
br label %386
384: ; preds = %372
%385 = load i8*, i8** %8
store i8* %385, i8** %22
br label %386
386: ; preds = %384, %379
br label %387
387: ; preds = %391, %386
%388 = load i8*, i8** %8
%389 = call i8* @strchr(i8* %388, i8 signext 92)
store i8* %389, i8** %23
%390 = icmp ne i8* %389, null
br i1 %390, label %391, label %393
391: ; preds = %387
%392 = load i8*, i8** %23
store i8 47, i8* %392
br label %387
393: ; preds = %387
%394 = load i8*, i8** %22
%395 = load i8, i8* %394
%396 = sext i8 %395 to i32
%397 = icmp eq i32 %396, 47
br i1 %397, label %398, label %401
398: ; preds = %393
%399 = load i8*, i8** %22
%400 = getelementptr inbounds i8, i8* %399, i32 1
store i8* %400, i8** %22
br label %401
401: ; preds = %398, %393
store i32 0, i32* %37
br label %402
402: ; preds = %566, %401, %185, %159, %156, %142, %122
%403 = load i32*, i32** %15
%404 = icmp ne i32* %403, null
br i1 %404, label %405, label %408
405: ; preds = %402
%406 = load i32*, i32** %15
%407 = call i32 @fclose(i32* %406)
br label %408
408: ; preds = %405, %402
%409 = load i32*, i32** %16
%410 = icmp ne i32* %409, null
br i1 %410, label %411, label %414
411: ; preds = %408
%412 = load i32*, i32** %16
%413 = call i32 @fclose(i32* %412)
br label %414
414: ; preds = %411, %408
%415 = load i32*, i32** %14
%416 = icmp ne i32* %415, null
br i1 %416, label %417, label %420
417: ; preds = %414
%418 = load i32*, i32** %14
%419 = call i32 @fclose(i32* %418)
br label %420
420: ; preds = %417, %414
%421 = load i32*, i32** %19
%422 = icmp ne i32* %421, null
br i1 %422, label %423, label %426
423: ; preds = %420
%424 = load i32*, i32** %19
%425 = call i32 @fclose(i32* %424)
br label %426
426: ; preds = %423, %420
%427 = load i32, i32* %37
%428 = icmp ne i32 %427, 0
br i1 %428, label %483, label %429
429: ; preds = %426
%430 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%431 = load i8*, i8** %10
%432 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%433 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %430, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %431, i8* %432)
%434 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%435 = call i32* @fopen(i8* %434, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
store i32* %435, i32** %15
%436 = icmp eq i32* %435, null
br i1 %436, label %437, label %443
437: ; preds = %429
%438 = load i32, i32* @stderr
%439 = sext i32 %438 to i64
%440 = inttoptr i64 %439 to i32*
%441 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%442 = call i32 (i32*, i8*, ...) @fprintf(i32* %440, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %441)
store i32 -1, i32* %7
br label %596
443: ; preds = %429
%444 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%445 = load i8*, i8** %10
%446 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%447 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %444, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %445, i8* %446)
%448 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%449 = call i32* @fopen(i8* %448, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %449, i32** %16
%450 = icmp eq i32* %449, null
br i1 %450, label %451, label %457
451: ; preds = %443
%452 = load i32, i32* @stderr
%453 = sext i32 %452 to i64
%454 = inttoptr i64 %453 to i32*
%455 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%456 = call i32 (i32*, i8*, ...) @fprintf(i32* %454, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %455)
store i32 -1, i32* %7
br label %596
457: ; preds = %443
br label %458
458: ; preds = %463, %457
%459 = getelementptr inbounds [1000 x i8], [1000 x i8]* %24, i64 0, i64 0
%460 = load i32*, i32** %16
%461 = call i32 @fread(i8* %459, i32 1, i32 1000, i32* %460)
store i32 %461, i32* %25
%462 = icmp sgt i32 %461, 0
br i1 %462, label %463, label %468
463: ; preds = %458
%464 = getelementptr inbounds [1000 x i8], [1000 x i8]* %24, i64 0, i64 0
%465 = load i32, i32* %25
%466 = load i32*, i32** %15
%467 = call i32 @fwrite(i8* %464, i32 1, i32 %465, i32* %466)
br label %458
468: ; preds = %458
%469 = load i32*, i32** %15
%470 = icmp ne i32* %469, null
br i1 %470, label %471, label %474
471: ; preds = %468
%472 = load i32*, i32** %15
%473 = call i32 @fclose(i32* %472)
br label %474
474: ; preds = %471, %468
%475 = load i32*, i32** %16
%476 = icmp ne i32* %475, null
br i1 %476, label %477, label %480
477: ; preds = %474
%478 = load i32*, i32** %16
%479 = call i32 @fclose(i32* %478)
br label %480
480: ; preds = %477, %474
%481 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%482 = call i32 @unlink(i8* %481)
br label %502
483: ; preds = %426
%484 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%485 = load i8*, i8** %10
%486 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%487 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %484, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %485, i8* %486)
%488 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%489 = call i32 @unlink(i8* %488)
%490 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%491 = load i8*, i8** %10
%492 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%493 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %490, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %491, i8* %492)
%494 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%495 = call i32 @unlink(i8* %494)
%496 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%497 = load i8*, i8** %10
%498 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%499 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %496, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %497, i8* %498)
%500 = getelementptr inbounds [255 x i8], [255 x i8]* %20, i64 0, i64 0
%501 = call i32 @unlink(i8* %500)
br label %502
502: ; preds = %483, %480
%503 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%504 = load i8*, i8** %10
%505 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%506 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %503, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i64 0, i64 0), i8* %504, i8* %505)
%507 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%508 = call i32 @system(i8* %507)
%509 = call i32 @sleep(i32 2)
%510 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%511 = load i8*, i8** %10
%512 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%513 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %510, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.31, i64 0, i64 0), i8* %511, i8* %512)
%514 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%515 = call i32 @system(i8* %514)
%516 = call i32 @sleep(i32 2)
%517 = load i32, i32* %37
%518 = icmp ne i32 %517, 0
br i1 %518, label %595, label %519
519: ; preds = %502
%520 = load i8*, i8** %11
%521 = icmp ne i8* %520, null
br i1 %521, label %522, label %595
522: ; preds = %519
%523 = load i8*, i8** %11
%524 = call i32* @fopen(i8* %523, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
store i32* %524, i32** %18
%525 = icmp eq i32* %524, null
br i1 %525, label %526, label %532
526: ; preds = %522
%527 = load i32, i32* @stderr
%528 = sext i32 %527 to i64
%529 = inttoptr i64 %528 to i32*
%530 = load i8*, i8** %11
%531 = call i32 (i32*, i8*, ...) @fprintf(i32* %529, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.32, i64 0, i64 0), i8* %530)
store i32 -1, i32* %7
br label %596
532: ; preds = %522
%533 = load i8*, i8** %12
%534 = call i8* @strstr(i8* %533, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.33, i64 0, i64 0))
%535 = icmp ne i8* %534, null
br i1 %535, label %536, label %543
536: ; preds = %532
%537 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%538 = load i8*, i8** %10
%539 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%540 = load i8*, i8** %10
%541 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%542 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %537, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.34, i64 0, i64 0), i8* %538, i8* %539, i8* %540, i8* %541)
br label %550
543: ; preds = %532
%544 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%545 = load i8*, i8** %10
%546 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%547 = load i8*, i8** %10
%548 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%549 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %544, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.35, i64 0, i64 0), i8* %545, i8* %546, i8* %547, i8* %548)
br label %550
550: ; preds = %543, %536
%551 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%552 = call i32 @system(i8* %551)
%553 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%554 = load i8*, i8** %10
%555 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%556 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %553, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.36, i64 0, i64 0), i8* %554, i8* %555)
%557 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%558 = call i32 @system(i8* %557)
%559 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%560 = load i8*, i8** %10
%561 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%562 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %559, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.37, i64 0, i64 0), i8* %560, i8* %561)
%563 = getelementptr inbounds [255 x i8], [255 x i8]* %34, i64 0, i64 0
%564 = call i32 @stat(i8* %563, %struct.stat* %35)
store i32 %564, i32* %36
%565 = icmp ne i32 %564, 0
br i1 %565, label %566, label %571
566: ; preds = %550
%567 = load i32, i32* %36
%568 = load i32, i32* %36
%569 = call i8* @strerror(i32 %568)
%570 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %567, i8* %569)
br label %402
571: ; preds = %550
%572 = getelementptr inbounds %struct.stat, %struct.stat* %35, i32 0, i32 0
%573 = load i64, i64* %572
%574 = trunc i64 %573 to i32
store i32 %574, i32* %33
%575 = load i32, i32* %38
%576 = icmp ne i32 %575, 0
br i1 %576, label %577, label %585
577: ; preds = %571
%578 = load i32*, i32** %18
%579 = load i8*, i8** %32
%580 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%581 = load i32, i32* %33
%582 = load i8*, i8** %12
%583 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%584 = call i32 (i32*, i8*, ...) @fprintf(i32* %578, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.38, i64 0, i64 0), i8* %579, i8* %580, i32 %581, i8* %582, i8* %583)
br label %592
585: ; preds = %571
%586 = load i32*, i32** %18
%587 = load i8*, i8** %32
%588 = getelementptr inbounds [255 x i8], [255 x i8]* %21, i64 0, i64 0
%589 = load i32, i32* %33
%590 = load i8*, i8** %12
%591 = call i32 (i32*, i8*, ...) @fprintf(i32* %586, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.39, i64 0, i64 0), i8* %587, i8* %588, i32 %589, i8* %590)
br label %592
592: ; preds = %585, %577
%593 = load i32*, i32** %18
%594 = call i32 @fclose(i32* %593)
br label %595
595: ; preds = %592, %519, %502
store i32 0, i32* %7
br label %596
596: ; preds = %595, %526, %451, %437, %108, %94, %80, %49
%597 = load i32, i32* %7
ret i32 %597
}

LLVM IR (-O2):
%struct.stat = type { i64 }
@.str = [11 x i8] c"infile:%s\0A\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [23 x i8] c"Can't open infile: %s\0A\00"
@.str.3 = [12 x i8] c"%s/web_%s.c\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [24 x i8] c"Can't open outfile: %s\0A\00"
@.str.6 = [14 x i8] c"%s/web_%s_1.c\00"
@.str.7 = [31 x i8] c"Can't open c1_outfile list %s\0A\00"
@.str.8 = [14 x i8] c"%s/web_%s.dbg\00"
@.str.9 = [21 x i8] c"Can't open file: %s\0A\00"
@.str.10 = [18 x i8] c"stat err =%d, %s\0A\00"
@.str.11 = [19 x i8] c"read file size=%d\0A\00"
@.str.15 = [35 x i8] c"before proc_fake: proc_blk_len:%d\0A\00"
@.str.16 = [52 x i8] c"\0A\0Aint web_%s(struct connstruct *cn, char *datap)\0A{\0A\00"
@.str.17 = [21 x i8] c"\0A\09int send_len = 0;\0A\00"
@.str.18 = [27 x i8] c"\0A\09int total_send_len = 0;\0A\00"
@.str.19 = [34 x i8] c"after proc_fake: proc_blk_len:%d\0A\00"
@.str.20 = [3 x i8] c"<%\00"
@.str.21 = [48 x i8] c"\09send_len = WEB_write_blk(cn, datap, %d, %d);\0A\0A\00"
@.str.22 = [72 x i8] c"\09if(send_len != %d)\0A \09\09return send_len;\0A \09total_send_len += send_len;\0A\0A\00"
@.str.23 = [3 x i8] c"%>\00"
@.str.24 = [35 x i8] c"ERROR: Unterminated inline C in %s\00"
@.str.25 = [3 x i8] c"\0A\0A\00"
@.str.26 = [47 x i8] c"\09send_len = WEB_write_blk(cn, datap, 0, %d);\0A\0A\00"
@.str.27 = [25 x i8] c"\09return total_send_len;\0A\00"
@.str.28 = [4 x i8] c"\0A}\0A\00"
@.str.29 = [2 x i8] c"a\00"
@.str.30 = [23 x i8] c"dos2unix %s/web_%s.dbg\00"
@.str.31 = [21 x i8] c"dos2unix %s/web_%s.c\00"
@.str.32 = [26 x i8] c"Can't open indexfile: %s\0A\00"
@.str.33 = [14 x i8] c"WEBP_COMPRESS\00"
@.str.34 = [59 x i8] c"../../../tools/bin/lzma e %s/web_%s.dbg %s/web_%s.bin -d16\00"
@.str.35 = [31 x i8] c"cp %s/web_%s.dbg %s/web_%s.bin\00"
@.str.36 = [33 x i8] c"cat %s/web_%s.bin >> webdata.bin\00"
@.str.37 = [14 x i8] c"%s/web_%s.bin\00"
@.str.38 = [48 x i8] c"{ \22%s\22, web_%s, %d, %s, (void *)0, cgi_%s, 0},\0A\00"
@.str.39 = [47 x i8] c"{ \22%s\22, web_%s, %d, %s, (void *)0, NULL, 0 },\0A\00"
@str = [12 x i8] c"file size=0\00"
@str.40 = [11 x i8] c"fread errr\00"
@str.41 = [11 x i8] c"malloc err\00"
define i32 @compile(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca [255 x i8]
%8 = alloca [255 x i8]
%9 = alloca [1000 x i8]
%10 = alloca i32
%11 = alloca [255 x i8]
%12 = alloca %struct.stat
%13 = getelementptr inbounds [255 x i8], [255 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds [255 x i8], [255 x i8]* %8, i64 0, i64 0
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%16 = bitcast i32* %10 to i8*
%17 = getelementptr inbounds [255 x i8], [255 x i8]* %11, i64 0, i64 0
%18 = bitcast %struct.stat* %12 to i8*
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%20 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp eq i32* %20, null
br i1 %21, label %22, label %27
22: ; preds = %6
%23 = load i32, i32* @stderr
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
%26 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %25, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %0)
br label %291
27: ; preds = %6
%28 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%29 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %28)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %27
%32 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%33 = getelementptr inbounds i8, i8* %0, i64 %32
br label %34
34: ; preds = %27, %31
%35 = phi i8* [ %33, %31 ], [ %0, %27 ]
%36 = call i32 @proc_file_type(i8* %35, i8* %14)
%37 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %2, i8* %14)
%38 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %45
40: ; preds = %34
%41 = load i32, i32* @stderr
%42 = sext i32 %41 to i64
%43 = inttoptr i64 %42 to i32*
%44 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %13)
br label %291
45: ; preds = %34
%46 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %2, i8* %14)
%47 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%48 = icmp eq i32* %47, null
br i1 %48, label %49, label %54
49: ; preds = %45
%50 = load i32, i32* @stderr
%51 = sext i32 %50 to i64
%52 = inttoptr i64 %51 to i32*
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i8* %13)
br label %291
54: ; preds = %45
%55 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %2, i8* %14)
%56 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%57 = icmp eq i32* %56, null
br i1 %57, label %58, label %63
58: ; preds = %54
%59 = load i32, i32* @stderr
%60 = sext i32 %59 to i64
%61 = inttoptr i64 %60 to i32*
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %61, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %13)
br label %291
63: ; preds = %54
store i32 0, i32* %10
%64 = call i32 @print_title(i32* %38)
%65 = call i32 @print_common_head(i32* %38)
%66 = call i32 @stat(i8* %0, %struct.stat* %12)
%67 = icmp eq i32 %66, 0
br i1 %67, label %71, label %68
68: ; preds = %63
%69 = call i8* @strerror(i32 %66)
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %66, i8* %69)
br label %191
71: ; preds = %63
%72 = getelementptr inbounds %struct.stat, %struct.stat* %12, i64 0, i32 0
%73 = load i64, i64* %72
%74 = icmp eq i64 %73, 0
br i1 %74, label %101, label %75
75: ; preds = %71
%76 = trunc i64 %73 to i32
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i32 %76)
%78 = add nsw i32 %76, 1
%79 = call i64 @malloc(i32 %78)
%80 = inttoptr i64 %79 to i8*
%81 = icmp eq i64 %79, 0
br i1 %81, label %82, label %84
82: ; preds = %75
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.41, i64 0, i64 0))
br label %191
84: ; preds = %75
%85 = call i32 @fread(i8* %80, i32 %76, i32 1, i32* %20)
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %99
87: ; preds = %84
store i32 %76, i32* %10
%88 = shl i64 %73, 32
%89 = ashr exact i64 %88, 32
%90 = getelementptr inbounds i8, i8* %80, i64 %89
store i8 0, i8* %90
%91 = load i32, i32* %10
%92 = call i32 @proc_cgi(i8* %2, i32* %47, i8* %14, i8* %80, i32 %91)
%93 = load i32, i32* %10
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), i32 %93)
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.16, i64 0, i64 0), i8* %14)
%96 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0), i64 20, i64 1, i32* %47)
%97 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i64 26, i64 1, i32* %47)
%98 = icmp eq i32 %36, 0
br i1 %98, label %170, label %103
99: ; preds = %84
%100 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.40, i64 0, i64 0))
br label %191
101: ; preds = %71
%102 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %191
103: ; preds = %87
%104 = call i8* @proc_fake(i8* %80, i32* %10, i8* %5)
%105 = icmp eq i8* %104, null
br i1 %105, label %191, label %106
106: ; preds = %103
%107 = load i32, i32* %10
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.19, i64 0, i64 0), i32 %107)
%109 = load i8, i8* %104
%110 = icmp eq i8 %109, 0
br i1 %110, label %180, label %111
111: ; preds = %106, %148
%112 = phi i32 [ %131, %148 ], [ 0, %106 ]
%113 = phi i8* [ %152, %148 ], [ %104, %106 ]
%114 = phi i32 [ %130, %148 ], [ 0, %106 ]
%115 = call i8* @strstr(i8* %113, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
%116 = icmp eq i8* %115, null
br i1 %116, label %161, label %117
117: ; preds = %111
%118 = icmp ugt i8* %115, %113
br i1 %118, label %119, label %129
119: ; preds = %117
%120 = ptrtoint i8* %115 to i64
%121 = ptrtoint i8* %113 to i64
%122 = sub i64 %120, %121
%123 = trunc i64 %122 to i32
%124 = call i32 @write_array(i32* undef, i32* %56, i8* %113, i32 %123, i8* %14, i32 %114)
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.21, i64 0, i64 0), i32 %112, i32 %123)
%126 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.22, i64 0, i64 0), i32 %123)
%127 = add i32 %112, %123
%128 = add nsw i32 %114, 1
br label %129
129: ; preds = %119, %117
%130 = phi i32 [ %128, %119 ], [ %114, %117 ]
%131 = phi i32 [ %127, %119 ], [ %112, %117 ]
%132 = getelementptr inbounds i8, i8* %115, i64 2
%133 = load i8, i8* %132
%134 = icmp eq i8 %133, 43
%135 = getelementptr inbounds i8, i8* %115, i64 3
%136 = select i1 %134, i8* %135, i8* %132
%137 = call i8* @strstr(i8* %136, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0))
%138 = icmp eq i8* %137, null
br i1 %138, label %146, label %139
139: ; preds = %129
br i1 %134, label %140, label %148
140: ; preds = %139
%141 = getelementptr inbounds i8, i8* %137, i64 -1
%142 = load i8, i8* %141
%143 = icmp eq i8 %142, 43
br i1 %143, label %148, label %144
144: ; preds = %140
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i8* %0)
br label %184
146: ; preds = %129
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0), i8* %0)
br label %184
148: ; preds = %139, %140
%149 = phi i32* [ %47, %139 ], [ %38, %140 ]
%150 = phi i64 [ 2, %139 ], [ 3, %140 ]
%151 = phi i8* [ %137, %139 ], [ %141, %140 ]
store i8 0, i8* %151
%152 = getelementptr inbounds i8, i8* %151, i64 %150
%153 = ptrtoint i8* %151 to i64
%154 = ptrtoint i8* %136 to i64
%155 = sub i64 %153, %154
%156 = trunc i64 %155 to i32
%157 = call i32 @fwrite(i8* %136, i32 %156, i32 1, i32* %149)
%158 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0), i64 2, i64 1, i32* %149)
%159 = load i8, i8* %152
%160 = icmp eq i8 %159, 0
br i1 %160, label %180, label %111
161: ; preds = %111
%162 = call i64 @strlen(i8* %113)
%163 = trunc i64 %162 to i32
%164 = call i32 @write_array(i32* undef, i32* %56, i8* %113, i32 %163, i8* %14, i32 %114)
%165 = call i64 @strlen(i8* %113)
%166 = trunc i64 %165 to i32
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.21, i64 0, i64 0), i32 %112, i32 %166)
%168 = call i64 @strlen(i8* %113)
%169 = trunc i64 %168 to i32
br label %176
170: ; preds = %87
%171 = load i32, i32* %10
%172 = call i32 @write_array(i32* undef, i32* %56, i8* %80, i32 %171, i8* %14, i32 0)
%173 = load i32, i32* %10
%174 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.26, i64 0, i64 0), i32 %173)
%175 = load i32, i32* %10
br label %176
176: ; preds = %170, %161
%177 = phi i32 [ %169, %161 ], [ %175, %170 ]
%178 = phi i8* [ %104, %161 ], [ %80, %170 ]
%179 = call i32 (i32*, i8*, ...) @fprintf(i32* %47, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.22, i64 0, i64 0), i32 %177)
br label %180
180: ; preds = %148, %176, %106
%181 = phi i8* [ %104, %106 ], [ %178, %176 ], [ %104, %148 ]
%182 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.27, i64 0, i64 0), i64 24, i64 1, i32* %47)
%183 = call i64 bitcast (i32 (i8*, i32, i32, i32*)* @fwrite to i64 (i8*, i64, i64, i32*)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i64 0, i64 0), i64 3, i64 1, i32* %47)
br label %184
184: ; preds = %180, %146, %144
%185 = phi i8* [ %181, %180 ], [ %104, %146 ], [ %104, %144 ]
%186 = call i32 @free(i8* %185)
%187 = call i64 @strlen(i8* dereferenceable(1) %1)
%188 = call i64 @strncmp(i8* %0, i8* %1, i64 %187)
%189 = call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 92)
%190 = icmp eq i8* %189, null
br i1 %190, label %191, label %195
191: ; preds = %195, %184, %68, %82, %99, %101, %103
%192 = phi i1 [ false, %103 ], [ false, %101 ], [ false, %99 ], [ false, %82 ], [ false, %68 ], [ true, %184 ], [ true, %195 ]
%193 = phi i32 [ %92, %103 ], [ 0, %101 ], [ 0, %99 ], [ 0, %82 ], [ 0, %68 ], [ %92, %184 ], [ %92, %195 ]
%194 = icmp ne i8* %3, null
br label %199
195: ; preds = %184, %195
%196 = phi i8* [ %197, %195 ], [ %189, %184 ]
store i8 47, i8* %196
%197 = call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 92)
%198 = icmp eq i8* %197, null
br i1 %198, label %191, label %195
199: ; preds = %191, %277
%200 = phi i32* [ %248, %277 ], [ %47, %191 ]
%201 = phi i1 [ true, %277 ], [ %192, %191 ]
%202 = phi i32* [ %249, %277 ], [ %38, %191 ]
%203 = icmp eq i32* %202, null
br i1 %203, label %206, label %204
204: ; preds = %199
%205 = call i32 @fclose(i32* %202)
br label %206
206: ; preds = %204, %199
%207 = icmp eq i32* %200, null
br i1 %207, label %210, label %208
208: ; preds = %206
%209 = call i32 @fclose(i32* %200)
br label %210
210: ; preds = %206, %208
%211 = call i32 @fclose(i32* %20)
%212 = call i32 @fclose(i32* %56)
%213 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %2, i8* %14)
br i1 %201, label %214, label %242
214: ; preds = %210
%215 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
%216 = icmp eq i32* %215, null
br i1 %216, label %217, label %222
217: ; preds = %214
%218 = load i32, i32* @stderr
%219 = sext i32 %218 to i64
%220 = inttoptr i64 %219 to i32*
%221 = call i32 (i32*, i8*, ...) @fprintf(i32* %220, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %13)
br label %291
222: ; preds = %214
%223 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %2, i8* %14)
%224 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%225 = icmp eq i32* %224, null
br i1 %225, label %229, label %226
226: ; preds = %222
%227 = call i32 @fread(i8* %15, i32 1, i32 1000, i32* %224)
%228 = icmp sgt i32 %227, 0
br i1 %228, label %234, label %239
229: ; preds = %222
%230 = load i32, i32* @stderr
%231 = sext i32 %230 to i64
%232 = inttoptr i64 %231 to i32*
%233 = call i32 (i32*, i8*, ...) @fprintf(i32* %232, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8* %13)
br label %291
234: ; preds = %226, %234
%235 = phi i32 [ %237, %234 ], [ %227, %226 ]
%236 = call i32 @fwrite(i8* %15, i32 1, i32 %235, i32* %215)
%237 = call i32 @fread(i8* %15, i32 1, i32 1000, i32* %224)
%238 = icmp sgt i32 %237, 0
br i1 %238, label %234, label %239
239: ; preds = %234, %226
%240 = call i32 @fclose(i32* %215)
%241 = call i32 @fclose(i32* %224)
br label %247
242: ; preds = %210
%243 = call i32 @unlink(i8* %13)
%244 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %2, i8* %14)
%245 = call i32 @unlink(i8* %13)
%246 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %2, i8* %14)
br label %247
247: ; preds = %242, %239
%248 = phi i32* [ %200, %242 ], [ %224, %239 ]
%249 = phi i32* [ %202, %242 ], [ %215, %239 ]
%250 = call i32 @unlink(i8* %13)
%251 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.30, i64 0, i64 0), i8* %2, i8* %14)
%252 = call i32 @system(i8* %17)
%253 = call i32 @sleep(i32 2)
%254 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.31, i64 0, i64 0), i8* %2, i8* %14)
%255 = call i32 @system(i8* %17)
%256 = call i32 @sleep(i32 2)
%257 = and i1 %194, %201
br i1 %257, label %258, label %291
258: ; preds = %247
%259 = call i32* @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.29, i64 0, i64 0))
%260 = icmp eq i32* %259, null
br i1 %260, label %261, label %266
261: ; preds = %258
%262 = load i32, i32* @stderr
%263 = sext i32 %262 to i64
%264 = inttoptr i64 %263 to i32*
%265 = call i32 (i32*, i8*, ...) @fprintf(i32* %264, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.32, i64 0, i64 0), i8* %3)
br label %291
266: ; preds = %258
%267 = call i8* @strstr(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.33, i64 0, i64 0))
%268 = icmp eq i8* %267, null
%269 = select i1 %268, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.35, i64 0, i64 0), i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.34, i64 0, i64 0)
%270 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) %269, i8* %2, i8* %14, i8* %2, i8* %14)
%271 = call i32 @system(i8* %17)
%272 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.36, i64 0, i64 0), i8* %2, i8* %14)
%273 = call i32 @system(i8* %17)
%274 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* %17, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.37, i64 0, i64 0), i8* %2, i8* %14)
%275 = call i32 @stat(i8* %17, %struct.stat* %12)
%276 = icmp eq i32 %275, 0
br i1 %276, label %280, label %277
277: ; preds = %266
%278 = call i8* @strerror(i32 %275)
%279 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %275, i8* %278)
br label %199
280: ; preds = %266
%281 = getelementptr inbounds %struct.stat, %struct.stat* %12, i64 0, i32 0
%282 = load i64, i64* %281
%283 = trunc i64 %282 to i32
%284 = icmp eq i32 %193, 0
br i1 %284, label %287, label %285
285: ; preds = %280
%286 = call i32 (i32*, i8*, ...) @fprintf(i32* %259, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.38, i64 0, i64 0), i8* %35, i8* %14, i32 %283, i8* %4, i8* %14)
br label %289
287: ; preds = %280
%288 = call i32 (i32*, i8*, ...) @fprintf(i32* %259, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.39, i64 0, i64 0), i8* %35, i8* %14, i32 %283, i8* %4)
br label %289
289: ; preds = %287, %285
%290 = call i32 @fclose(i32* %259)
br label %291
291: ; preds = %247, %289, %261, %229, %217, %58, %49, %40, %22
%292 = phi i32 [ -1, %22 ], [ -1, %40 ], [ -1, %49 ], [ -1, %58 ], [ -1, %261 ], [ -1, %217 ], [ -1, %229 ], [ 0, %289 ], [ 0, %247 ]
ret i32 %292
}