#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 dummy;
};

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
char *getenv(char *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void ServeHeaderTable(char *sSubHead) {
  time_t tTime;
  struct tm tmTime;
  printf("<table width=\"760\" border=\"0\" cellspacing=\"0\" "
         "cellpadding=\"0\">\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h1>The Linux Audio "
         "Backstop</h1></td>\n");
  printf("</tr>\n");
  printf("<tr align=\"center\">\n");
  printf("<td width=\"760\" colspan=\"2\"><h2>%s</h2></td>\n", sSubHead);
  printf("</tr>\n");
  printf("<tr>\n");
  tTime = time(&tTime);
  tmTime = *localtime(&tTime);
  printf("<td width=\"380\" align=\"left\"><h4>Hostname: %s</h4></td>",
         getenv("HTTP_HOST"));
  printf("<td width=\"380\" align=\"right\"><h4>%s</h4></td>\n", ctime(&tTime));
  printf("</tr>\n");
  printf("</table>\n");
}


x86 assembly (clang, -O0):
<ServeHeaderTable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xc(%rbp),%rdi
call   1070 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
lea    0xf1b(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xc(%rbp),%rdi
call   1050 <ctime@plt>
mov    %rax,%rsi
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf10(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ServeHeaderTable>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r15
lea    0xf2d(%rip),%rdi
call   1050 <puts@plt>
lea    0xfa3(%rip),%rbx
mov    %rbx,%rdi
call   1050 <puts@plt>
lea    0xf51(%rip),%rdi
call   1050 <puts@plt>
lea    0xfa1(%rip),%r14
mov    %r14,%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
lea    0xe4f(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1050 <puts@plt>
lea    0xf6c(%rip),%rdi
call   1050 <puts@plt>
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1080 <time@plt>
mov    %eax,0xc(%rsp)
mov    %rbx,%rdi
call   1040 <localtime@plt>
lea    0xe77(%rip),%rdi
call   1030 <getenv@plt>
lea    0xe33(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   1060 <ctime@plt>
lea    0xe5c(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1050 <puts@plt>
lea    0xf14(%rip),%rdi
call   1050 <puts@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [64 x i8] c"<table width=\22760\22 border=\220\22 cellspacing=\220\22 cellpadding=\220\22>\0A\00"
@.str.1 = [21 x i8] c"<tr align=\22center\22>\0A\00"
@.str.2 = [68 x i8] c"<td width=\22760\22 colspan=\222\22><h1>The Linux Audio Backstop</h1></td>\0A\00"
@.str.3 = [7 x i8] c"</tr>\0A\00"
@.str.4 = [46 x i8] c"<td width=\22760\22 colspan=\222\22><h2>%s</h2></td>\0A\00"
@.str.5 = [6 x i8] c"<tr>\0A\00"
@.str.6 = [56 x i8] c"<td width=\22380\22 align=\22left\22><h4>Hostname: %s</h4></td>\00"
@.str.7 = [10 x i8] c"HTTP_HOST\00"
@.str.8 = [48 x i8] c"<td width=\22380\22 align=\22right\22><h4>%s</h4></td>\0A\00"
@.str.9 = [10 x i8] c"</table>\0A\00"
define void @ServeHeaderTable(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm
store i8* %0, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%10 = load i8*, i8** %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @time(i32* %3)
store i32 %14, i32* %3
%15 = call %struct.tm* @localtime(i32* %3)
%16 = bitcast %struct.tm* %4 to i8*
%17 = bitcast %struct.tm* %15 to i8*
%18 = call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i8* %18)
%20 = call i8* @ctime(i32* %3)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str.4 = [46 x i8] c"<td width=\22760\22 colspan=\222\22><h2>%s</h2></td>\0A\00"
@.str.6 = [56 x i8] c"<td width=\22380\22 align=\22left\22><h4>Hostname: %s</h4></td>\00"
@.str.7 = [10 x i8] c"HTTP_HOST\00"
@.str.8 = [48 x i8] c"<td width=\22380\22 align=\22right\22><h4>%s</h4></td>\0A\00"
@str = [63 x i8] c"<table width=\22760\22 border=\220\22 cellspacing=\220\22 cellpadding=\220\22>\00"
@str.11 = [67 x i8] c"<td width=\22760\22 colspan=\222\22><h1>The Linux Audio Backstop</h1></td>\00"
@str.13 = [20 x i8] c"<tr align=\22center\22>\00"
@str.15 = [5 x i8] c"<tr>\00"
@str.16 = [6 x i8] c"</tr>\00"
@str.17 = [9 x i8] c"</table>\00"
define void @ServeHeaderTable(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.13, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.11, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.13, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.16, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.15, i64 0, i64 0))
%12 = call i32 @time(i32* %2)
store i32 %12, i32* %2
%13 = call %struct.tm* @localtime(i32* %2)
%14 = call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0), i8* %14)
%16 = call i8* @ctime(i32* %2)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %16)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.16, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i64 0, i64 0))
ret void
}