#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 */

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ creathtml(char *, char *, char *, int, char *, char *);
int /*<<< orphan*/ replace(char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ system(char *);
void main(int argc, char *argv[]) {
  int filenum;
  char tempchar[1000];
  filenum = atoi(argv[3]);
  creathtml(argv[1], "total_html/total.html", "total_html/", filenum, argv[4],
            "Total");
  creathtml("class1.bed", "class1_html/class1.html", "class1_html/", filenum,
            argv[4], "Class1");
  creathtml("class2.bed", "class2_html/class2.html", "class2_html/", filenum,
            argv[4], "Class2");
  creathtml("class3.bed", "class3_html/class3.html", "class3_html/", filenum,
            argv[4], "Class3");
  creathtml("class4.bed", "class4_html/class4.html", "class4_html/", filenum,
            argv[4], "Class4");
  creathtml("class5.bed", "class5_html/class5.html", "class5_html/", filenum,
            argv[4], "Class5");
  {
    strcpy(tempchar, "cp html_ingre/load_page.html ");
    strcat(tempchar, argv[2]);
    replace(tempchar);
    system(tempchar);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
lea    0xe64(%rip),%rsi
lea    0xe73(%rip),%rdx
lea    0xe78(%rip),%r9
call   1050 <creathtml@plt>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
lea    0xe67(%rip),%rdi
lea    0xe6b(%rip),%rsi
lea    0xe7c(%rip),%rdx
lea    0xe82(%rip),%r9
call   1050 <creathtml@plt>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
lea    0xe72(%rip),%rdi
lea    0xe76(%rip),%rsi
lea    0xe87(%rip),%rdx
lea    0xe8d(%rip),%r9
call   1050 <creathtml@plt>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
lea    0xe7d(%rip),%rdi
lea    0xe81(%rip),%rsi
lea    0xe92(%rip),%rdx
lea    0xe98(%rip),%r9
call   1050 <creathtml@plt>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
lea    0xe88(%rip),%rdi
lea    0xe8c(%rip),%rsi
lea    0xe9d(%rip),%rdx
lea    0xea3(%rip),%r9
call   1050 <creathtml@plt>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
lea    0xe93(%rip),%rdi
lea    0xe97(%rip),%rsi
lea    0xea8(%rip),%rdx
lea    0xeae(%rip),%r9
call   1050 <creathtml@plt>
lea    -0x400(%rbp),%rdi
lea    0xea2(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x400(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1080 <strcat@plt>
lea    -0x400(%rbp),%rdi
call   1060 <replace@plt>
lea    -0x400(%rbp),%rdi
call   1040 <system@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x3e8,%rsp
mov    %rsi,%rbx
mov    0x18(%rsi),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%rdi
mov    0x20(%rbx),%r8
lea    0xe7a(%rip),%rsi
lea    0xe89(%rip),%rdx
lea    0xe8e(%rip),%r9
mov    %eax,%ecx
call   1050 <creathtml@plt>
mov    0x20(%rbx),%r8
lea    0xe82(%rip),%rdi
lea    0xe86(%rip),%rsi
lea    0xe97(%rip),%rdx
lea    0xe9d(%rip),%r9
mov    %ebp,%ecx
call   1050 <creathtml@plt>
mov    0x20(%rbx),%r8
lea    0xe92(%rip),%rdi
lea    0xe96(%rip),%rsi
lea    0xea7(%rip),%rdx
lea    0xead(%rip),%r9
mov    %ebp,%ecx
call   1050 <creathtml@plt>
mov    0x20(%rbx),%r8
lea    0xea2(%rip),%rdi
lea    0xea6(%rip),%rsi
lea    0xeb7(%rip),%rdx
lea    0xebd(%rip),%r9
mov    %ebp,%ecx
call   1050 <creathtml@plt>
mov    0x20(%rbx),%r8
lea    0xeb2(%rip),%rdi
lea    0xeb6(%rip),%rsi
lea    0xec7(%rip),%rdx
lea    0xecd(%rip),%r9
mov    %ebp,%ecx
call   1050 <creathtml@plt>
mov    0x20(%rbx),%r8
lea    0xec2(%rip),%rdi
lea    0xec6(%rip),%rsi
lea    0xed7(%rip),%rdx
lea    0xedd(%rip),%r9
mov    %ebp,%ecx
call   1050 <creathtml@plt>
lea    0xed6(%rip),%rsi
mov    %rsp,%rbp
mov    %rbp,%rdi
call   1030 <strcpy@plt>
mov    0x10(%rbx),%rsi
mov    %rbp,%rdi
call   1080 <strcat@plt>
mov    %rbp,%rdi
call   1060 <replace@plt>
mov    %rbp,%rdi
call   1040 <system@plt>
add    $0x3e8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"total_html/total.html\00"
@.str.1 = [12 x i8] c"total_html/\00"
@.str.2 = [6 x i8] c"Total\00"
@.str.3 = [11 x i8] c"class1.bed\00"
@.str.4 = [24 x i8] c"class1_html/class1.html\00"
@.str.5 = [13 x i8] c"class1_html/\00"
@.str.6 = [7 x i8] c"Class1\00"
@.str.7 = [11 x i8] c"class2.bed\00"
@.str.8 = [24 x i8] c"class2_html/class2.html\00"
@.str.9 = [13 x i8] c"class2_html/\00"
@.str.10 = [7 x i8] c"Class2\00"
@.str.11 = [11 x i8] c"class3.bed\00"
@.str.12 = [24 x i8] c"class3_html/class3.html\00"
@.str.13 = [13 x i8] c"class3_html/\00"
@.str.14 = [7 x i8] c"Class3\00"
@.str.15 = [11 x i8] c"class4.bed\00"
@.str.16 = [24 x i8] c"class4_html/class4.html\00"
@.str.17 = [13 x i8] c"class4_html/\00"
@.str.18 = [7 x i8] c"Class4\00"
@.str.19 = [11 x i8] c"class5.bed\00"
@.str.20 = [24 x i8] c"class5_html/class5.html\00"
@.str.21 = [13 x i8] c"class5_html/\00"
@.str.22 = [7 x i8] c"Class5\00"
@.str.23 = [30 x i8] c"cp html_ingre/load_page.html \00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca [1000 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 3
%9 = load i8*, i8** %8
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %5
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i32, i32* %5
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 4
%17 = load i8*, i8** %16
%18 = call i32 @creathtml(i8* %13, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %14, i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32, i32* %5
%20 = load i8**, i8*** %4
%21 = getelementptr inbounds i8*, i8** %20, i64 4
%22 = load i8*, i8** %21
%23 = call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %19, i8* %22, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%24 = load i32, i32* %5
%25 = load i8**, i8*** %4
%26 = getelementptr inbounds i8*, i8** %25, i64 4
%27 = load i8*, i8** %26
%28 = call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %24, i8* %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%29 = load i32, i32* %5
%30 = load i8**, i8*** %4
%31 = getelementptr inbounds i8*, i8** %30, i64 4
%32 = load i8*, i8** %31
%33 = call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i32 %29, i8* %32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%34 = load i32, i32* %5
%35 = load i8**, i8*** %4
%36 = getelementptr inbounds i8*, i8** %35, i64 4
%37 = load i8*, i8** %36
%38 = call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %34, i8* %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%39 = load i32, i32* %5
%40 = load i8**, i8*** %4
%41 = getelementptr inbounds i8*, i8** %40, i64 4
%42 = load i8*, i8** %41
%43 = call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i32 %39, i8* %42, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0))
%44 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%45 = call i32 @strcpy(i8* %44, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0))
%46 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%47 = load i8**, i8*** %4
%48 = getelementptr inbounds i8*, i8** %47, i64 2
%49 = load i8*, i8** %48
%50 = call i32 @strcat(i8* %46, i8* %49)
%51 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%52 = call i32 @replace(i8* %51)
%53 = getelementptr inbounds [1000 x i8], [1000 x i8]* %6, i64 0, i64 0
%54 = call i32 @system(i8* %53)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"total_html/total.html\00"
@.str.1 = [12 x i8] c"total_html/\00"
@.str.2 = [6 x i8] c"Total\00"
@.str.3 = [11 x i8] c"class1.bed\00"
@.str.4 = [24 x i8] c"class1_html/class1.html\00"
@.str.5 = [13 x i8] c"class1_html/\00"
@.str.6 = [7 x i8] c"Class1\00"
@.str.7 = [11 x i8] c"class2.bed\00"
@.str.8 = [24 x i8] c"class2_html/class2.html\00"
@.str.9 = [13 x i8] c"class2_html/\00"
@.str.10 = [7 x i8] c"Class2\00"
@.str.11 = [11 x i8] c"class3.bed\00"
@.str.12 = [24 x i8] c"class3_html/class3.html\00"
@.str.13 = [13 x i8] c"class3_html/\00"
@.str.14 = [7 x i8] c"Class3\00"
@.str.15 = [11 x i8] c"class4.bed\00"
@.str.16 = [24 x i8] c"class4_html/class4.html\00"
@.str.17 = [13 x i8] c"class4_html/\00"
@.str.18 = [7 x i8] c"Class4\00"
@.str.19 = [11 x i8] c"class5.bed\00"
@.str.20 = [24 x i8] c"class5_html/class5.html\00"
@.str.21 = [13 x i8] c"class5_html/\00"
@.str.22 = [7 x i8] c"Class5\00"
@.str.23 = [30 x i8] c"cp html_ingre/load_page.html \00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 3
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 4
%11 = load i8*, i8** %10
%12 = tail call i32 @creathtml(i8* %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %7, i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%13 = load i8*, i8** %10
%14 = tail call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %7, i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%15 = load i8*, i8** %10
%16 = tail call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 %7, i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%17 = load i8*, i8** %10
%18 = tail call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i32 %7, i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
%19 = load i8*, i8** %10
%20 = tail call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i32 %7, i8* %19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
%21 = load i8*, i8** %10
%22 = tail call i32 @creathtml(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i32 %7, i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0))
%23 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0))
%24 = getelementptr inbounds i8*, i8** %1, i64 2
%25 = load i8*, i8** %24
%26 = call i32 @strcat(i8* %4, i8* %25)
%27 = call i32 @replace(i8* %4)
%28 = call i32 @system(i8* %4)
ret void
}