#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 */
char EOF;
int S_IROTH;
int S_IRWXG;
int S_IRWXU;
int S_IXOTH;
int /*<<< orphan*/ addcontect(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char **, char **,
                          char **, char **, char **, int *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ replace(char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strtok(char *, char *);
int /*<<< orphan*/ system(char *);
void creathtml(char *inputfile, char *outputmain, char *outputpath, int filenum,
               char *grapht, char *htmltitle) {
  struct peak {
    char c1[1000];
    char c2[1000];
    char c3[1000];
    char c4[1000];
    char c5[1000];
    int c6;
  } peak;
  FILE *p1;
  FILE *p3;
  FILE *pa;
  int num = 1;
  int numppage = 40;
  int pagestart = 1;
  char chartemp[20];
  char pagefilename[1000];
  int flag = 0;
  char ch1;
  int i;
  char tagtemp[1000];
  char graphtemp[1000];
  char *result = NULL;
  mkdir(outputpath, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
  if ((p1 = fopen(inputfile, "r")) == NULL) {
    printf("\nerror occurred when opening the input file to combine peaks!");
    getchar();
    exit(1);
  }
  strcpy(pagefilename, outputpath);
  strcat(pagefilename, "data.js");
  if ((p3 = fopen(pagefilename, "wb")) == NULL) {
    printf("\ncreate output file error\n");
    getchar();
    exit(1);
  }
  strcpy(pagefilename, "cp html_ingre/pageTurn.html ");
  strcat(pagefilename, outputmain);
  replace(pagefilename);
  system(pagefilename);
  strcpy(pagefilename, "cp html_ingre/drawchartscript.js ");
  strcat(pagefilename, outputpath);
  replace(pagefilename);
  system(pagefilename);
  strcpy(pagefilename, "cp html_ingre/Chart.js ");
  strcat(pagefilename, outputpath);
  replace(pagefilename);
  system(pagefilename);
  strcpy(pagefilename, "cp html_ingre/foot.js ");
  strcat(pagefilename, outputpath);
  replace(pagefilename);
  system(pagefilename);
  strcpy(pagefilename, "cp html_ingre/site.css ");
  strcat(pagefilename, outputpath);
  replace(pagefilename);
  system(pagefilename);
  strcpy(pagefilename, "cp html_ingre/style.js ");
  strcat(pagefilename, outputpath);
  replace(pagefilename);
  system(pagefilename);
  ch1 = fgetc(p1);
  rewind(p1);
  while (!feof(p1)) {
    flag = 0;
    fscanf(p1, "%s\t%s\t%s\t%s\t%s\t%d\n", &peak.c1, &peak.c2, &peak.c3,
           &peak.c4, &peak.c5, &peak.c6);
    {
      if (num % 40 == 1) {
        itoa(pagestart, chartemp);
        strcpy(pagefilename, outputpath);
        strcat(pagefilename, "id");
        strcat(pagefilename, chartemp);
        itoa(pagestart + 39, chartemp);
        strcat(pagefilename, "-");
        strcat(pagefilename, chartemp);
        strcat(pagefilename, ".html");
        if ((pa = fopen(pagefilename, "wb")) == NULL) {
          printf("\ncreate html file error\n");
          getchar();
          exit(1);
        }
        addcontect(pa, "html_ingre/head.html");
        if (ch1 != EOF)
          fprintf(pa,
                  " <tr>\n<td "
                  "id=\"startnum\">%d</td>\n<td>%s</td>\n<td>%s</td>\n<td>%s</"
                  "td>\n<td>%d</td>\n<td>%s</td>\n<td><canvas id=\"myChart%d\" "
                  "width=\"200\" height=\"80\"></canvas></td>\n</tr>\n",
                  num, peak.c1, peak.c2, peak.c3, peak.c6, peak.c5, num);
      } else {
        fprintf(pa,
                " <tr>\n<td>%d</td>\n<td>%s</td>\n<td>%s</td>\n<td>%s</"
                "td>\n<td>%d</td>\n<td>%s</td>\n<td><canvas id=\"myChart%d\" "
                "width=\"200\" height=\"80\"></canvas></td>\n</tr>\n",
                num, peak.c1, peak.c2, peak.c3, peak.c6, peak.c5, num);
      }
    }
    {
      if (num == 1) {
        if (strcmp("NA", peak.c5) == 0)
          fprintf(p3, "var dataarr = [[%s]", "");
        else
          fprintf(p3, "var dataarr = [[%s]", peak.c5);
      } else {
        if (strcmp("NA", peak.c5) == 0)
          fprintf(p3, ",\n[%s]", "");
        else
          fprintf(p3, ",\n[%s]", peak.c5);
      }
    }
    num++;
    if (num % 40 == 1) {
      pagestart = pagestart + 40;
      addcontect(pa, "html_ingre/rear.html");
      fclose(pa);
      flag = 1;
    }
  }
  fprintf(p3, "\n];\n");
  {
    strcpy(graphtemp, grapht);
    strcpy(tagtemp, "");
    result = strtok(graphtemp, ",");
    i = 1;
    while (result != NULL) {
      strcat(tagtemp, "\"");
      strcat(tagtemp, result);
      strcat(tagtemp, "\"");
      if (i != filenum)
        strcat(tagtemp, ",");
      i++;
      result = strtok(NULL, ",");
    }
  }
  fprintf(p3, "var labelsset=[%s];\n", tagtemp);
  fprintf(p3, "var iPageSize = %d;\n", 40);
  fprintf(p3, "var iProCount = %d;\n", (num - 1));
  fprintf(p3, "var mainPageUrl = \"%s\";\n", outputmain);
  fprintf(p3, "var datapath = \"%s\";\n", outputpath);
  fprintf(p3, "var titleName = \"%s\";\n", htmltitle);
  if (flag == 0) {
    addcontect(pa, "html_ingre/rear.html");
    fclose(pa);
  }
  fclose(p1);
  fclose(p3);
}


x86 assembly (clang, -O0):
<creathtml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2000,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x1,-0x13dc(%rbp)
movl   $0x28,-0x13e0(%rbp)
movl   $0x1,-0x13e4(%rbp)
movl   $0x0,-0x17f4(%rbp)
movq   $0x0,-0x1fe8(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2d58(%rip),%rax
mov    (%rax),%esi
mov    0x2d3f(%rip),%rax
or     (%rax),%esi
mov    0x2d1e(%rip),%rax
or     (%rax),%esi
mov    0x2d35(%rip),%rax
or     (%rax),%esi
call   1040 <mkdir@plt>
mov    -0x8(%rbp),%rdi
lea    0xd43(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x13c8(%rbp)
cmp    $0x0,%rax
jne    12f0 <creathtml+0xc0>
lea    0xd28(%rip),%rdi
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <getchar@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xd32(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xd27(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x13d0(%rbp)
cmp    $0x0,%rax
jne    1354 <creathtml+0x124>
lea    0xd0d(%rip),%rdi
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <getchar@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xd04(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
call   10f0 <replace@plt>
lea    -0x17f0(%rbp),%rdi
call   1060 <system@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xce6(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
call   10f0 <replace@plt>
lea    -0x17f0(%rbp),%rdi
call   1060 <system@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xccd(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
call   10f0 <replace@plt>
lea    -0x17f0(%rbp),%rdi
call   1060 <system@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xcaa(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
call   10f0 <replace@plt>
lea    -0x17f0(%rbp),%rdi
call   1060 <system@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xc86(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
call   10f0 <replace@plt>
lea    -0x17f0(%rbp),%rdi
call   1060 <system@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xc63(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
call   10f0 <replace@plt>
lea    -0x17f0(%rbp),%rdi
call   1060 <system@plt>
mov    -0x13c8(%rbp),%rdi
call   10a0 <fgetc@plt>
mov    %al,-0x17f5(%rbp)
mov    -0x13c8(%rbp),%rdi
call   1080 <rewind@plt>
mov    -0x13c8(%rbp),%rdi
call   10e0 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    14f5 <creathtml+0x2c5>
jmp    1896 <creathtml+0x666>
movl   $0x0,-0x17f4(%rbp)
mov    -0x13c8(%rbp),%rdi
lea    -0x13c0(%rbp),%rdx
lea    -0x13c0(%rbp),%rcx
add    $0x3e8,%rcx
lea    -0x13c0(%rbp),%r8
add    $0x7d0,%r8
lea    -0x13c0(%rbp),%r9
add    $0xbb8,%r9
lea    -0x13c0(%rbp),%r10
add    $0xfa0,%r10
lea    -0x13c0(%rbp),%rax
add    $0x1388,%rax
lea    0xbab(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <fscanf@plt>
mov    -0x13dc(%rbp),%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    16e9 <creathtml+0x4b9>
mov    -0x13e4(%rbp),%edi
lea    -0x1400(%rbp),%rsi
call   1150 <itoa@plt>
lea    -0x17f0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xb69(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
lea    -0x1400(%rbp),%rsi
call   1130 <strcat@plt>
mov    -0x13e4(%rbp),%edi
add    $0x27,%edi
lea    -0x1400(%rbp),%rsi
call   1150 <itoa@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xb31(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
lea    -0x1400(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xb35(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x17f0(%rbp),%rdi
lea    0xa26(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x13d8(%rbp)
cmp    $0x0,%rax
jne    1655 <creathtml+0x425>
lea    0xadd(%rip),%rdi
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <getchar@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
mov    -0x13d8(%rbp),%rdi
lea    0xad2(%rip),%rsi
call   1100 <addcontect@plt>
movsbl -0x17f5(%rbp),%eax
mov    0x295a(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     16e4 <creathtml+0x4b4>
mov    -0x13d8(%rbp),%rdi
mov    -0x13dc(%rbp),%edx
lea    -0x13c0(%rbp),%rcx
lea    -0x13c0(%rbp),%r8
add    $0x3e8,%r8
lea    -0x13c0(%rbp),%r9
add    $0x7d0,%r9
mov    -0x38(%rbp),%r11d
lea    -0x13c0(%rbp),%r10
add    $0xfa0,%r10
mov    -0x13dc(%rbp),%eax
lea    0xa7a(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   10d0 <fprintf@plt>
jmp    174c <creathtml+0x51c>
mov    -0x13d8(%rbp),%rdi
mov    -0x13dc(%rbp),%edx
lea    -0x13c0(%rbp),%rcx
lea    -0x13c0(%rbp),%r8
add    $0x3e8,%r8
lea    -0x13c0(%rbp),%r9
add    $0x7d0,%r9
mov    -0x38(%rbp),%r11d
lea    -0x13c0(%rbp),%r10
add    $0xfa0,%r10
mov    -0x13dc(%rbp),%eax
lea    0xab7(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   10d0 <fprintf@plt>
cmpl   $0x1,-0x13dc(%rbp)
jne    17c6 <creathtml+0x596>
lea    -0x13c0(%rbp),%rsi
add    $0xfa0,%rsi
lea    0xb18(%rip),%rdi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    179e <creathtml+0x56e>
mov    -0x13d0(%rbp),%rdi
lea    0xafe(%rip),%rsi
lea    0xbb4(%rip),%rdx
mov    $0x0,%al
call   10d0 <fprintf@plt>
jmp    17c1 <creathtml+0x591>
mov    -0x13d0(%rbp),%rdi
lea    -0x13c0(%rbp),%rdx
add    $0xfa0,%rdx
lea    0xacf(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
jmp    1833 <creathtml+0x603>
lea    -0x13c0(%rbp),%rsi
add    $0xfa0,%rsi
lea    0xaab(%rip),%rdi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
jne    180b <creathtml+0x5db>
mov    -0x13d0(%rbp),%rdi
lea    0xaa5(%rip),%rsi
lea    0xb47(%rip),%rdx
mov    $0x0,%al
call   10d0 <fprintf@plt>
jmp    182e <creathtml+0x5fe>
mov    -0x13d0(%rbp),%rdi
lea    -0x13c0(%rbp),%rdx
add    $0xfa0,%rdx
lea    0xa76(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
jmp    1833 <creathtml+0x603>
mov    -0x13dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13dc(%rbp)
mov    -0x13dc(%rbp),%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1891 <creathtml+0x661>
mov    -0x13e4(%rbp),%eax
add    $0x28,%eax
mov    %eax,-0x13e4(%rbp)
mov    -0x13d8(%rbp),%rdi
lea    0xa2e(%rip),%rsi
call   1100 <addcontect@plt>
mov    -0x13d8(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x1,-0x17f4(%rbp)
jmp    14d4 <creathtml+0x2a4>
mov    -0x13d0(%rbp),%rdi
lea    0xa15(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
lea    -0x1fe0(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x1bf0(%rbp),%rdi
lea    0xa7d(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x1fe0(%rbp),%rdi
lea    0x9e2(%rip),%rsi
call   1120 <strtok@plt>
mov    %rax,-0x1fe8(%rbp)
movl   $0x1,-0x17fc(%rbp)
cmpq   $0x0,-0x1fe8(%rbp)
je     1986 <creathtml+0x756>
lea    -0x1bf0(%rbp),%rdi
lea    0x9b2(%rip),%rsi
call   1130 <strcat@plt>
lea    -0x1bf0(%rbp),%rdi
mov    -0x1fe8(%rbp),%rsi
call   1130 <strcat@plt>
lea    -0x1bf0(%rbp),%rdi
lea    0x98c(%rip),%rsi
call   1130 <strcat@plt>
mov    -0x17fc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     195b <creathtml+0x72b>
lea    -0x1bf0(%rbp),%rdi
lea    0x968(%rip),%rsi
call   1130 <strcat@plt>
mov    -0x17fc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x17fc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0x949(%rip),%rsi
call   1120 <strtok@plt>
mov    %rax,-0x1fe8(%rbp)
jmp    18f2 <creathtml+0x6c2>
mov    -0x13d0(%rbp),%rdi
lea    -0x1bf0(%rbp),%rdx
lea    0x927(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
mov    -0x13d0(%rbp),%rdi
lea    0x927(%rip),%rsi
mov    $0x28,%edx
mov    $0x0,%al
call   10d0 <fprintf@plt>
mov    -0x13d0(%rbp),%rdi
mov    -0x13dc(%rbp),%edx
sub    $0x1,%edx
lea    0x919(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
mov    -0x13d0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0x915(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
mov    -0x13d0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0x915(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
mov    -0x13d0(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0x912(%rip),%rsi
mov    $0x0,%al
call   10d0 <fprintf@plt>
cmpl   $0x0,-0x17f4(%rbp)
jne    1a51 <creathtml+0x821>
mov    -0x13d8(%rbp),%rdi
lea    0x864(%rip),%rsi
call   1100 <addcontect@plt>
mov    -0x13d8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x13c8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x13d0(%rbp),%rdi
call   1050 <fclose@plt>
add    $0x2000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creathtml>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1fc8,%rsp
mov    0x2d80(%rip),%rbp
mov    0x2d69(%rip),%rax
mov    (%rax),%eax
or     0x0(%rbp),%eax
mov    0x2d45(%rip),%rbp
or     0x0(%rbp),%eax
mov    %r9,%r14
mov    %r8,0x48(%rsp)
mov    %ecx,%r13d
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    0x2d47(%rip),%rcx
or     (%rcx),%eax
mov    %rdx,%rdi
mov    %eax,%esi
call   1040 <mkdir@plt>
lea    0x107b(%rip),%rsi
mov    %rbx,%rdi
call   1120 <fopen@plt>
test   %rax,%rax
je     18b5 <creathtml+0x665>
mov    %rax,%rbp
lea    0x460(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0xd64(%rip),%rsi
mov    %rbx,%rdi
call   1140 <strcat@plt>
lea    0xd5d(%rip),%rsi
mov    %rbx,%rdi
call   1120 <fopen@plt>
test   %rax,%rax
je     18c3 <creathtml+0x673>
mov    %r13d,0x14(%rsp)
mov    %rax,0x8(%rsp)
mov    %r14,0x40(%rsp)
lea    0xd39(%rip),%rsi
lea    0x460(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r12,0x38(%rsp)
mov    %r12,%rsi
call   1140 <strcat@plt>
mov    %rbx,%rdi
call   1100 <replace@plt>
mov    %rbx,%rdi
call   1070 <system@plt>
lea    0xd1f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1140 <strcat@plt>
mov    %rbx,%rdi
call   1100 <replace@plt>
mov    %rbx,%rdi
call   1070 <system@plt>
lea    0xd17(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1140 <strcat@plt>
mov    %rbx,%rdi
call   1100 <replace@plt>
mov    %rbx,%rdi
call   1070 <system@plt>
lea    0xd05(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1140 <strcat@plt>
mov    %rbx,%rdi
call   1100 <replace@plt>
mov    %rbx,%rdi
call   1070 <system@plt>
lea    0xcf2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1140 <strcat@plt>
mov    %rbx,%rdi
call   1100 <replace@plt>
mov    %rbx,%rdi
call   1070 <system@plt>
lea    0xce0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,0x30(%rsp)
mov    %r15,%rsi
call   1140 <strcat@plt>
mov    %rbx,%rdi
call   1100 <replace@plt>
mov    %rbx,%rdi
call   1070 <system@plt>
mov    %rbp,%rdi
call   10b0 <fgetc@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1090 <rewind@plt>
mov    %rbp,%rdi
call   10f0 <feof@plt>
test   %eax,%eax
mov    %rbp,0x20(%rsp)
je     15d7 <creathtml+0x387>
xor    %ebx,%ebx
mov    $0x1,%r13d
mov    %ebx,%r14d
lea    0xe33(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%rcx
call   1160 <fwrite@plt>
lea    0x1be0(%rsp),%rbx
mov    %rbx,%rdi
mov    0x48(%rsp),%rsi
call   1030 <strcpy@plt>
lea    0xe90(%rip),%rsi
lea    0x70(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xdf7(%rip),%rsi
mov    %rbx,%rdi
call   1130 <strtok@plt>
test   %rax,%rax
je     1507 <creathtml+0x2b7>
mov    %rax,%r12
addl   $0xffffffff,0x14(%rsp)
lea    0xddd(%rip),%rbx
lea    0x70(%rsp),%rbp
lea    0xdcf(%rip),%r15
jmp    14d2 <creathtml+0x282>
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r15,%rsi
call   1130 <strtok@plt>
mov    %rax,%r12
test   %rax,%rax
je     1507 <creathtml+0x2b7>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1140 <strcat@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
call   1140 <strcat@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1140 <strcat@plt>
subl   $0x1,0x14(%rsp)
jb     14c0 <creathtml+0x270>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1140 <strcat@plt>
jmp    14c0 <creathtml+0x270>
lea    0xd7e(%rip),%rsi
lea    0x70(%rsp),%rdx
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10e0 <fprintf@plt>
lea    0xd78(%rip),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
xor    %eax,%eax
call   10e0 <fprintf@plt>
add    $0xffffffff,%r13d
lea    0xd73(%rip),%rsi
mov    %rbx,%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   10e0 <fprintf@plt>
lea    0xd74(%rip),%rsi
mov    %rbx,%rdi
mov    0x38(%rsp),%rdx
xor    %eax,%eax
call   10e0 <fprintf@plt>
lea    0xd77(%rip),%rsi
mov    %rbx,%rdi
mov    0x30(%rsp),%rdx
xor    %eax,%eax
call   10e0 <fprintf@plt>
lea    0xd77(%rip),%rsi
mov    %rbx,%rdi
mov    0x40(%rsp),%rdx
xor    %eax,%eax
call   10e0 <fprintf@plt>
test   %r14d,%r14d
jne    15b3 <creathtml+0x363>
lea    0xcd0(%rip),%rsi
mov    0x28(%rsp),%rbp
mov    %rbp,%rdi
call   1110 <addcontect@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
mov    0x20(%rsp),%rdi
call   1060 <fclose@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
add    $0x1fc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %bl,0x7(%rsp)
lea    0xc38(%rsp),%r12
lea    0x1020(%rsp),%r15
mov    $0x1,%eax
mov    %rax,0x18(%rsp)
lea    0x850(%rsp),%r14
mov    $0x1,%r13d
jmp    164f <creathtml+0x3ff>
xor    %ebx,%ebx
mov    0x8(%rsp),%rdi
lea    0xc40(%rip),%rsi
lea    0xcf6(%rip),%rdx
xor    %eax,%eax
call   10e0 <fprintf@plt>
mov    $0x2,%r13d
mov    %rbp,%rdi
call   10f0 <feof@plt>
test   %eax,%eax
lea    0xc38(%rsp),%r12
lea    0x1020(%rsp),%r15
lea    0x850(%rsp),%r14
jne    1446 <creathtml+0x1f6>
mov    %rbp,%rdi
lea    0xa8e(%rip),%rsi
mov    %r14,%rdx
mov    %r12,%rcx
mov    %r15,%r8
lea    0x1408(%rsp),%r9
lea    0x1bd8(%rsp),%rax
push   %rax
lea    0x17f8(%rsp),%rbx
push   %rbx
call   10a0 <fscanf@plt>
add    $0x10,%rsp
imul   $0xcccccccd,%r13d,%eax
add    $0x33333333,%eax
ror    $0x3,%eax
cmp    $0x6666666,%eax
ja     17a0 <creathtml+0x550>
mov    0x18(%rsp),%rbx
mov    %ebx,%edi
lea    0x50(%rsp),%r14
mov    %r14,%rsi
call   1170 <itoa@plt>
lea    0x460(%rsp),%rbp
mov    %rbp,%rdi
mov    0x30(%rsp),%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
lea    0xa28(%rip),%rsi
call   1140 <strcat@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1140 <strcat@plt>
lea    0x27(%rbx),%edi
mov    %r14,%rsi
call   1170 <itoa@plt>
mov    %rbp,%rdi
lea    0xa06(%rip),%rsi
call   1140 <strcat@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1140 <strcat@plt>
mov    %rbp,%rdi
lea    0x9fd(%rip),%rsi
call   1140 <strcat@plt>
mov    %rbp,%rdi
lea    0x926(%rip),%rsi
call   1120 <fopen@plt>
test   %rax,%rax
je     1898 <creathtml+0x648>
mov    %rax,%rdi
lea    0x9c7(%rip),%rsi
mov    %rax,%rbp
call   1110 <addcontect@plt>
movzbl 0x7(%rsp),%eax
mov    0x2884(%rip),%rcx
cmp    (%rcx),%al
lea    0x17f0(%rsp),%rbx
mov    %rbp,0x28(%rsp)
je     17d2 <creathtml+0x582>
mov    0x1bd8(%rsp),%r10d
sub    $0x8,%rsp
mov    %rbp,%rdi
lea    0x9a1(%rip),%rsi
mov    %r13d,%edx
lea    0x858(%rsp),%rcx
lea    0xc40(%rsp),%r8
lea    0x1028(%rsp),%r9
xor    %eax,%eax
push   %r13
push   %rbx
push   %r10
jmp    17c9 <creathtml+0x579>
nopw   0x0(%rax,%rax,1)
mov    0x1bd8(%rsp),%ebp
sub    $0x8,%rsp
mov    0x30(%rsp),%rdi
lea    0xa02(%rip),%rsi
mov    %r13d,%edx
mov    %r14,%rcx
mov    %r12,%r8
mov    %r15,%r9
xor    %eax,%eax
push   %r13
push   %rbx
push   %rbp
call   10e0 <fprintf@plt>
add    $0x20,%rsp
lea    0xa77(%rip),%rdi
mov    %rbx,%rsi
call   10c0 <strcmp@plt>
cmp    $0x1,%r13d
jne    1810 <creathtml+0x5c0>
test   %rax,%rax
mov    0x20(%rsp),%rbp
je     1605 <creathtml+0x3b5>
mov    0x8(%rsp),%rdi
lea    0xa52(%rip),%rsi
mov    %rbx,%rdx
xor    %ebx,%ebx
jmp    161a <creathtml+0x3ca>
nopl   0x0(%rax,%rax,1)
test   %rax,%rax
mov    0x20(%rsp),%rbp
je     182b <creathtml+0x5db>
mov    0x8(%rsp),%rdi
lea    0xa41(%rip),%rsi
mov    %rbx,%rdx
jmp    183e <creathtml+0x5ee>
mov    0x8(%rsp),%rdi
lea    0xa30(%rip),%rsi
lea    0xad2(%rip),%rdx
xor    %eax,%eax
call   10e0 <fprintf@plt>
add    $0x1,%r13d
imul   $0xcccccccd,%r13d,%eax
add    $0x33333333,%eax
ror    $0x3,%eax
xor    %ebx,%ebx
cmp    $0x6666666,%eax
ja     1627 <creathtml+0x3d7>
mov    0x18(%rsp),%rax
add    $0x28,%eax
mov    %rax,0x18(%rsp)
mov    0x28(%rsp),%rbx
mov    %rbx,%rdi
lea    0x9ed(%rip),%rsi
call   1110 <addcontect@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    $0x1,%ebx
jmp    1627 <creathtml+0x3d7>
lea    0xa72(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   10d0 <getchar@plt>
mov    $0x1,%edi
call   1150 <exit@plt>
lea    0x744(%rip),%rdi
call   1080 <printf@plt>
jmp    18a4 <creathtml+0x654>
lea    0xa5f(%rip),%rdi
jmp    189f <creathtml+0x64f>

LLVM IR (-O0):
%struct.peak = type { [1000 x i8], [1000 x i8], [1000 x i8], [1000 x i8], [1000 x i8], i32 }
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
@.str = [2 x i8] c"r\00"
@.str.1 = [62 x i8] c"\0Aerror occurred when opening the input file to combine peaks!\00"
@.str.2 = [8 x i8] c"data.js\00"
@.str.3 = [3 x i8] c"wb\00"
@.str.4 = [27 x i8] c"\0Acreate output file error\0A\00"
@.str.5 = [29 x i8] c"cp html_ingre/pageTurn.html \00"
@.str.6 = [34 x i8] c"cp html_ingre/drawchartscript.js \00"
@.str.7 = [24 x i8] c"cp html_ingre/Chart.js \00"
@.str.8 = [23 x i8] c"cp html_ingre/foot.js \00"
@.str.9 = [24 x i8] c"cp html_ingre/site.css \00"
@.str.10 = [24 x i8] c"cp html_ingre/style.js \00"
@.str.11 = [19 x i8] c"%s\09%s\09%s\09%s\09%s\09%d\0A\00"
@.str.12 = [3 x i8] c"id\00"
@.str.13 = [2 x i8] c"-\00"
@.str.14 = [6 x i8] c".html\00"
@.str.15 = [25 x i8] c"\0Acreate html file error\0A\00"
@.str.16 = [21 x i8] c"html_ingre/head.html\00"
@EOF = global i8 0
@.str.17 = [165 x i8] c" <tr>\0A<td id=\22startnum\22>%d</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%d</td>\0A<td>%s</td>\0A<td><canvas id=\22myChart%d\22 width=\22200\22 height=\2280\22></canvas></td>\0A</tr>\0A\00"
@.str.18 = [151 x i8] c" <tr>\0A<td>%d</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%d</td>\0A<td>%s</td>\0A<td><canvas id=\22myChart%d\22 width=\22200\22 height=\2280\22></canvas></td>\0A</tr>\0A\00"
@.str.19 = [3 x i8] c"NA\00"
@.str.20 = [20 x i8] c"var dataarr = [[%s]\00"
@.str.21 = [1 x i8] zeroinitializer
@.str.22 = [7 x i8] c",\0A[%s]\00"
@.str.23 = [21 x i8] c"html_ingre/rear.html\00"
@.str.24 = [5 x i8] c"\0A];\0A\00"
@.str.25 = [2 x i8] c",\00"
@.str.26 = [2 x i8] c"\22\00"
@.str.27 = [21 x i8] c"var labelsset=[%s];\0A\00"
@.str.28 = [21 x i8] c"var iPageSize = %d;\0A\00"
@.str.29 = [21 x i8] c"var iProCount = %d;\0A\00"
@.str.30 = [25 x i8] c"var mainPageUrl = \22%s\22;\0A\00"
@.str.31 = [22 x i8] c"var datapath = \22%s\22;\0A\00"
@.str.32 = [23 x i8] c"var titleName = \22%s\22;\0A\00"
define void @creathtml(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca %struct.peak
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca [20 x i8]
%21 = alloca [1000 x i8]
%22 = alloca i32
%23 = alloca i8
%24 = alloca i32
%25 = alloca [1000 x i8]
%26 = alloca [1000 x i8]
%27 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
store i32 1, i32* %17
store i32 40, i32* %18
store i32 1, i32* %19
store i32 0, i32* %22
store i8* null, i8** %27
%28 = load i8*, i8** %9
%29 = load i32, i32* @S_IRWXU
%30 = load i32, i32* @S_IRWXG
%31 = or i32 %29, %30
%32 = load i32, i32* @S_IROTH
%33 = or i32 %31, %32
%34 = load i32, i32* @S_IXOTH
%35 = or i32 %33, %34
%36 = call i32 @mkdir(i8* %28, i32 %35)
%37 = load i8*, i8** %7
%38 = call i32* @fopen(i8* %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %38, i32** %14
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %44
40: ; preds = %6
%41 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%42 = call i32 (...) @getchar()
%43 = call i32 @exit(i32 1)
unreachable
44: ; preds = %6
%45 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%46 = load i8*, i8** %9
%47 = call i32 @strcpy(i8* %45, i8* %46)
%48 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%49 = call i32 @strcat(i8* %48, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%50 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%51 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %51, i32** %15
%52 = icmp eq i32* %51, null
br i1 %52, label %53, label %57
53: ; preds = %44
%54 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%55 = call i32 (...) @getchar()
%56 = call i32 @exit(i32 1)
unreachable
57: ; preds = %44
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%59 = call i32 @strcpy(i8* %58, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%60 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%61 = load i8*, i8** %8
%62 = call i32 @strcat(i8* %60, i8* %61)
%63 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%64 = call i32 @replace(i8* %63)
%65 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%66 = call i32 @system(i8* %65)
%67 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%68 = call i32 @strcpy(i8* %67, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%69 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%70 = load i8*, i8** %9
%71 = call i32 @strcat(i8* %69, i8* %70)
%72 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%73 = call i32 @replace(i8* %72)
%74 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%75 = call i32 @system(i8* %74)
%76 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%77 = call i32 @strcpy(i8* %76, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%78 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%79 = load i8*, i8** %9
%80 = call i32 @strcat(i8* %78, i8* %79)
%81 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%82 = call i32 @replace(i8* %81)
%83 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%84 = call i32 @system(i8* %83)
%85 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%86 = call i32 @strcpy(i8* %85, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
%87 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%88 = load i8*, i8** %9
%89 = call i32 @strcat(i8* %87, i8* %88)
%90 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%91 = call i32 @replace(i8* %90)
%92 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%93 = call i32 @system(i8* %92)
%94 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%95 = call i32 @strcpy(i8* %94, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%96 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%97 = load i8*, i8** %9
%98 = call i32 @strcat(i8* %96, i8* %97)
%99 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%100 = call i32 @replace(i8* %99)
%101 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%102 = call i32 @system(i8* %101)
%103 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%104 = call i32 @strcpy(i8* %103, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%105 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%106 = load i8*, i8** %9
%107 = call i32 @strcat(i8* %105, i8* %106)
%108 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%109 = call i32 @replace(i8* %108)
%110 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%111 = call i32 @system(i8* %110)
%112 = load i32*, i32** %14
%113 = call signext i8 @fgetc(i32* %112)
store i8 %113, i8* %23
%114 = load i32*, i32** %14
%115 = call i32 @rewind(i32* %114)
br label %116
116: ; preds = %251, %57
%117 = load i32*, i32** %14
%118 = call i32 @feof(i32* %117)
%119 = icmp ne i32 %118, 0
%120 = xor i1 %119, true
br i1 %120, label %121, label %252
121: ; preds = %116
store i32 0, i32* %22
%122 = load i32*, i32** %14
%123 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 0
%124 = bitcast [1000 x i8]* %123 to i8**
%125 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 1
%126 = bitcast [1000 x i8]* %125 to i8**
%127 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 2
%128 = bitcast [1000 x i8]* %127 to i8**
%129 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 3
%130 = bitcast [1000 x i8]* %129 to i8**
%131 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 4
%132 = bitcast [1000 x i8]* %131 to i8**
%133 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 5
%134 = call i32 @fscanf(i32* %122, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i8** %124, i8** %126, i8** %128, i8** %130, i8** %132, i32* %133)
%135 = load i32, i32* %17
%136 = srem i32 %135, 40
%137 = icmp eq i32 %136, 1
br i1 %137, label %138, label %192
138: ; preds = %121
%139 = load i32, i32* %19
%140 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%141 = call i32 @itoa(i32 %139, i8* %140)
%142 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%143 = load i8*, i8** %9
%144 = call i32 @strcpy(i8* %142, i8* %143)
%145 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%146 = call i32 @strcat(i8* %145, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%147 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%148 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%149 = call i32 @strcat(i8* %147, i8* %148)
%150 = load i32, i32* %19
%151 = add nsw i32 %150, 39
%152 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%153 = call i32 @itoa(i32 %151, i8* %152)
%154 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%155 = call i32 @strcat(i8* %154, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%156 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%157 = getelementptr inbounds [20 x i8], [20 x i8]* %20, i64 0, i64 0
%158 = call i32 @strcat(i8* %156, i8* %157)
%159 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%160 = call i32 @strcat(i8* %159, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%161 = getelementptr inbounds [1000 x i8], [1000 x i8]* %21, i64 0, i64 0
%162 = call i32* @fopen(i8* %161, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %162, i32** %16
%163 = icmp eq i32* %162, null
br i1 %163, label %164, label %168
164: ; preds = %138
%165 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0))
%166 = call i32 (...) @getchar()
%167 = call i32 @exit(i32 1)
unreachable
168: ; preds = %138
%169 = load i32*, i32** %16
%170 = call i32 @addcontect(i32* %169, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%171 = load i8, i8* %23
%172 = sext i8 %171 to i32
%173 = load i8, i8* @EOF
%174 = sext i8 %173 to i32
%175 = icmp ne i32 %172, %174
br i1 %175, label %176, label %191
176: ; preds = %168
%177 = load i32*, i32** %16
%178 = load i32, i32* %17
%179 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 0
%180 = getelementptr inbounds [1000 x i8], [1000 x i8]* %179, i64 0, i64 0
%181 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 1
%182 = getelementptr inbounds [1000 x i8], [1000 x i8]* %181, i64 0, i64 0
%183 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 2
%184 = getelementptr inbounds [1000 x i8], [1000 x i8]* %183, i64 0, i64 0
%185 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 5
%186 = load i32, i32* %185
%187 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 4
%188 = getelementptr inbounds [1000 x i8], [1000 x i8]* %187, i64 0, i64 0
%189 = load i32, i32* %17
%190 = call i32 (i32*, i8*, ...) @fprintf(i32* %177, i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str.17, i64 0, i64 0), i32 %178, i8* %180, i8* %182, i8* %184, i32 %186, i8* %188, i32 %189)
br label %191
191: ; preds = %176, %168
br label %207
192: ; preds = %121
%193 = load i32*, i32** %16
%194 = load i32, i32* %17
%195 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 0
%196 = getelementptr inbounds [1000 x i8], [1000 x i8]* %195, i64 0, i64 0
%197 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 1
%198 = getelementptr inbounds [1000 x i8], [1000 x i8]* %197, i64 0, i64 0
%199 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 2
%200 = getelementptr inbounds [1000 x i8], [1000 x i8]* %199, i64 0, i64 0
%201 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 5
%202 = load i32, i32* %201
%203 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 4
%204 = getelementptr inbounds [1000 x i8], [1000 x i8]* %203, i64 0, i64 0
%205 = load i32, i32* %17
%206 = call i32 (i32*, i8*, ...) @fprintf(i32* %193, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.18, i64 0, i64 0), i32 %194, i8* %196, i8* %198, i8* %200, i32 %202, i8* %204, i32 %205)
br label %207
207: ; preds = %192, %191
%208 = load i32, i32* %17
%209 = icmp eq i32 %208, 1
br i1 %209, label %210, label %224
210: ; preds = %207
%211 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 4
%212 = getelementptr inbounds [1000 x i8], [1000 x i8]* %211, i64 0, i64 0
%213 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* %212)
%214 = icmp eq i64 %213, 0
br i1 %214, label %215, label %218
215: ; preds = %210
%216 = load i32*, i32** %15
%217 = call i32 (i32*, i8*, ...) @fprintf(i32* %216, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.21, i64 0, i64 0))
br label %223
218: ; preds = %210
%219 = load i32*, i32** %15
%220 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 4
%221 = getelementptr inbounds [1000 x i8], [1000 x i8]* %220, i64 0, i64 0
%222 = call i32 (i32*, i8*, ...) @fprintf(i32* %219, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0), i8* %221)
br label %223
223: ; preds = %218, %215
br label %238
224: ; preds = %207
%225 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 4
%226 = getelementptr inbounds [1000 x i8], [1000 x i8]* %225, i64 0, i64 0
%227 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* %226)
%228 = icmp eq i64 %227, 0
br i1 %228, label %229, label %232
229: ; preds = %224
%230 = load i32*, i32** %15
%231 = call i32 (i32*, i8*, ...) @fprintf(i32* %230, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.21, i64 0, i64 0))
br label %237
232: ; preds = %224
%233 = load i32*, i32** %15
%234 = getelementptr inbounds %struct.peak, %struct.peak* %13, i32 0, i32 4
%235 = getelementptr inbounds [1000 x i8], [1000 x i8]* %234, i64 0, i64 0
%236 = call i32 (i32*, i8*, ...) @fprintf(i32* %233, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* %235)
br label %237
237: ; preds = %232, %229
br label %238
238: ; preds = %237, %223
%239 = load i32, i32* %17
%240 = add nsw i32 %239, 1
store i32 %240, i32* %17
%241 = load i32, i32* %17
%242 = srem i32 %241, 40
%243 = icmp eq i32 %242, 1
br i1 %243, label %244, label %251
244: ; preds = %238
%245 = load i32, i32* %19
%246 = add nsw i32 %245, 40
store i32 %246, i32* %19
%247 = load i32*, i32** %16
%248 = call i32 @addcontect(i32* %247, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.23, i64 0, i64 0))
%249 = load i32*, i32** %16
%250 = call i32 @fclose(i32* %249)
store i32 1, i32* %22
br label %251
251: ; preds = %244, %238
br label %116
252: ; preds = %116
%253 = load i32*, i32** %15
%254 = call i32 (i32*, i8*, ...) @fprintf(i32* %253, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
%255 = getelementptr inbounds [1000 x i8], [1000 x i8]* %26, i64 0, i64 0
%256 = load i8*, i8** %11
%257 = call i32 @strcpy(i8* %255, i8* %256)
%258 = getelementptr inbounds [1000 x i8], [1000 x i8]* %25, i64 0, i64 0
%259 = call i32 @strcpy(i8* %258, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.21, i64 0, i64 0))
%260 = getelementptr inbounds [1000 x i8], [1000 x i8]* %26, i64 0, i64 0
%261 = call i8* @strtok(i8* %260, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
store i8* %261, i8** %27
store i32 1, i32* %24
br label %262
262: ; preds = %279, %252
%263 = load i8*, i8** %27
%264 = icmp ne i8* %263, null
br i1 %264, label %265, label %283
265: ; preds = %262
%266 = getelementptr inbounds [1000 x i8], [1000 x i8]* %25, i64 0, i64 0
%267 = call i32 @strcat(i8* %266, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%268 = getelementptr inbounds [1000 x i8], [1000 x i8]* %25, i64 0, i64 0
%269 = load i8*, i8** %27
%270 = call i32 @strcat(i8* %268, i8* %269)
%271 = getelementptr inbounds [1000 x i8], [1000 x i8]* %25, i64 0, i64 0
%272 = call i32 @strcat(i8* %271, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%273 = load i32, i32* %24
%274 = load i32, i32* %10
%275 = icmp ne i32 %273, %274
br i1 %275, label %276, label %279
276: ; preds = %265
%277 = getelementptr inbounds [1000 x i8], [1000 x i8]* %25, i64 0, i64 0
%278 = call i32 @strcat(i8* %277, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
br label %279
279: ; preds = %276, %265
%280 = load i32, i32* %24
%281 = add nsw i32 %280, 1
store i32 %281, i32* %24
%282 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
store i8* %282, i8** %27
br label %262
283: ; preds = %262
%284 = load i32*, i32** %15
%285 = getelementptr inbounds [1000 x i8], [1000 x i8]* %25, i64 0, i64 0
%286 = call i32 (i32*, i8*, ...) @fprintf(i32* %284, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.27, i64 0, i64 0), i8* %285)
%287 = load i32*, i32** %15
%288 = call i32 (i32*, i8*, ...) @fprintf(i32* %287, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.28, i64 0, i64 0), i32 40)
%289 = load i32*, i32** %15
%290 = load i32, i32* %17
%291 = sub nsw i32 %290, 1
%292 = call i32 (i32*, i8*, ...) @fprintf(i32* %289, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0), i32 %291)
%293 = load i32*, i32** %15
%294 = load i8*, i8** %8
%295 = call i32 (i32*, i8*, ...) @fprintf(i32* %293, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), i8* %294)
%296 = load i32*, i32** %15
%297 = load i8*, i8** %9
%298 = call i32 (i32*, i8*, ...) @fprintf(i32* %296, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.31, i64 0, i64 0), i8* %297)
%299 = load i32*, i32** %15
%300 = load i8*, i8** %12
%301 = call i32 (i32*, i8*, ...) @fprintf(i32* %299, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.32, i64 0, i64 0), i8* %300)
%302 = load i32, i32* %22
%303 = icmp eq i32 %302, 0
br i1 %303, label %304, label %309
304: ; preds = %283
%305 = load i32*, i32** %16
%306 = call i32 @addcontect(i32* %305, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.23, i64 0, i64 0))
%307 = load i32*, i32** %16
%308 = call i32 @fclose(i32* %307)
br label %309
309: ; preds = %304, %283
%310 = load i32*, i32** %14
%311 = call i32 @fclose(i32* %310)
%312 = load i32*, i32** %15
%313 = call i32 @fclose(i32* %312)
ret void
}

LLVM IR (-O2):
%struct.peak = type { [1000 x i8], [1000 x i8], [1000 x i8], [1000 x i8], [1000 x i8], i32 }
@S_IRWXU = global i32 0
@S_IRWXG = global i32 0
@S_IROTH = global i32 0
@S_IXOTH = global i32 0
@.str = [2 x i8] c"r\00"
@.str.1 = [62 x i8] c"\0Aerror occurred when opening the input file to combine peaks!\00"
@.str.2 = [8 x i8] c"data.js\00"
@.str.3 = [3 x i8] c"wb\00"
@.str.5 = [29 x i8] c"cp html_ingre/pageTurn.html \00"
@.str.6 = [34 x i8] c"cp html_ingre/drawchartscript.js \00"
@.str.7 = [24 x i8] c"cp html_ingre/Chart.js \00"
@.str.8 = [23 x i8] c"cp html_ingre/foot.js \00"
@.str.9 = [24 x i8] c"cp html_ingre/site.css \00"
@.str.10 = [24 x i8] c"cp html_ingre/style.js \00"
@.str.11 = [19 x i8] c"%s\09%s\09%s\09%s\09%s\09%d\0A\00"
@.str.12 = [3 x i8] c"id\00"
@.str.13 = [2 x i8] c"-\00"
@.str.14 = [6 x i8] c".html\00"
@.str.16 = [21 x i8] c"html_ingre/head.html\00"
@EOF = global i8 0
@.str.17 = [165 x i8] c" <tr>\0A<td id=\22startnum\22>%d</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%d</td>\0A<td>%s</td>\0A<td><canvas id=\22myChart%d\22 width=\22200\22 height=\2280\22></canvas></td>\0A</tr>\0A\00"
@.str.18 = [151 x i8] c" <tr>\0A<td>%d</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%s</td>\0A<td>%d</td>\0A<td>%s</td>\0A<td><canvas id=\22myChart%d\22 width=\22200\22 height=\2280\22></canvas></td>\0A</tr>\0A\00"
@.str.19 = [3 x i8] c"NA\00"
@.str.20 = [20 x i8] c"var dataarr = [[%s]\00"
@.str.21 = [1 x i8] zeroinitializer
@.str.22 = [7 x i8] c",\0A[%s]\00"
@.str.23 = [21 x i8] c"html_ingre/rear.html\00"
@.str.24 = [5 x i8] c"\0A];\0A\00"
@.str.25 = [2 x i8] c",\00"
@.str.26 = [2 x i8] c"\22\00"
@.str.27 = [21 x i8] c"var labelsset=[%s];\0A\00"
@.str.28 = [21 x i8] c"var iPageSize = %d;\0A\00"
@.str.29 = [21 x i8] c"var iProCount = %d;\0A\00"
@.str.30 = [25 x i8] c"var mainPageUrl = \22%s\22;\0A\00"
@.str.31 = [22 x i8] c"var datapath = \22%s\22;\0A\00"
@.str.32 = [23 x i8] c"var titleName = \22%s\22;\0A\00"
@str = [24 x i8] c"\0Acreate html file error\00"
@str.33 = [26 x i8] c"\0Acreate output file error\00"
define void @creathtml(i8* nocapture %0, i8* %1, i8* %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca %struct.peak
%8 = alloca [20 x i8]
%9 = alloca [1000 x i8]
%10 = alloca [1000 x i8]
%11 = alloca [1000 x i8]
%12 = getelementptr inbounds %struct.peak, %struct.peak* %7, i64 0, i32 0, i64 0
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %8, i64 0, i64 0
%14 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %10, i64 0, i64 0
%16 = getelementptr inbounds [1000 x i8], [1000 x i8]* %11, i64 0, i64 0
%17 = load i32, i32* @S_IRWXU
%18 = load i32, i32* @S_IRWXG
%19 = or i32 %18, %17
%20 = load i32, i32* @S_IROTH
%21 = or i32 %19, %20
%22 = load i32, i32* @S_IXOTH
%23 = or i32 %21, %22
%24 = tail call i32 @mkdir(i8* %2, i32 %23)
%25 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%26 = icmp eq i32* %25, null
br i1 %26, label %27, label %31
27: ; preds = %6
%28 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%29 = tail call i32 (...) @getchar()
%30 = tail call i32 @exit(i32 1)
unreachable
31: ; preds = %6
%32 = call i32 @strcpy(i8* %14, i8* %2)
%33 = call i32 @strcat(i8* %14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%34 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i32* %34, null
br i1 %35, label %36, label %40
36: ; preds = %31
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.33, i64 0, i64 0))
%38 = call i32 (...) @getchar()
%39 = call i32 @exit(i32 1)
unreachable
40: ; preds = %31
%41 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%42 = call i32 @strcat(i8* %14, i8* %1)
%43 = call i32 @replace(i8* %14)
%44 = call i32 @system(i8* %14)
%45 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%46 = call i32 @strcat(i8* %14, i8* %2)
%47 = call i32 @replace(i8* %14)
%48 = call i32 @system(i8* %14)
%49 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%50 = call i32 @strcat(i8* %14, i8* %2)
%51 = call i32 @replace(i8* %14)
%52 = call i32 @system(i8* %14)
%53 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0))
%54 = call i32 @strcat(i8* %14, i8* %2)
%55 = call i32 @replace(i8* %14)
%56 = call i32 @system(i8* %14)
%57 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%58 = call i32 @strcat(i8* %14, i8* %2)
%59 = call i32 @replace(i8* %14)
%60 = call i32 @system(i8* %14)
%61 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%62 = call i32 @strcat(i8* %14, i8* %2)
%63 = call i32 @replace(i8* %14)
%64 = call i32 @system(i8* %14)
%65 = call signext i8 @fgetc(i32* %25)
%66 = call i32 @rewind(i32* %25)
%67 = call i32 @feof(i32* %25)
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %145
69: ; preds = %40
%70 = bitcast %struct.peak* %7 to i8**
%71 = getelementptr inbounds %struct.peak, %struct.peak* %7, i64 0, i32 1
%72 = bitcast [1000 x i8]* %71 to i8**
%73 = getelementptr inbounds %struct.peak, %struct.peak* %7, i64 0, i32 2
%74 = bitcast [1000 x i8]* %73 to i8**
%75 = getelementptr inbounds %struct.peak, %struct.peak* %7, i64 0, i32 3
%76 = bitcast [1000 x i8]* %75 to i8**
%77 = getelementptr inbounds %struct.peak, %struct.peak* %7, i64 0, i32 4
%78 = bitcast [1000 x i8]* %77 to i8**
%79 = getelementptr inbounds %struct.peak, %struct.peak* %7, i64 0, i32 5
%80 = getelementptr inbounds [1000 x i8], [1000 x i8]* %71, i64 0, i64 0
%81 = getelementptr inbounds [1000 x i8], [1000 x i8]* %73, i64 0, i64 0
%82 = getelementptr inbounds [1000 x i8], [1000 x i8]* %77, i64 0, i64 0
br label %83
83: ; preds = %69, %139
%84 = phi i32* [ undef, %69 ], [ %117, %139 ]
%85 = phi i32 [ 1, %69 ], [ %141, %139 ]
%86 = phi i32 [ 1, %69 ], [ %140, %139 ]
%87 = call i32 @fscanf(i32* %25, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i8** %70, i8** %72, i8** %74, i8** %76, i8** %78, i32* %79)
%88 = urem i32 %86, 40
%89 = icmp eq i32 %88, 1
br i1 %89, label %90, label %113
90: ; preds = %83
%91 = call i32 @itoa(i32 %85, i8* %13)
%92 = call i32 @strcpy(i8* %14, i8* %2)
%93 = call i32 @strcat(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%94 = call i32 @strcat(i8* %14, i8* %13)
%95 = add nsw i32 %85, 39
%96 = call i32 @itoa(i32 %95, i8* %13)
%97 = call i32 @strcat(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%98 = call i32 @strcat(i8* %14, i8* %13)
%99 = call i32 @strcat(i8* %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
%100 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%101 = icmp eq i32* %100, null
br i1 %101, label %102, label %106
102: ; preds = %90
%103 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%104 = call i32 (...) @getchar()
%105 = call i32 @exit(i32 1)
unreachable
106: ; preds = %90
%107 = call i32 @addcontect(i32* %100, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0))
%108 = load i8, i8* @EOF
%109 = icmp eq i8 %65, %108
br i1 %109, label %116, label %110
110: ; preds = %106
%111 = load i32, i32* %79
%112 = call i32 (i32*, i8*, ...) @fprintf(i32* %100, i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str.17, i64 0, i64 0), i32 %86, i8* %12, i8* %80, i8* %81, i32 %111, i8* %82, i32 %86)
br label %116
113: ; preds = %83
%114 = load i32, i32* %79
%115 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.18, i64 0, i64 0), i32 %86, i8* %12, i8* %80, i8* %81, i32 %114, i8* %82, i32 %86)
br label %116
116: ; preds = %106, %110, %113
%117 = phi i32* [ %100, %110 ], [ %100, %106 ], [ %84, %113 ]
%118 = icmp eq i32 %86, 1
%119 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* %82)
%120 = icmp eq i64 %119, 0
br i1 %118, label %121, label %126
121: ; preds = %116
br i1 %120, label %122, label %124
122: ; preds = %121
%123 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.21, i64 0, i64 0))
br label %139
124: ; preds = %121
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0), i8* %82)
br label %139
126: ; preds = %116
br i1 %120, label %127, label %129
127: ; preds = %126
%128 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.21, i64 0, i64 0))
br label %131
129: ; preds = %126
%130 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i8* %82)
br label %131
131: ; preds = %127, %129
%132 = add nuw nsw i32 %86, 1
%133 = urem i32 %132, 40
%134 = icmp eq i32 %133, 1
br i1 %134, label %135, label %139
135: ; preds = %131
%136 = add nsw i32 %85, 40
%137 = call i32 @addcontect(i32* %117, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.23, i64 0, i64 0))
%138 = call i32 @fclose(i32* %117)
br label %139
139: ; preds = %124, %122, %135, %131
%140 = phi i32 [ %132, %135 ], [ %132, %131 ], [ 2, %122 ], [ 2, %124 ]
%141 = phi i32 [ %136, %135 ], [ %85, %131 ], [ %85, %122 ], [ %85, %124 ]
%142 = phi i32 [ 1, %135 ], [ 0, %131 ], [ 0, %122 ], [ 0, %124 ]
%143 = call i32 @feof(i32* %25)
%144 = icmp eq i32 %143, 0
br i1 %144, label %83, label %145
145: ; preds = %139, %40
%146 = phi i32 [ 1, %40 ], [ %140, %139 ]
%147 = phi i32 [ 0, %40 ], [ %142, %139 ]
%148 = phi i32* [ undef, %40 ], [ %117, %139 ]
%149 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i64 4, i64 1, i32* %34)
%150 = call i32 @strcpy(i8* %16, i8* %4)
%151 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.21, i64 0, i64 0))
%152 = call i8* @strtok(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
%153 = icmp eq i8* %152, null
br i1 %153, label %167, label %154
154: ; preds = %145, %163
%155 = phi i8* [ %165, %163 ], [ %152, %145 ]
%156 = phi i32 [ %164, %163 ], [ 1, %145 ]
%157 = call i32 @strcat(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%158 = call i32 @strcat(i8* %15, i8* %155)
%159 = call i32 @strcat(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%160 = icmp eq i32 %156, %3
br i1 %160, label %163, label %161
161: ; preds = %154
%162 = call i32 @strcat(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
br label %163
163: ; preds = %161, %154
%164 = add nuw nsw i32 %156, 1
%165 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
%166 = icmp eq i8* %165, null
br i1 %166, label %167, label %154
167: ; preds = %163, %145
%168 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.27, i64 0, i64 0), i8* %15)
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.28, i64 0, i64 0), i32 40)
%170 = add nsw i32 %146, -1
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.29, i64 0, i64 0), i32 %170)
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), i8* %1)
%173 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.31, i64 0, i64 0), i8* %2)
%174 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.32, i64 0, i64 0), i8* %5)
%175 = icmp eq i32 %147, 0
br i1 %175, label %176, label %179
176: ; preds = %167
%177 = call i32 @addcontect(i32* %148, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.23, i64 0, i64 0))
%178 = call i32 @fclose(i32* %148)
br label %179
179: ; preds = %176, %167
%180 = call i32 @fclose(i32* %25)
%181 = call i32 @fclose(i32* %34)
ret void
}