#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 /*<<< orphan*/ printf(char *, ...);
void cgi_show_header(char *bgcolor) {
  printf("Content-Type: text/html\n\n<html><head>\n");
  printf("<meta http-equiv=Content-Type content=\"text/html; charset=%s\">\n",
         "utf-8");
  printf("<meta http-equiv=Author content=\"Alexander B. Lavrinenko\">\n");
  printf("<meta http-equiv=Pragma content=no-cache>\n");
  printf("<meta name=Generator content=\"%s Version %s\">\n", "LibCGI",
         "0.5.2");
  printf("<meta name=Application content=\"%s\">\n", "MyApp");
  printf("</head><body bgcolor=\"%s\" leftmargin=0 rightmargin=0 topmargin=0 "
         "marginwidth=0 marginheight=0>\n",
         bgcolor);
}


x86 assembly (clang, -O0):
<cgi_show_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
lea    0xf2f(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf72(%rip),%rdi
lea    0xf9a(%rip),%rsi
lea    0xf9a(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf92(%rip),%rdi
lea    0xfb1(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfa5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgi_show_header>:
push   %rbx
mov    %rdi,%rbx
lea    0xfe3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
lea    0xf02(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfe8(%rip),%rdi
call   1030 <puts@plt>
lea    0x1017(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
lea    0xf0a(%rip),%rsi
lea    0xf0a(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
lea    0xf21(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf19(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Content-Type: text/html\0A\0A<html><head>\0A\00"
@.str.1 = [64 x i8] c"<meta http-equiv=Content-Type content=\22text/html; charset=%s\22>\0A\00"
@.str.2 = [6 x i8] c"utf-8\00"
@.str.3 = [60 x i8] c"<meta http-equiv=Author content=\22Alexander B. Lavrinenko\22>\0A\00"
@.str.4 = [43 x i8] c"<meta http-equiv=Pragma content=no-cache>\0A\00"
@.str.5 = [47 x i8] c"<meta name=Generator content=\22%s Version %s\22>\0A\00"
@.str.6 = [7 x i8] c"LibCGI\00"
@.str.7 = [6 x i8] c"0.5.2\00"
@.str.8 = [38 x i8] c"<meta name=Application content=\22%s\22>\0A\00"
@.str.9 = [6 x i8] c"MyApp\00"
@.str.10 = [96 x i8] c"</head><body bgcolor=\22%s\22 leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0>\0A\00"
define void @cgi_show_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%9 = load i8*, i8** %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.10, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [64 x i8] c"<meta http-equiv=Content-Type content=\22text/html; charset=%s\22>\0A\00"
@.str.2 = [6 x i8] c"utf-8\00"
@.str.5 = [47 x i8] c"<meta name=Generator content=\22%s Version %s\22>\0A\00"
@.str.6 = [7 x i8] c"LibCGI\00"
@.str.7 = [6 x i8] c"0.5.2\00"
@.str.8 = [38 x i8] c"<meta name=Application content=\22%s\22>\0A\00"
@.str.9 = [6 x i8] c"MyApp\00"
@.str.10 = [96 x i8] c"</head><body bgcolor=\22%s\22 leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0>\0A\00"
@str = [38 x i8] c"Content-Type: text/html\0A\0A<html><head>\00"
@str.11 = [59 x i8] c"<meta http-equiv=Author content=\22Alexander B. Lavrinenko\22>\00"
@str.12 = [42 x i8] c"<meta http-equiv=Pragma content=no-cache>\00"
define void @cgi_show_header(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.11, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.12, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @.str.10, i64 0, i64 0), i8* %0)
ret void
}