#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ R_OK;
int access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  if (argc != 5) {
    perror("Argument count is wrong");
    exit(-1);
  }
  int argv1_notempty = strcmp(argv[1], "") != 0;
  int argv2_notempty = strcmp(argv[2], "") != 0;
  int argv3_notempty = strcmp(argv[3], "") != 0;
  int argv4_notempty = strcmp(argv[4], "") != 0;
  int checkfornotempty134 = argv1_notempty && argv3_notempty && argv4_notempty;
  if (!checkfornotempty134) {
    perror("One or more of your arguments are empty");
    exit(-1);
  }
  printf("<!DOCTYPE html><html><head>");
  if (!argv2_notempty) {
    printf("<title>%s</title>\n", argv[1]);
  } else {
    printf("<title>%s | %s</title>\n", argv[1], argv[2]);
  }
  int styleFilenameExists = access(argv[3], R_OK) != -1;
  int keywordsFilenameExists = access(argv[4], R_OK) != -1;
  if (!(styleFilenameExists && keywordsFilenameExists)) {
    perror("An error has occurred");
    exit(-1);
  }
  printf("<meta charset=\"UTF-8\"/><meta name=\"viewport\" "
         "content=\"width=device-width, initial-scale=1.0\"/><meta "
         "name=\"keywords\" content=\"");
  FILE *infile = fopen(argv[4], "r");
  char buffer[1024] = {0};
  while (!feof(infile)) {
    fgets(buffer, 1024, infile);
    for (int i = strlen(buffer) - 1; i >= 0; i--) {
      if (buffer[i] == '\n') {
        buffer[i] = '\0';
        break;
      }
    }
    printf("%s, ", buffer);
    memset(buffer, 0, 1024);
  }
  fclose(infile);
  printf("\b\b\b\b\"/>\n");
  infile = fopen(argv[3], "r");
  memset(buffer, 0, 1024);
  while (!feof(infile)) {
    fgets(buffer, 1024, infile);
    printf("%s", buffer);
  }
  fclose(infile);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     11e9 <main+0x39>
