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

/* Variables and functions */
char **getCGIvars();
char *gogetenv(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  char **pVars;
  int loopCount = 1000;
  time_t second;
  printf("Content-type: text/html\n\n");
  printf("<html>\n");
  printf("<head><title>CGI Output</title></head>\n");
  printf("<body>\n");
  printf("<H1>CGI Test Program</H1>\n");
  printf("<P>This program displays the CGI Enviroment</P>\n");
  printf("<H2>Environment Variables<A NAME=\"env\"></A></H2>\n");
  printf("<P>REQUEST METHOD = %s</P>\n", gogetenv("REQUEST_METHOD"));
  printf("<P>QUERY STRING = %s</P>\n", gogetenv("QUERY_STRING"));
  printf("<P>GATEWAY INTERFACE = %s</P>\n", gogetenv("GATEWAY_INTERFACE"));
  printf("<P>SCRIPT NAME = %s</P>\n", gogetenv("SCRIPT_NAME"));
  printf("<P>PATH TRANSLATED = %s</P>\n", gogetenv("PATH_TRANSLATED"));
  printf("<P>PATH INFO = %s</P>\n", gogetenv("PATH_INFO"));
  printf("<P>HTTP HOST = %s</P>\n", gogetenv("HTTP_HOST"));
  printf("<P>HTTP ACCEPT = %s</P>\n", gogetenv("HTTP_ACCEPT"));
  printf("<P>HTTP CONNECTION = %s</P>\n", gogetenv("HTTP_CONNECTION"));
  printf("<P>REMOTE USER = %s</P>\n", gogetenv("REMOTE_USER"));
  printf("<P>REMOTE HOST = %s</P>\n", gogetenv("REMOTE_HOST"));
  printf("<P>REMOTE ADDR = %s</P>\n", gogetenv("REMOTE_ADDR"));
  printf("<P>SERVER NAME = %s</P>\n", gogetenv("SERVER_NAME"));
  printf("<P>SERVER PORT = %s</P>\n", gogetenv("SERVER_PORT"));
  printf("<P>SERVER HOST = %s</P>\n", gogetenv("SERVER_HOST"));
  printf("<P>SERVER PROTOCOL = %s</P>\n", gogetenv("SERVER_PROTOCOL"));
  printf("<P>SERVER ADDR = %s</P>\n", gogetenv("SERVER_ADDR"));
  printf("<P>SERVER URL = %s</P>\n", gogetenv("SERVER_URL"));
  printf("<P>SERVER SOFTWARE = %s</P>\n", gogetenv("SERVER_SOFTWARE"));
  printf("<H2>Query String Variables<A NAME=\"query\"></A></H2>\n");
  pVars = getCGIvars();
  if (pVars) {
    while (*pVars && *(pVars + 1)) {
      printf("<p>%s = <b>%s</b></p>\n", *pVars, *(pVars + 1));
      pVars += 2;
    }
  } else {
    printf("<P>No query variables found</P>\n");
  }
  printf("</body>\n");
  printf("</html>\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3e8,-0x1c(%rbp)
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf36(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf42(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf51(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5f(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6b(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf75(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf79(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7f(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8b(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf97(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9f(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa7(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfaf(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb7(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfbf(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcb(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xf9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd7(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xfaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfde(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xfb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe9(%rip),%rdi
call   1050 <gogetenv@plt>
mov    %rax,%rsi
lea    0xfbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getCGIvars@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1464 <main+0x334>
jmp    13ff <main+0x2cf>
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmpq   $0x0,(%rcx)
mov    %al,-0x21(%rbp)
je     1421 <main+0x2f1>
mov    -0x18(%rbp),%rax
cmpq   $0x0,0x8(%rax)
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1431 <main+0x301>
jmp    145f <main+0x32f>
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xfa7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
jmp    13ff <main+0x2cf>
jmp    1472 <main+0x342>
lea    0xf9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0x11b5(%rip),%rdi
call   1030 <puts@plt>
lea    0x11c2(%rip),%rdi
call   1030 <puts@plt>
lea    0x11bd(%rip),%rdi
call   1030 <puts@plt>
lea    0x11d8(%rip),%rdi
call   1030 <puts@plt>
lea    0x11d3(%rip),%rdi
call   1030 <puts@plt>
lea    0x11e1(%rip),%rdi
call   1030 <puts@plt>
lea    0x1205(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7d(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xe55(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe89(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xe63(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe98(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xe6d(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea6(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xe81(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb2(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xe89(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xe99(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xe9d(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xea1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xea9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xeb9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xec9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefe(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xed9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf06(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xee1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf12(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xee9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1e(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xef9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf25(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xf01(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf30(%rip),%rdi
call   1060 <gogetenv@plt>
lea    0xf07(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1003(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getCGIvars@plt>
test   %rax,%rax
je     1411 <main+0x2d1>
mov    %rax,%rbx
mov    (%rax),%rsi
test   %rsi,%rsi
je     141d <main+0x2dd>
add    $0x10,%rbx
lea    0xefc(%rip),%r14
nopl   (%rax)
mov    -0x8(%rbx),%rdx
test   %rdx,%rdx
je     141d <main+0x2dd>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rsi
add    $0x10,%rbx
test   %rsi,%rsi
jne    13f0 <main+0x2b0>
jmp    141d <main+0x2dd>
lea    0xfe5(%rip),%rdi
call   1030 <puts@plt>
lea    0xff9(%rip),%rdi
call   1030 <puts@plt>
lea    0xff5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Content-type: text/html\0A\0A\00"
@.str.1 = [8 x i8] c"<html>\0A\00"
@.str.2 = [40 x i8] c"<head><title>CGI Output</title></head>\0A\00"
@.str.3 = [8 x i8] c"<body>\0A\00"
@.str.4 = [27 x i8] c"<H1>CGI Test Program</H1>\0A\00"
@.str.5 = [49 x i8] c"<P>This program displays the CGI Enviroment</P>\0A\00"
@.str.6 = [50 x i8] c"<H2>Environment Variables<A NAME=\22env\22></A></H2>\0A\00"
@.str.7 = [28 x i8] c"<P>REQUEST METHOD = %s</P>\0A\00"
@.str.8 = [15 x i8] c"REQUEST_METHOD\00"
@.str.9 = [26 x i8] c"<P>QUERY STRING = %s</P>\0A\00"
@.str.10 = [13 x i8] c"QUERY_STRING\00"
@.str.11 = [31 x i8] c"<P>GATEWAY INTERFACE = %s</P>\0A\00"
@.str.12 = [18 x i8] c"GATEWAY_INTERFACE\00"
@.str.13 = [25 x i8] c"<P>SCRIPT NAME = %s</P>\0A\00"
@.str.14 = [12 x i8] c"SCRIPT_NAME\00"
@.str.15 = [29 x i8] c"<P>PATH TRANSLATED = %s</P>\0A\00"
@.str.16 = [16 x i8] c"PATH_TRANSLATED\00"
@.str.17 = [23 x i8] c"<P>PATH INFO = %s</P>\0A\00"
@.str.18 = [10 x i8] c"PATH_INFO\00"
@.str.19 = [23 x i8] c"<P>HTTP HOST = %s</P>\0A\00"
@.str.20 = [10 x i8] c"HTTP_HOST\00"
@.str.21 = [25 x i8] c"<P>HTTP ACCEPT = %s</P>\0A\00"
@.str.22 = [12 x i8] c"HTTP_ACCEPT\00"
@.str.23 = [29 x i8] c"<P>HTTP CONNECTION = %s</P>\0A\00"
@.str.24 = [16 x i8] c"HTTP_CONNECTION\00"
@.str.25 = [25 x i8] c"<P>REMOTE USER = %s</P>\0A\00"
@.str.26 = [12 x i8] c"REMOTE_USER\00"
@.str.27 = [25 x i8] c"<P>REMOTE HOST = %s</P>\0A\00"
@.str.28 = [12 x i8] c"REMOTE_HOST\00"
@.str.29 = [25 x i8] c"<P>REMOTE ADDR = %s</P>\0A\00"
@.str.30 = [12 x i8] c"REMOTE_ADDR\00"
@.str.31 = [25 x i8] c"<P>SERVER NAME = %s</P>\0A\00"
@.str.32 = [12 x i8] c"SERVER_NAME\00"
@.str.33 = [25 x i8] c"<P>SERVER PORT = %s</P>\0A\00"
@.str.34 = [12 x i8] c"SERVER_PORT\00"
@.str.35 = [25 x i8] c"<P>SERVER HOST = %s</P>\0A\00"
@.str.36 = [12 x i8] c"SERVER_HOST\00"
@.str.37 = [29 x i8] c"<P>SERVER PROTOCOL = %s</P>\0A\00"
@.str.38 = [16 x i8] c"SERVER_PROTOCOL\00"
@.str.39 = [25 x i8] c"<P>SERVER ADDR = %s</P>\0A\00"
@.str.40 = [12 x i8] c"SERVER_ADDR\00"
@.str.41 = [24 x i8] c"<P>SERVER URL = %s</P>\0A\00"
@.str.42 = [11 x i8] c"SERVER_URL\00"
@.str.43 = [29 x i8] c"<P>SERVER SOFTWARE = %s</P>\0A\00"
@.str.44 = [16 x i8] c"SERVER_SOFTWARE\00"
@.str.45 = [53 x i8] c"<H2>Query String Variables<A NAME=\22query\22></A></H2>\0A\00"
@.str.46 = [23 x i8] c"<p>%s = <b>%s</b></p>\0A\00"
@.str.47 = [33 x i8] c"<P>No query variables found</P>\0A\00"
@.str.48 = [9 x i8] c"</body>\0A\00"
@.str.49 = [9 x i8] c"</html>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1000, i32* %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%16 = call i8* @gogetenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %16)
%18 = call i8* @gogetenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* %18)
%20 = call i8* @gogetenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i8* %20)
%22 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* %22)
%24 = call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), i8* %24)
%26 = call i8* @gogetenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* %26)
%28 = call i8* @gogetenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i8* %28)
%30 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0), i8* %30)
%32 = call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0), i8* %32)
%34 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.25, i64 0, i64 0), i8* %34)
%36 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.27, i64 0, i64 0), i8* %36)
%38 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.30, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.29, i64 0, i64 0), i8* %38)
%40 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.32, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.31, i64 0, i64 0), i8* %40)
%42 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0))
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.33, i64 0, i64 0), i8* %42)
%44 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.35, i64 0, i64 0), i8* %44)
%46 = call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.38, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.37, i64 0, i64 0), i8* %46)
%48 = call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.40, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.39, i64 0, i64 0), i8* %48)
%50 = call i8* @gogetenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.42, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.41, i64 0, i64 0), i8* %50)
%52 = call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.44, i64 0, i64 0))
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.43, i64 0, i64 0), i8* %52)
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.45, i64 0, i64 0))
%55 = call i8** (...) @getCGIvars()
store i8** %55, i8*** %6
%56 = load i8**, i8*** %6
%57 = icmp ne i8** %56, null
br i1 %57, label %58, label %80
58: ; preds = %2
br label %59
59: ; preds = %70, %58
%60 = load i8**, i8*** %6
%61 = load i8*, i8** %60
%62 = icmp ne i8* %61, null
br i1 %62, label %63, label %68
63: ; preds = %59
%64 = load i8**, i8*** %6
%65 = getelementptr inbounds i8*, i8** %64, i64 1
%66 = load i8*, i8** %65
%67 = icmp ne i8* %66, null
br label %68
68: ; preds = %63, %59
%69 = phi i1 [ false, %59 ], [ %67, %63 ]
br i1 %69, label %70, label %79
70: ; preds = %68
%71 = load i8**, i8*** %6
%72 = load i8*, i8** %71
%73 = load i8**, i8*** %6
%74 = getelementptr inbounds i8*, i8** %73, i64 1
%75 = load i8*, i8** %74
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.46, i64 0, i64 0), i8* %72, i8* %75)
%77 = load i8**, i8*** %6
%78 = getelementptr inbounds i8*, i8** %77, i64 2
store i8** %78, i8*** %6
br label %59
79: ; preds = %68
br label %82
80: ; preds = %2
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.47, i64 0, i64 0))
br label %82
82: ; preds = %80, %79
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.48, i64 0, i64 0))
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.49, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.7 = [28 x i8] c"<P>REQUEST METHOD = %s</P>\0A\00"
@.str.8 = [15 x i8] c"REQUEST_METHOD\00"
@.str.9 = [26 x i8] c"<P>QUERY STRING = %s</P>\0A\00"
@.str.10 = [13 x i8] c"QUERY_STRING\00"
@.str.11 = [31 x i8] c"<P>GATEWAY INTERFACE = %s</P>\0A\00"
@.str.12 = [18 x i8] c"GATEWAY_INTERFACE\00"
@.str.13 = [25 x i8] c"<P>SCRIPT NAME = %s</P>\0A\00"
@.str.14 = [12 x i8] c"SCRIPT_NAME\00"
@.str.15 = [29 x i8] c"<P>PATH TRANSLATED = %s</P>\0A\00"
@.str.16 = [16 x i8] c"PATH_TRANSLATED\00"
@.str.17 = [23 x i8] c"<P>PATH INFO = %s</P>\0A\00"
@.str.18 = [10 x i8] c"PATH_INFO\00"
@.str.19 = [23 x i8] c"<P>HTTP HOST = %s</P>\0A\00"
@.str.20 = [10 x i8] c"HTTP_HOST\00"
@.str.21 = [25 x i8] c"<P>HTTP ACCEPT = %s</P>\0A\00"
@.str.22 = [12 x i8] c"HTTP_ACCEPT\00"
@.str.23 = [29 x i8] c"<P>HTTP CONNECTION = %s</P>\0A\00"
@.str.24 = [16 x i8] c"HTTP_CONNECTION\00"
@.str.25 = [25 x i8] c"<P>REMOTE USER = %s</P>\0A\00"
@.str.26 = [12 x i8] c"REMOTE_USER\00"
@.str.27 = [25 x i8] c"<P>REMOTE HOST = %s</P>\0A\00"
@.str.28 = [12 x i8] c"REMOTE_HOST\00"
@.str.29 = [25 x i8] c"<P>REMOTE ADDR = %s</P>\0A\00"
@.str.30 = [12 x i8] c"REMOTE_ADDR\00"
@.str.31 = [25 x i8] c"<P>SERVER NAME = %s</P>\0A\00"
@.str.32 = [12 x i8] c"SERVER_NAME\00"
@.str.33 = [25 x i8] c"<P>SERVER PORT = %s</P>\0A\00"
@.str.34 = [12 x i8] c"SERVER_PORT\00"
@.str.35 = [25 x i8] c"<P>SERVER HOST = %s</P>\0A\00"
@.str.36 = [12 x i8] c"SERVER_HOST\00"
@.str.37 = [29 x i8] c"<P>SERVER PROTOCOL = %s</P>\0A\00"
@.str.38 = [16 x i8] c"SERVER_PROTOCOL\00"
@.str.39 = [25 x i8] c"<P>SERVER ADDR = %s</P>\0A\00"
@.str.40 = [12 x i8] c"SERVER_ADDR\00"
@.str.41 = [24 x i8] c"<P>SERVER URL = %s</P>\0A\00"
@.str.42 = [11 x i8] c"SERVER_URL\00"
@.str.43 = [29 x i8] c"<P>SERVER SOFTWARE = %s</P>\0A\00"
@.str.44 = [16 x i8] c"SERVER_SOFTWARE\00"
@.str.46 = [23 x i8] c"<p>%s = <b>%s</b></p>\0A\00"
@str = [25 x i8] c"Content-type: text/html\0A\00"
@str.50 = [7 x i8] c"<html>\00"
@str.51 = [39 x i8] c"<head><title>CGI Output</title></head>\00"
@str.52 = [7 x i8] c"<body>\00"
@str.53 = [26 x i8] c"<H1>CGI Test Program</H1>\00"
@str.54 = [48 x i8] c"<P>This program displays the CGI Enviroment</P>\00"
@str.55 = [49 x i8] c"<H2>Environment Variables<A NAME=\22env\22></A></H2>\00"
@str.56 = [52 x i8] c"<H2>Query String Variables<A NAME=\22query\22></A></H2>\00"
@str.57 = [32 x i8] c"<P>No query variables found</P>\00"
@str.58 = [8 x i8] c"</body>\00"
@str.59 = [8 x i8] c"</html>\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.50, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.51, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.52, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.53, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.54, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.55, i64 0, i64 0))
%10 = tail call i8* @gogetenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i8* %10)
%12 = tail call i8* @gogetenv(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* %12)
%14 = tail call i8* @gogetenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i8* %14)
%16 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* %16)
%18 = tail call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), i8* %18)
%20 = tail call i8* @gogetenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* %20)
%22 = tail call i8* @gogetenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.19, i64 0, i64 0), i8* %22)
%24 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0))
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0), i8* %24)
%26 = tail call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0), i8* %26)
%28 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0))
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.25, i64 0, i64 0), i8* %28)
%30 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0))
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.27, i64 0, i64 0), i8* %30)
%32 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.30, i64 0, i64 0))
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.29, i64 0, i64 0), i8* %32)
%34 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.32, i64 0, i64 0))
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.31, i64 0, i64 0), i8* %34)
%36 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.34, i64 0, i64 0))
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.33, i64 0, i64 0), i8* %36)
%38 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0))
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.35, i64 0, i64 0), i8* %38)
%40 = tail call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.38, i64 0, i64 0))
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.37, i64 0, i64 0), i8* %40)
%42 = tail call i8* @gogetenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.40, i64 0, i64 0))
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.39, i64 0, i64 0), i8* %42)
%44 = tail call i8* @gogetenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.42, i64 0, i64 0))
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.41, i64 0, i64 0), i8* %44)
%46 = tail call i8* @gogetenv(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.44, i64 0, i64 0))
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.43, i64 0, i64 0), i8* %46)
%48 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.56, i64 0, i64 0))
%49 = tail call i8** (...) @getCGIvars()
%50 = icmp eq i8** %49, null
br i1 %50, label %65, label %51
51: ; preds = %2
%52 = load i8*, i8** %49
%53 = icmp eq i8* %52, null
br i1 %53, label %67, label %54
54: ; preds = %51, %60
%55 = phi i8* [ %63, %60 ], [ %52, %51 ]
%56 = phi i8** [ %62, %60 ], [ %49, %51 ]
%57 = getelementptr inbounds i8*, i8** %56, i64 1
%58 = load i8*, i8** %57
%59 = icmp eq i8* %58, null
br i1 %59, label %67, label %60
60: ; preds = %54
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.46, i64 0, i64 0), i8* %55, i8* %58)
%62 = getelementptr inbounds i8*, i8** %56, i64 2
%63 = load i8*, i8** %62
%64 = icmp eq i8* %63, null
br i1 %64, label %67, label %54
65: ; preds = %2
%66 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.57, i64 0, i64 0))
br label %67
67: ; preds = %60, %54, %51, %65
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.58, i64 0, i64 0))
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.59, i64 0, i64 0))
ret i32 0
}