#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*/ time_t;
struct tm {
  int tm_year;
  int tm_mon;
  int tm_mday;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *,
                           char *);
scalar_t__ fscanf(int /*<<< orphan*/ *, char *, char *, ...);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
char *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strncat(char *, char *, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  FILE *stockListFile;
  FILE *dataFile;
  FILE *collectFile;
  char company[1000];
  char url[1000];
  char symbol[100];
  char scriptBlock[1000];
  char year[5];
  char month[3];
  char day[3];
  char currentTime[11];
  char pathHtml[1000];
  char pathDataFile[1000];
  char pathCollectFile[1000];
  char closedPrice[100];
  char vol[100];
  char marketCap[100];
  char equationVol[100];
  char equationMarketCap[100];
  char *pch1;
  char *pch2;
  time_t t = time(NULL);
  struct tm tm = *localtime(&t);
  sprintf(year, "%d", tm.tm_year + 1900);
  sprintf(month, "%02d", tm.tm_mon + 1);
  sprintf(day, "%02d", tm.tm_mday);
  strcpy(currentTime, year);
  strcat(currentTime, "-");
  strcat(currentTime, month);
  strcat(currentTime, "-");
  strcat(currentTime, day);
  strcpy(pathCollectFile, "../data/");
  strcat(pathCollectFile, currentTime);
  strcat(pathCollectFile, ".data");
  stockListFile = fopen("../stock.list", "r");
  collectFile = fopen(pathCollectFile, "w");
  while (fscanf(stockListFile, "%s %s %s", company, symbol, url) != EOF) {
    memset(closedPrice, '\0', 100);
    memset(vol, '\0', 100);
    memset(marketCap, '\0', 100);
    strcpy(pathHtml, "../data_html/");
    strcat(pathHtml, currentTime);
    strcat(pathHtml, "/");
    strcat(pathHtml, company);
    strcat(pathHtml, "/");
    strcpy(pathDataFile, pathHtml);
    strcat(pathDataFile, company);
    strcat(pathDataFile, ".data");
    dataFile = fopen(pathDataFile, "r");
    fscanf(dataFile, "%s", closedPrice);
    fscanf(dataFile, "%s", vol);
    fscanf(dataFile, "%s", marketCap);
    printf("DEBUG: closedPrice %s vol %s marketCap %s\n", closedPrice, vol,
           marketCap);
    memset(equationVol, '\0', 100);
    memset(equationMarketCap, '\0', 100);
    strcpy(equationVol, vol);
    strcpy(equationMarketCap, marketCap);
    pch1 = strchr(vol, 'M');
    if (pch1 != NULL) {
      strcpy(equationVol, "=");
      strncat(equationVol, vol, pch1 - vol);
      strcat(equationVol, "*10^6");
    }
    pch1 = strchr(vol, 'B');
    if (pch1 != NULL) {
      strcpy(equationVol, "=");
      strncat(equationVol, vol, pch1 - vol);
      strcat(equationVol, "*10^9");
    }
    pch1 = strchr(vol, 'T');
    if (pch1 != NULL) {
      strcpy(equationVol, "=");
      strncat(equationVol, vol, pch1 - vol);
      strcat(equationVol, "*10^12");
    }
    pch2 = strchr(marketCap, 'M');
    if (pch2 != NULL) {
      strcpy(equationMarketCap, "=");
      strncat(equationMarketCap, marketCap, pch2 - marketCap);
      strcat(equationMarketCap, "*10^6");
    }
    pch2 = strchr(marketCap, 'B');
    if (pch2 != NULL) {
      strcpy(equationMarketCap, "=");
      strncat(equationMarketCap, marketCap, pch2 - marketCap);
      strcat(equationMarketCap, "*10^9");
    }
    pch2 = strchr(marketCap, 'T');
    if (pch2 != NULL) {
      strcpy(equationMarketCap, "=");
      strncat(equationMarketCap, marketCap, pch2 - marketCap);
      strcat(equationMarketCap, "*10^12");
    }
    fprintf(collectFile, "%s\t%s\t%s\n", closedPrice, equationVol,
            equationMarketCap);
    fclose(dataFile);
  }
  fclose(stockListFile);
  fclose(collectFile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a90,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x1a84(%rbp)
lea    -0x1a84(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%rcx
mov    %rcx,-0x1a90(%rbp)
mov    0x8(%rax),%eax
mov    %eax,-0x1a88(%rbp)
lea    -0xc65(%rbp),%rdi
mov    -0x1a90(%rbp),%edx
add    $0x76c,%edx
lea    0xdd6(%rip),%rsi
call   10f0 <sprintf@plt>
lea    -0xc68(%rbp),%rdi
mov    -0x1a8c(%rbp),%edx
add    $0x1,%edx
lea    0xdbd(%rip),%rsi
call   10f0 <sprintf@plt>
lea    -0xc6b(%rbp),%rdi
mov    -0x1a88(%rbp),%edx
lea    0xda4(%rip),%rsi
call   10f0 <sprintf@plt>
lea    -0xc76(%rbp),%rdi
lea    -0xc65(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0xc76(%rbp),%rdi
lea    0xd83(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0xc76(%rbp),%rdi
lea    -0xc68(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0xc76(%rbp),%rdi
lea    0xd5d(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0xc76(%rbp),%rdi
lea    -0xc6b(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0x1840(%rbp),%rdi
lea    0xd39(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1840(%rbp),%rdi
lea    -0xc76(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0x1840(%rbp),%rdi
lea    0xd1c(%rip),%rsi
call   10e0 <strcat@plt>
lea    0xd16(%rip),%rdi
lea    0xd1d(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    -0x1840(%rbp),%rdi
lea    0xd08(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x410(%rbp),%rdx
lea    -0x870(%rbp),%rcx
lea    -0x800(%rbp),%r8
lea    0xce1(%rip),%rsi
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    0x2c90(%rip),%rcx
cmp    (%rcx),%rax
je     17e0 <main+0x610>
lea    -0x18b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
lea    -0x1920(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
lea    -0x1990(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
lea    -0x1060(%rbp),%rdi
lea    0xc8c(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1060(%rbp),%rdi
lea    -0xc76(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0x1060(%rbp),%rdi
lea    0xc43(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1060(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0x1060(%rbp),%rdi
lea    0xc1d(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1450(%rbp),%rdi
lea    -0x1060(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x1450(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   10e0 <strcat@plt>
lea    -0x1450(%rbp),%rdi
lea    0xbe6(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1450(%rbp),%rdi
lea    0xbe7(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x18b0(%rbp),%rdx
lea    0xbd6(%rip),%rsi
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1920(%rbp),%rdx
lea    0xbbd(%rip),%rsi
mov    $0x0,%al
call   1090 <fscanf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1990(%rbp),%rdx
lea    0xba4(%rip),%rsi
mov    $0x0,%al
call   1090 <fscanf@plt>
lea    -0x18b0(%rbp),%rsi
lea    -0x1920(%rbp),%rdx
lea    -0x1990(%rbp),%rcx
lea    0xb92(%rip),%rdi
call   1070 <printf@plt>
lea    -0x1a00(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
lea    -0x1a70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
lea    -0x1a00(%rbp),%rdi
lea    -0x1920(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x1a70(%rbp),%rdi
lea    -0x1990(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x1920(%rbp),%rdi
mov    $0x4d,%esi
call   1060 <strchr@plt>
mov    %rax,-0x1a78(%rbp)
cmpq   $0x0,-0x1a78(%rbp)
je     1573 <main+0x3a3>
lea    -0x1a00(%rbp),%rdi
lea    0xb38(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1a00(%rbp),%rdi
lea    -0x1920(%rbp),%rsi
mov    -0x1a78(%rbp),%rax
lea    -0x1920(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   10a0 <strncat@plt>
lea    -0x1a00(%rbp),%rdi
lea    0xb01(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1920(%rbp),%rdi
mov    $0x42,%esi
call   1060 <strchr@plt>
mov    %rax,-0x1a78(%rbp)
cmpq   $0x0,-0x1a78(%rbp)
je     15e5 <main+0x415>
lea    -0x1a00(%rbp),%rdi
lea    0xac6(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1a00(%rbp),%rdi
lea    -0x1920(%rbp),%rsi
mov    -0x1a78(%rbp),%rax
lea    -0x1920(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   10a0 <strncat@plt>
lea    -0x1a00(%rbp),%rdi
lea    0xa95(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1920(%rbp),%rdi
mov    $0x54,%esi
call   1060 <strchr@plt>
mov    %rax,-0x1a78(%rbp)
cmpq   $0x0,-0x1a78(%rbp)
je     1657 <main+0x487>
lea    -0x1a00(%rbp),%rdi
lea    0xa54(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1a00(%rbp),%rdi
lea    -0x1920(%rbp),%rsi
mov    -0x1a78(%rbp),%rax
lea    -0x1920(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   10a0 <strncat@plt>
lea    -0x1a00(%rbp),%rdi
lea    0xa29(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1990(%rbp),%rdi
mov    $0x4d,%esi
call   1060 <strchr@plt>
mov    %rax,-0x1a80(%rbp)
cmpq   $0x0,-0x1a80(%rbp)
je     16c9 <main+0x4f9>
lea    -0x1a70(%rbp),%rdi
lea    0x9e2(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1a70(%rbp),%rdi
lea    -0x1990(%rbp),%rsi
mov    -0x1a80(%rbp),%rax
lea    -0x1990(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   10a0 <strncat@plt>
lea    -0x1a70(%rbp),%rdi
lea    0x9ab(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1990(%rbp),%rdi
mov    $0x42,%esi
call   1060 <strchr@plt>
mov    %rax,-0x1a80(%rbp)
cmpq   $0x0,-0x1a80(%rbp)
je     173b <main+0x56b>
lea    -0x1a70(%rbp),%rdi
lea    0x970(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1a70(%rbp),%rdi
lea    -0x1990(%rbp),%rsi
mov    -0x1a80(%rbp),%rax
lea    -0x1990(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   10a0 <strncat@plt>
lea    -0x1a70(%rbp),%rdi
lea    0x93f(%rip),%rsi
call   10e0 <strcat@plt>
lea    -0x1990(%rbp),%rdi
mov    $0x54,%esi
call   1060 <strchr@plt>
mov    %rax,-0x1a80(%rbp)
cmpq   $0x0,-0x1a80(%rbp)
je     17ad <main+0x5dd>
lea    -0x1a70(%rbp),%rdi
lea    0x8fe(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x1a70(%rbp),%rdi
lea    -0x1990(%rbp),%rsi
mov    -0x1a80(%rbp),%rax
lea    -0x1990(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   10a0 <strncat@plt>
lea    -0x1a70(%rbp),%rdi
lea    0x8d3(%rip),%rsi
call   10e0 <strcat@plt>
mov    -0x20(%rbp),%rdi
lea    -0x18b0(%rbp),%rdx
lea    -0x1a00(%rbp),%rcx
lea    -0x1a70(%rbp),%r8
lea    0x8b5(%rip),%rsi
call   10b0 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
jmp    132a <main+0x15a>
mov    -0x10(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x1a90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1678,%rsp
xor    %edi,%edi
call   10c0 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    0x4(%rax),%ebx
mov    0x8(%rax),%r15d
mov    $0x76c,%edx
add    (%rax),%edx
lea    0xdf5(%rip),%rsi
lea    0x20(%rsp),%r14
mov    %r14,%rdi
call   10f0 <sprintf@plt>
add    $0x1,%ebx
lea    0xde1(%rip),%rbp
lea    0x1d(%rsp),%r12
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %ebx,%edx
call   10f0 <sprintf@plt>
lea    0x1a(%rsp),%r13
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
call   10f0 <sprintf@plt>
lea    0x25(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
lea    0xdaa(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   10e0 <strcat@plt>
lea    0xd79(%rip),%rsi
lea    0xab0(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10e0 <strcat@plt>
lea    0xd60(%rip),%rsi
mov    %rbp,%rdi
call   10e0 <strcat@plt>
lea    0xd57(%rip),%rdi
lea    0xd5e(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%rbx
lea    0xd51(%rip),%rsi
mov    %rbp,%rdi
call   10d0 <fopen@plt>
mov    %rax,0x8(%rsp)
lea    0xd3f(%rip),%rsi
lea    0x2d0(%rsp),%rdx
lea    0x180(%rsp),%rcx
lea    0x6c0(%rsp),%r8
mov    %rbx,0x10(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1090 <fscanf@plt>
mov    0x2cce(%rip),%rcx
cmp    (%rcx),%rax
jne    1347 <main+0x177>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
mov    0x8(%rsp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x1678,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x110(%rsp),%r13
lea    0xa0(%rsp),%r12
lea    0x30(%rsp),%rbx
lea    0x260(%rsp),%r14
jmp    13d8 <main+0x208>
cs nopw 0x0(%rax,%rax,1)
mov    0x8(%rsp),%rdi
lea    0xd06(%rip),%rsi
lea    0x110(%rsp),%rbp
mov    %r13,%r8
mov    %rbp,%r13
mov    %rbp,%rdx
mov    %r14,%rcx
call   10b0 <fprintf@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    0x10(%rsp),%rdi
lea    0xc82(%rip),%rsi
lea    0x2d0(%rsp),%rdx
lea    0x180(%rsp),%rcx
lea    0x6c0(%rsp),%r8
xor    %eax,%eax
call   1090 <fscanf@plt>
mov    0x2c19(%rip),%rcx
cmp    (%rcx),%rax
je     131f <main+0x14f>
mov    %r13,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
lea    0x2d0(%rsp),%rbp
lea    0x1290(%rsp),%rbx
mov    %rbx,%rdi
lea    0xc15(%rip),%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
lea    0x25(%rsp),%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
lea    0xbd6(%rip),%r15
mov    %r15,%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10e0 <strcat@plt>
lea    0xea0(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
lea    0xa0(%rsp),%r12
lea    0x30(%rsp),%rbx
call   1040 <strcpy@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   10e0 <strcat@plt>
mov    %r15,%rdi
lea    0xb85(%rip),%rsi
call   10e0 <strcat@plt>
mov    %r15,%rdi
lea    0xb8a(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,%r15
mov    %rax,%rdi
lea    0xb82(%rip),%rbp
mov    %rbp,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1090 <fscanf@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1090 <fscanf@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <fscanf@plt>
lea    0xb5f(%rip),%rdi
mov    %r13,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1070 <printf@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
lea    0x1f0(%rsp),%r13
mov    %r13,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1080 <memset@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %r12,%rdi
mov    $0x4d,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1570 <main+0x3a0>
mov    %rax,%rbp
mov    %r14,%rdi
lea    0xb21(%rip),%rsi
call   1040 <strcpy@plt>
sub    %r12d,%ebp
mov    %r14,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   10a0 <strncat@plt>
mov    %r14,%rdi
lea    0xb04(%rip),%rsi
call   10e0 <strcat@plt>
mov    %r12,%rdi
mov    $0x42,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     15b3 <main+0x3e3>
mov    %rax,%rbp
mov    %r14,%rdi
lea    0xade(%rip),%rsi
call   1040 <strcpy@plt>
sub    %r12d,%ebp
mov    %r14,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   10a0 <strncat@plt>
mov    %r14,%rdi
lea    0xac7(%rip),%rsi
call   10e0 <strcat@plt>
mov    %r12,%rdi
mov    $0x54,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     15f6 <main+0x426>
mov    %rax,%rbp
mov    %r14,%rdi
lea    0xa9b(%rip),%rsi
call   1040 <strcpy@plt>
sub    %r12d,%ebp
mov    %r14,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   10a0 <strncat@plt>
mov    %r14,%rdi
lea    0xa8a(%rip),%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    $0x4d,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1638 <main+0x468>
mov    %rax,%rbp
mov    %r13,%rdi
lea    0xa58(%rip),%rsi
call   1040 <strcpy@plt>
sub    %ebx,%ebp
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   10a0 <strncat@plt>
mov    %r13,%rdi
lea    0xa3c(%rip),%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    $0x42,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     167a <main+0x4aa>
mov    %rax,%rbp
mov    %r13,%rdi
lea    0xa16(%rip),%rsi
call   1040 <strcpy@plt>
sub    %ebx,%ebp
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   10a0 <strncat@plt>
mov    %r13,%rdi
lea    0xa00(%rip),%rsi
call   10e0 <strcat@plt>
mov    %rbx,%rdi
mov    $0x54,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1370 <main+0x1a0>
mov    %rax,%rbp
mov    %r13,%rdi
lea    0x9d0(%rip),%rsi
call   1040 <strcpy@plt>
sub    %ebx,%ebp
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   10a0 <strncat@plt>
mov    %r13,%rdi
lea    0x9c0(%rip),%rsi
call   10e0 <strcat@plt>
jmp    1370 <main+0x1a0>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%02d\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [9 x i8] c"../data/\00"
@.str.4 = [6 x i8] c".data\00"
@.str.5 = [14 x i8] c"../stock.list\00"
@.str.6 = [2 x i8] c"r\00"
@.str.7 = [2 x i8] c"w\00"
@.str.8 = [9 x i8] c"%s %s %s\00"
@EOF = global i64 0
@.str.9 = [14 x i8] c"../data_html/\00"
@.str.10 = [2 x i8] c"/\00"
@.str.11 = [3 x i8] c"%s\00"
@.str.12 = [43 x i8] c"DEBUG: closedPrice %s vol %s marketCap %s\0A\00"
@.str.13 = [2 x i8] c"=\00"
@.str.14 = [6 x i8] c"*10^6\00"
@.str.15 = [6 x i8] c"*10^9\00"
@.str.16 = [7 x i8] c"*10^12\00"
@.str.17 = [10 x i8] c"%s\09%s\09%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1000 x i8]
%6 = alloca [1000 x i8]
%7 = alloca [100 x i8]
%8 = alloca [1000 x i8]
%9 = alloca [5 x i8]
%10 = alloca [3 x i8]
%11 = alloca [3 x i8]
%12 = alloca [11 x i8]
%13 = alloca [1000 x i8]
%14 = alloca [1000 x i8]
%15 = alloca [1000 x i8]
%16 = alloca [100 x i8]
%17 = alloca [100 x i8]
%18 = alloca [100 x i8]
%19 = alloca [100 x i8]
%20 = alloca [100 x i8]
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca i32
%24 = alloca %struct.tm
store i32 0, i32* %1
%25 = call i32 @time(i32* null)
store i32 %25, i32* %23
%26 = call %struct.tm* @localtime(i32* %23)
%27 = bitcast %struct.tm* %24 to i8*
%28 = bitcast %struct.tm* %26 to i8*
%29 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%30 = getelementptr inbounds %struct.tm, %struct.tm* %24, i32 0, i32 0
%31 = load i32, i32* %30
%32 = add nsw i32 %31, 1900
%33 = call i32 @sprintf(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%35 = getelementptr inbounds %struct.tm, %struct.tm* %24, i32 0, i32 1
%36 = load i32, i32* %35
%37 = add nsw i32 %36, 1
%38 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%40 = getelementptr inbounds %struct.tm, %struct.tm* %24, i32 0, i32 2
%41 = load i32, i32* %40
%42 = call i32 @sprintf(i8* %39, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds [11 x i8], [11 x i8]* %12, i64 0, i64 0
%44 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%45 = call i32 @strcpy(i8* %43, i8* %44)
%46 = getelementptr inbounds [11 x i8], [11 x i8]* %12, i64 0, i64 0
%47 = call i32 @strcat(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%48 = getelementptr inbounds [11 x i8], [11 x i8]* %12, i64 0, i64 0
%49 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%50 = call i32 @strcat(i8* %48, i8* %49)
%51 = getelementptr inbounds [11 x i8], [11 x i8]* %12, i64 0, i64 0
%52 = call i32 @strcat(i8* %51, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%53 = getelementptr inbounds [11 x i8], [11 x i8]* %12, i64 0, i64 0
%54 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%55 = call i32 @strcat(i8* %53, i8* %54)
%56 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%57 = call i32 @strcpy(i8* %56, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%58 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%59 = getelementptr inbounds [11 x i8], [11 x i8]* %12, i64 0, i64 0
%60 = call i32 @strcat(i8* %58, i8* %59)
%61 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%62 = call i32 @strcat(i8* %61, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%63 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32* %63, i32** %2
%64 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%65 = call i32* @fopen(i8* %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32* %65, i32** %4
br label %66
66: ; preds = %239, %0
%67 = load i32*, i32** %2
%68 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%70 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%71 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* %68, i8* %69, i8* %70)
%72 = load i64, i64* @EOF
%73 = icmp ne i64 %71, %72
br i1 %73, label %74, label %247
74: ; preds = %66
%75 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%76 = call i32 @memset(i8* %75, i8 signext 0, i32 100)
%77 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%78 = call i32 @memset(i8* %77, i8 signext 0, i32 100)
%79 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%80 = call i32 @memset(i8* %79, i8 signext 0, i32 100)
%81 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%82 = call i32 @strcpy(i8* %81, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%83 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%84 = getelementptr inbounds [11 x i8], [11 x i8]* %12, i64 0, i64 0
%85 = call i32 @strcat(i8* %83, i8* %84)
%86 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%87 = call i32 @strcat(i8* %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%88 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%89 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%90 = call i32 @strcat(i8* %88, i8* %89)
%91 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%92 = call i32 @strcat(i8* %91, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%93 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%94 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%95 = call i32 @strcpy(i8* %93, i8* %94)
%96 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%97 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%98 = call i32 @strcat(i8* %96, i8* %97)
%99 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%100 = call i32 @strcat(i8* %99, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%101 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%102 = call i32* @fopen(i8* %101, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32* %102, i32** %3
%103 = load i32*, i32** %3
%104 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%105 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %103, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %104)
%106 = load i32*, i32** %3
%107 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%108 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %107)
%109 = load i32*, i32** %3
%110 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%111 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %109, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %110)
%112 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%113 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%114 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%115 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0), i8* %112, i8* %113, i8* %114)
%116 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%117 = call i32 @memset(i8* %116, i8 signext 0, i32 100)
%118 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%119 = call i32 @memset(i8* %118, i8 signext 0, i32 100)
%120 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%121 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%122 = call i32 @strcpy(i8* %120, i8* %121)
%123 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%124 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%125 = call i32 @strcpy(i8* %123, i8* %124)
%126 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%127 = call i8* @strchr(i8* %126, i8 signext 77)
store i8* %127, i8** %21
%128 = load i8*, i8** %21
%129 = icmp ne i8* %128, null
br i1 %129, label %130, label %144
130: ; preds = %74
%131 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%132 = call i32 @strcpy(i8* %131, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%133 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%134 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%135 = load i8*, i8** %21
%136 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%137 = ptrtoint i8* %135 to i64
%138 = ptrtoint i8* %136 to i64
%139 = sub i64 %137, %138
%140 = trunc i64 %139 to i32
%141 = call i32 @strncat(i8* %133, i8* %134, i32 %140)
%142 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%143 = call i32 @strcat(i8* %142, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %144
144: ; preds = %130, %74
%145 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%146 = call i8* @strchr(i8* %145, i8 signext 66)
store i8* %146, i8** %21
%147 = load i8*, i8** %21
%148 = icmp ne i8* %147, null
br i1 %148, label %149, label %163
149: ; preds = %144
%150 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%151 = call i32 @strcpy(i8* %150, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%152 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%153 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%154 = load i8*, i8** %21
%155 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%156 = ptrtoint i8* %154 to i64
%157 = ptrtoint i8* %155 to i64
%158 = sub i64 %156, %157
%159 = trunc i64 %158 to i32
%160 = call i32 @strncat(i8* %152, i8* %153, i32 %159)
%161 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%162 = call i32 @strcat(i8* %161, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
br label %163
163: ; preds = %149, %144
%164 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%165 = call i8* @strchr(i8* %164, i8 signext 84)
store i8* %165, i8** %21
%166 = load i8*, i8** %21
%167 = icmp ne i8* %166, null
br i1 %167, label %168, label %182
168: ; preds = %163
%169 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%170 = call i32 @strcpy(i8* %169, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%171 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%172 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%173 = load i8*, i8** %21
%174 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%175 = ptrtoint i8* %173 to i64
%176 = ptrtoint i8* %174 to i64
%177 = sub i64 %175, %176
%178 = trunc i64 %177 to i32
%179 = call i32 @strncat(i8* %171, i8* %172, i32 %178)
%180 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%181 = call i32 @strcat(i8* %180, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %182
182: ; preds = %168, %163
%183 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%184 = call i8* @strchr(i8* %183, i8 signext 77)
store i8* %184, i8** %22
%185 = load i8*, i8** %22
%186 = icmp ne i8* %185, null
br i1 %186, label %187, label %201
187: ; preds = %182
%188 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%189 = call i32 @strcpy(i8* %188, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%190 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%191 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%192 = load i8*, i8** %22
%193 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%194 = ptrtoint i8* %192 to i64
%195 = ptrtoint i8* %193 to i64
%196 = sub i64 %194, %195
%197 = trunc i64 %196 to i32
%198 = call i32 @strncat(i8* %190, i8* %191, i32 %197)
%199 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%200 = call i32 @strcat(i8* %199, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %201
201: ; preds = %187, %182
%202 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%203 = call i8* @strchr(i8* %202, i8 signext 66)
store i8* %203, i8** %22
%204 = load i8*, i8** %22
%205 = icmp ne i8* %204, null
br i1 %205, label %206, label %220
206: ; preds = %201
%207 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%208 = call i32 @strcpy(i8* %207, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%209 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%210 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%211 = load i8*, i8** %22
%212 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%213 = ptrtoint i8* %211 to i64
%214 = ptrtoint i8* %212 to i64
%215 = sub i64 %213, %214
%216 = trunc i64 %215 to i32
%217 = call i32 @strncat(i8* %209, i8* %210, i32 %216)
%218 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%219 = call i32 @strcat(i8* %218, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
br label %220
220: ; preds = %206, %201
%221 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%222 = call i8* @strchr(i8* %221, i8 signext 84)
store i8* %222, i8** %22
%223 = load i8*, i8** %22
%224 = icmp ne i8* %223, null
br i1 %224, label %225, label %239
225: ; preds = %220
%226 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%227 = call i32 @strcpy(i8* %226, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%228 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%229 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%230 = load i8*, i8** %22
%231 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%232 = ptrtoint i8* %230 to i64
%233 = ptrtoint i8* %231 to i64
%234 = sub i64 %232, %233
%235 = trunc i64 %234 to i32
%236 = call i32 @strncat(i8* %228, i8* %229, i32 %235)
%237 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%238 = call i32 @strcat(i8* %237, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %239
239: ; preds = %225, %220
%240 = load i32*, i32** %4
%241 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%242 = getelementptr inbounds [100 x i8], [100 x i8]* %19, i64 0, i64 0
%243 = getelementptr inbounds [100 x i8], [100 x i8]* %20, i64 0, i64 0
%244 = call i32 @fprintf(i32* %240, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* %241, i8* %242, i8* %243)
%245 = load i32*, i32** %3
%246 = call i32 @fclose(i32* %245)
br label %66
247: ; preds = %66
%248 = load i32*, i32** %2
%249 = call i32 @fclose(i32* %248)
%250 = load i32*, i32** %4
%251 = call i32 @fclose(i32* %250)
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%02d\00"
@.str.2 = [2 x i8] c"-\00"
@.str.3 = [9 x i8] c"../data/\00"
@.str.4 = [6 x i8] c".data\00"
@.str.5 = [14 x i8] c"../stock.list\00"
@.str.6 = [2 x i8] c"r\00"
@.str.7 = [2 x i8] c"w\00"
@.str.8 = [9 x i8] c"%s %s %s\00"
@EOF = global i64 0
@.str.9 = [14 x i8] c"../data_html/\00"
@.str.10 = [2 x i8] c"/\00"
@.str.11 = [3 x i8] c"%s\00"
@.str.12 = [43 x i8] c"DEBUG: closedPrice %s vol %s marketCap %s\0A\00"
@.str.13 = [2 x i8] c"=\00"
@.str.14 = [6 x i8] c"*10^6\00"
@.str.15 = [6 x i8] c"*10^9\00"
@.str.16 = [7 x i8] c"*10^12\00"
@.str.17 = [10 x i8] c"%s\09%s\09%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = alloca [100 x i8]
%4 = alloca [5 x i8]
%5 = alloca [3 x i8]
%6 = alloca [3 x i8]
%7 = alloca [11 x i8]
%8 = alloca [1000 x i8]
%9 = alloca [1000 x i8]
%10 = alloca [1000 x i8]
%11 = alloca [100 x i8]
%12 = alloca [100 x i8]
%13 = alloca [100 x i8]
%14 = alloca [100 x i8]
%15 = alloca [100 x i8]
%16 = alloca i32
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%18 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%21 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%22 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%23 = getelementptr inbounds [11 x i8], [11 x i8]* %7, i64 0, i64 0
%24 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%25 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%26 = getelementptr inbounds [1000 x i8], [1000 x i8]* %10, i64 0, i64 0
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %13, i64 0, i64 0
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%32 = bitcast i32* %16 to i8*
%33 = tail call i32 @time(i32* null)
store i32 %33, i32* %16
%34 = call %struct.tm* @localtime(i32* %16)
%35 = getelementptr inbounds %struct.tm, %struct.tm* %34, i64 0, i32 0
%36 = load i32, i32* %35
%37 = getelementptr inbounds %struct.tm, %struct.tm* %34, i64 0, i32 1
%38 = load i32, i32* %37
%39 = getelementptr inbounds %struct.tm, %struct.tm* %34, i64 0, i32 2
%40 = load i32, i32* %39
%41 = add nsw i32 %36, 1900
%42 = call i32 @sprintf(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = add nsw i32 %38, 1
%44 = call i32 @sprintf(i8* %21, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = call i32 @sprintf(i8* %22, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%46 = call i32 @strcpy(i8* %23, i8* %20)
%47 = call i32 @strcat(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%48 = call i32 @strcat(i8* %23, i8* %21)
%49 = call i32 @strcat(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%50 = call i32 @strcat(i8* %23, i8* %22)
%51 = call i32 @strcpy(i8* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%52 = call i32 @strcat(i8* %26, i8* %23)
%53 = call i32 @strcat(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%54 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%55 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%56 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %54, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* %17, i8* %19, i8* %18)
%57 = load i64, i64* @EOF
%58 = icmp eq i64 %56, %57
br i1 %58, label %148, label %59
59: ; preds = %0
%60 = ptrtoint [100 x i8]* %12 to i64
%61 = ptrtoint [100 x i8]* %13 to i64
br label %62
62: ; preds = %59, %142
%63 = call i32 @memset(i8* %27, i8 signext 0, i32 100)
%64 = call i32 @memset(i8* %28, i8 signext 0, i32 100)
%65 = call i32 @memset(i8* %29, i8 signext 0, i32 100)
%66 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%67 = call i32 @strcat(i8* %24, i8* %23)
%68 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%69 = call i32 @strcat(i8* %24, i8* %17)
%70 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
%71 = call i32 @strcpy(i8* %25, i8* %24)
%72 = call i32 @strcat(i8* %25, i8* %17)
%73 = call i32 @strcat(i8* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%74 = call i32* @fopen(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%75 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %27)
%76 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %28)
%77 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %29)
%78 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0), i8* %27, i8* %28, i8* %29)
%79 = call i32 @memset(i8* %30, i8 signext 0, i32 100)
%80 = call i32 @memset(i8* %31, i8 signext 0, i32 100)
%81 = call i32 @strcpy(i8* %30, i8* %28)
%82 = call i32 @strcpy(i8* %31, i8* %29)
%83 = call i8* @strchr(i8* %28, i8 signext 77)
%84 = icmp eq i8* %83, null
br i1 %84, label %92, label %85
85: ; preds = %62
%86 = call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%87 = ptrtoint i8* %83 to i64
%88 = sub i64 %87, %60
%89 = trunc i64 %88 to i32
%90 = call i32 @strncat(i8* %30, i8* %28, i32 %89)
%91 = call i32 @strcat(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %92
92: ; preds = %85, %62
%93 = call i8* @strchr(i8* %28, i8 signext 66)
%94 = icmp eq i8* %93, null
br i1 %94, label %102, label %95
95: ; preds = %92
%96 = call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%97 = ptrtoint i8* %93 to i64
%98 = sub i64 %97, %60
%99 = trunc i64 %98 to i32
%100 = call i32 @strncat(i8* %30, i8* %28, i32 %99)
%101 = call i32 @strcat(i8* %30, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
br label %102
102: ; preds = %95, %92
%103 = call i8* @strchr(i8* %28, i8 signext 84)
%104 = icmp eq i8* %103, null
br i1 %104, label %112, label %105
105: ; preds = %102
%106 = call i32 @strcpy(i8* %30, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%107 = ptrtoint i8* %103 to i64
%108 = sub i64 %107, %60
%109 = trunc i64 %108 to i32
%110 = call i32 @strncat(i8* %30, i8* %28, i32 %109)
%111 = call i32 @strcat(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %112
112: ; preds = %105, %102
%113 = call i8* @strchr(i8* %29, i8 signext 77)
%114 = icmp eq i8* %113, null
br i1 %114, label %122, label %115
115: ; preds = %112
%116 = call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%117 = ptrtoint i8* %113 to i64
%118 = sub i64 %117, %61
%119 = trunc i64 %118 to i32
%120 = call i32 @strncat(i8* %31, i8* %29, i32 %119)
%121 = call i32 @strcat(i8* %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0))
br label %122
122: ; preds = %115, %112
%123 = call i8* @strchr(i8* %29, i8 signext 66)
%124 = icmp eq i8* %123, null
br i1 %124, label %132, label %125
125: ; preds = %122
%126 = call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%127 = ptrtoint i8* %123 to i64
%128 = sub i64 %127, %61
%129 = trunc i64 %128 to i32
%130 = call i32 @strncat(i8* %31, i8* %29, i32 %129)
%131 = call i32 @strcat(i8* %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
br label %132
132: ; preds = %125, %122
%133 = call i8* @strchr(i8* %29, i8 signext 84)
%134 = icmp eq i8* %133, null
br i1 %134, label %142, label %135
135: ; preds = %132
%136 = call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%137 = ptrtoint i8* %133 to i64
%138 = sub i64 %137, %61
%139 = trunc i64 %138 to i32
%140 = call i32 @strncat(i8* %31, i8* %29, i32 %139)
%141 = call i32 @strcat(i8* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
br label %142
142: ; preds = %135, %132
%143 = call i32 @fprintf(i32* %55, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* %27, i8* %30, i8* %31)
%144 = call i32 @fclose(i32* %74)
%145 = call i64 (i32*, i8*, i8*, ...) @fscanf(i32* %54, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* %17, i8* %19, i8* %18)
%146 = load i64, i64* @EOF
%147 = icmp eq i64 %145, %146
br i1 %147, label %148, label %62
148: ; preds = %142, %0
%149 = call i32 @fclose(i32* %54)
%150 = call i32 @fclose(i32* %55)
ret i32 0
}