lea    0xe26(%rip),%rdi
call   10c0 <perror@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xf32(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xf0f(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xeec(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
lea    0xec9(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x445(%rbp)
je     12a6 <main+0xf6>
xor    %eax,%eax
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x445(%rbp)
je     12a6 <main+0xf6>
cmpl   $0x0,-0x20(%rbp)
setne  %al
mov    %al,-0x445(%rbp)
mov    -0x445(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jne    12d4 <main+0x124>
lea    0xd53(%rip),%rdi
call   10c0 <perror@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
jne    1307 <main+0x157>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xd61(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1325 <main+0x175>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xd51(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0x2cac(%rip),%rax
mov    (%rax),%esi
call   10a0 <access@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
mov    0x2c88(%rip),%rax
mov    (%rax),%esi
call   10a0 <access@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     1381 <main+0x1d1>
cmpl   $0x0,-0x2c(%rbp)
jne    1397 <main+0x1e7>
lea    0xcff(%rip),%rdi
call   10c0 <perror@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
lea    0xcff(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
lea    0xd67(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x38(%rbp)
lea    -0x440(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
mov    -0x38(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    13ee <main+0x23e>
jmp    1497 <main+0x2e7>
lea    -0x440(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    $0x400,%esi
call   1070 <fgets@plt>
lea    -0x440(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x444(%rbp)
cmpl   $0x0,-0x444(%rbp)
jl     146a <main+0x2ba>
movslq -0x444(%rbp),%rax
movsbl -0x440(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    1451 <main+0x2a1>
movslq -0x444(%rbp),%rax
movb   $0x0,-0x440(%rbp,%rax,1)
jmp    146a <main+0x2ba>
jmp    1456 <main+0x2a6>
mov    -0x444(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x444(%rbp)
jmp    1418 <main+0x268>
lea    -0x440(%rbp),%rsi
lea    0xca5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x440(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
jmp    13d0 <main+0x220>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xc7b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xc5e(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x38(%rbp)
lea    -0x440(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1060 <memset@plt>
mov    -0x38(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    14f7 <main+0x347>
jmp    1526 <main+0x376>
lea    -0x440(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    $0x400,%esi
call   1070 <fgets@plt>
lea    -0x440(%rbp),%rsi
lea    0xc11(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    14d9 <main+0x329>
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x400,%rsp
cmp    $0x5,%edi
jne    13ea <main+0x22a>
mov    %rsi,%r14
mov    0x8(%rsi),%rdi
lea    0xe9f(%rip),%r12
mov    %r12,%rsi
call   1090 <strcmp@plt>
mov    %rax,%r13
mov    0x10(%r14),%rdi
mov    %r12,%rsi
call   1090 <strcmp@plt>
mov    %rax,%r15
mov    0x18(%r14),%rdi
mov    %r12,%rsi
call   1090 <strcmp@plt>
mov    %rax,%rbx
mov    0x20(%r14),%rdi
mov    %r12,%rsi
call   1090 <strcmp@plt>
test   %r13,%r13
je     13f3 <main+0x233>
test   %rbx,%rbx
je     13f3 <main+0x233>
test   %rax,%rax
je     13f3 <main+0x233>
lea    0xe02(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%r14),%rsi
test   %r15,%r15
je     1262 <main+0xa2>
mov    0x10(%r14),%rdx
lea    0xe16(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1270 <main+0xb0>
lea    0xdf3(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x18(%r14),%rdi
mov    0x2d65(%rip),%r15
mov    (%r15),%esi
call   10b0 <access@plt>
mov    %eax,%ebx
mov    0x20(%r14),%rdi
mov    (%r15),%esi
call   10b0 <access@plt>
cmp    $0xffffffff,%ebx
je     13fc <main+0x23c>
cmp    $0xffffffff,%eax
je     13fc <main+0x23c>
lea    0xdf3(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x20(%r14),%rdi
lea    0xe5f(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%r15
mov    %rsp,%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1070 <memset@plt>
mov    %r15,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
je     1374 <main+0x1b4>
mov    %r15,%rdi
call   1040 <fclose@plt>
lea    0xe33(%rip),%rdi
call   1030 <puts@plt>
mov    0x18(%r14),%rdi
lea    0xe19(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%rbx
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
mov    %rbx,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    1359 <main+0x199>
mov    %rsp,%r14
lea    0xdf3(%rip),%r15
nop
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
je     1330 <main+0x170>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
mov    %rsp,%rbx
lea    0xd9f(%rip),%r12
jmp    13ac <main+0x1ec>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
mov    %r15,%rdi
call   10a0 <feof@plt>
test   %eax,%eax
jne    12e3 <main+0x123>
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %r15,%rdx
call   1080 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
test   %eax,%eax
jle    1380 <main+0x1c0>
lea    -0x1(%rax),%rcx
cmpb   $0xa,-0x1(%rsp,%rax,1)
mov    %rcx,%rax
jne    13d0 <main+0x210>
mov    %ecx,%eax
movb   $0x0,(%rsp,%rax,1)
jmp    1380 <main+0x1c0>
lea    0xc0f(%rip),%rdi
jmp    1403 <main+0x243>
lea    0xc1e(%rip),%rdi
jmp    1403 <main+0x243>
lea    0xc84(%rip),%rdi
call   10d0 <perror@plt>
mov    $0xffffffff,%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Argument count is wrong\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [40 x i8] c"One or more of your arguments are empty\00"
@.str.3 = [28 x i8] c"<!DOCTYPE html><html><head>\00"
@.str.4 = [19 x i8] c"<title>%s</title>\0A\00"
@.str.5 = [24 x i8] c"<title>%s | %s</title>\0A\00"
@R_OK = global i32 0
@.str.6 = [22 x i8] c"An error has occurred\00"
@.str.7 = [126 x i8] c"<meta charset=\22UTF-8\22/><meta name=\22viewport\22 content=\22width=device-width, initial-scale=1.0\22/><meta name=\22keywords\22 content=\22\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [5 x i8] c"%s, \00"
@.str.10 = [9 x i8] c"\08\08\08\08\22/>\0A\00"
@.str.11 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca [1024 x i8]
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 5
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @exit(i32 -1)
unreachable
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp ne i64 %25, 0
%27 = zext i1 %26 to i32
store i32 %27, i32* %6
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 2
%30 = load i8*, i8** %29
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%32 = icmp ne i64 %31, 0
%33 = zext i1 %32 to i32
store i32 %33, i32* %7
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 3
%36 = load i8*, i8** %35
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%38 = icmp ne i64 %37, 0
%39 = zext i1 %38 to i32
store i32 %39, i32* %8
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 4
%42 = load i8*, i8** %41
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%44 = icmp ne i64 %43, 0
%45 = zext i1 %44 to i32
store i32 %45, i32* %9
%46 = load i32, i32* %6
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %54
48: ; preds = %21
%49 = load i32, i32* %8
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = load i32, i32* %9
%53 = icmp ne i32 %52, 0
br label %54
54: ; preds = %51, %48, %21
%55 = phi i1 [ false, %48 ], [ false, %21 ], [ %53, %51 ]
%56 = zext i1 %55 to i32
store i32 %56, i32* %10
%57 = load i32, i32* %10
%58 = icmp ne i32 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %54
%60 = call i32 @perror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%61 = call i32 @exit(i32 -1)
unreachable
62: ; preds = %54
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%64 = load i32, i32* %7
%65 = icmp ne i32 %64, 0
br i1 %65, label %71, label %66
66: ; preds = %62
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 1
%69 = load i8*, i8** %68
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %69)
br label %79
71: ; preds = %62
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 1
%74 = load i8*, i8** %73
%75 = load i8**, i8*** %5
%76 = getelementptr inbounds i8*, i8** %75, i64 2
%77 = load i8*, i8** %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %74, i8* %77)
br label %79
79: ; preds = %71, %66
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds i8*, i8** %80, i64 3
%82 = load i8*, i8** %81
%83 = load i32, i32* @R_OK
%84 = call i32 @access(i8* %82, i32 %83)
%85 = icmp ne i32 %84, -1
%86 = zext i1 %85 to i32
store i32 %86, i32* %11
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i64 4
%89 = load i8*, i8** %88
%90 = load i32, i32* @R_OK
%91 = call i32 @access(i8* %89, i32 %90)
%92 = icmp ne i32 %91, -1
%93 = zext i1 %92 to i32
store i32 %93, i32* %12
%94 = load i32, i32* %11
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %99
96: ; preds = %79
%97 = load i32, i32* %12
%98 = icmp ne i32 %97, 0
br i1 %98, label %102, label %99
99: ; preds = %96, %79
%100 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%101 = call i32 @exit(i32 -1)
unreachable
102: ; preds = %96
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str.7, i64 0, i64 0))
%104 = load i8**, i8*** %5
%105 = getelementptr inbounds i8*, i8** %104, i64 4
%106 = load i8*, i8** %105
%107 = call i32* @fopen(i8* %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %107, i32** %13
%108 = bitcast [1024 x i8]* %14 to i8*
br label %109
109: ; preds = %139, %102
%110 = load i32*, i32** %13
%111 = call i32 @feof(i32* %110)
%112 = icmp ne i32 %111, 0
%113 = xor i1 %112, true
br i1 %113, label %114, label %144
114: ; preds = %109
%115 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%116 = load i32*, i32** %13
%117 = call i32 @fgets(i8* %115, i32 1024, i32* %116)
%118 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%119 = call i32 @strlen(i8* %118)
%120 = sub nsw i32 %119, 1
store i32 %120, i32* %15
br label %121
121: ; preds = %136, %114
%122 = load i32, i32* %15
%123 = icmp sge i32 %122, 0
br i1 %123, label %124, label %139
124: ; preds = %121
%125 = load i32, i32* %15
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 %126
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp eq i32 %129, 10
br i1 %130, label %131, label %135
131: ; preds = %124
%132 = load i32, i32* %15
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 %133
store i8 0, i8* %134
br label %139
135: ; preds = %124
br label %136
136: ; preds = %135
%137 = load i32, i32* %15
%138 = add nsw i32 %137, -1
store i32 %138, i32* %15
br label %121
139: ; preds = %131, %121
%140 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %140)
%142 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%143 = call i32 @memset(i8* %142, i32 0, i32 1024)
br label %109
144: ; preds = %109
%145 = load i32*, i32** %13
%146 = call i32 @fclose(i32* %145)
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%148 = load i8**, i8*** %5
%149 = getelementptr inbounds i8*, i8** %148, i64 3
%150 = load i8*, i8** %149
%151 = call i32* @fopen(i8* %150, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %151, i32** %13
%152 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%153 = call i32 @memset(i8* %152, i32 0, i32 1024)
br label %154
154: ; preds = %159, %144
%155 = load i32*, i32** %13
%156 = call i32 @feof(i32* %155)
%157 = icmp ne i32 %156, 0
%158 = xor i1 %157, true
br i1 %158, label %159, label %165
159: ; preds = %154
%160 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%161 = load i32*, i32** %13
%162 = call i32 @fgets(i8* %160, i32 1024, i32* %161)
%163 = getelementptr inbounds [1024 x i8], [1024 x i8]* %14, i64 0, i64 0
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %163)
br label %154
165: ; preds = %154
%166 = load i32*, i32** %13
%167 = call i32 @fclose(i32* %166)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Argument count is wrong\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [40 x i8] c"One or more of your arguments are empty\00"
@.str.3 = [28 x i8] c"<!DOCTYPE html><html><head>\00"
@.str.4 = [19 x i8] c"<title>%s</title>\0A\00"
@.str.5 = [24 x i8] c"<title>%s | %s</title>\0A\00"
@R_OK = global i32 0
@.str.6 = [22 x i8] c"An error has occurred\00"
@.str.7 = [126 x i8] c"<meta charset=\22UTF-8\22/><meta name=\22viewport\22 content=\22width=device-width, initial-scale=1.0\22/><meta name=\22keywords\22 content=\22\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [5 x i8] c"%s, \00"
@.str.11 = [3 x i8] c"%s\00"
@str = [8 x i8] c"\08\08\08\08\22/>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = icmp eq i32 %0, 5
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i64 @strcmp(i8* %14, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%16 = getelementptr inbounds i8*, i8** %1, i64 3
%17 = load i8*, i8** %16
%18 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp ne i64 %18, 0
%20 = getelementptr inbounds i8*, i8** %1, i64 4
%21 = load i8*, i8** %20
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%23 = select i1 %12, i1 %19, i1 false
%24 = icmp ne i64 %22, 0
%25 = select i1 %23, i1 %24, i1 false
br i1 %25, label %29, label %26
26: ; preds = %8
%27 = tail call i32 @perror(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%28 = tail call i32 @exit(i32 -1)
unreachable
29: ; preds = %8
%30 = icmp eq i64 %15, 0
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%32 = load i8*, i8** %9
br i1 %30, label %33, label %35
33: ; preds = %29
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8* %32)
br label %38
35: ; preds = %29
%36 = load i8*, i8** %13
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %32, i8* %36)
br label %38
38: ; preds = %35, %33
%39 = load i8*, i8** %16
%40 = load i32, i32* @R_OK
%41 = tail call i32 @access(i8* %39, i32 %40)
%42 = icmp ne i32 %41, -1
%43 = load i8*, i8** %20
%44 = load i32, i32* @R_OK
%45 = tail call i32 @access(i8* %43, i32 %44)
%46 = icmp ne i32 %45, -1
%47 = and i1 %42, %46
br i1 %47, label %51, label %48
48: ; preds = %38
%49 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%50 = tail call i32 @exit(i32 -1)
unreachable
51: ; preds = %38
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @.str.7, i64 0, i64 0))
%53 = load i8*, i8** %20
%54 = tail call i32* @fopen(i8* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%55 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%56 = call i32 @feof(i32* %54)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %79
58: ; preds = %51, %74
%59 = call i32 @fgets(i8* %55, i32 1024, i32* %54)
%60 = call i32 @strlen(i8* %55)
%61 = zext i32 %60 to i64
br label %62
62: ; preds = %67, %58
%63 = phi i64 [ %64, %67 ], [ %61, %58 ]
%64 = add nsw i64 %63, -1
%65 = trunc i64 %63 to i32
%66 = icmp sgt i32 %65, 0
br i1 %66, label %67, label %74
67: ; preds = %62
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %64
%69 = load i8, i8* %68
%70 = icmp eq i8 %69, 10
br i1 %70, label %71, label %62
71: ; preds = %67
%72 = and i64 %64, 4294967295
%73 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %72
store i8 0, i8* %73
br label %74
74: ; preds = %62, %71
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8* %55)
%76 = call i32 @memset(i8* %55, i32 0, i32 1024)
%77 = call i32 @feof(i32* %54)
%78 = icmp eq i32 %77, 0
br i1 %78, label %58, label %79
79: ; preds = %74, %51
%80 = call i32 @fclose(i32* %54)
%81 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%82 = load i8*, i8** %16
%83 = call i32* @fopen(i8* %82, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%84 = call i32 @memset(i8* %55, i32 0, i32 1024)
%85 = call i32 @feof(i32* %83)
%86 = icmp eq i32 %85, 0
br i1 %86, label %87, label %92
87: ; preds = %79, %87
%88 = call i32 @fgets(i8* %55, i32 1024, i32* %83)
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %55)
%90 = call i32 @feof(i32* %83)
%91 = icmp eq i32 %90, 0
br i1 %91, label %87, label %92
92: ; preds = %87, %79
%93 = call i32 @fclose(i32* %83)
ret i32 0
}