#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*/ cgi_show_footer();
int /*<<< orphan*/ cgi_show_header(char *);
char *getenv(char *);
int /*<<< orphan*/ printf(char *, ...);
void show_get_form(void) {
  cgi_show_header("#ffffff");
  printf("<center><table width=100%% height=100%% border=0><tr><td "
         "align=center valign=center>\n");
  printf("This page generated after using GET form submit method.</td></tr>\n");
  printf("<tr><td align=left valign=top><pre>\n");
  printf("</pre></td></tr>\n");
  printf("<tr><td align=center valign=center><form method=get action=%s>\n",
         getenv("SCRIPT_NAME"));
  printf("<input type=submit value='Return to main "
         "page'></form></td></tr></table>\n");
  cgi_show_footer();
}


x86 assembly (clang, -O0):
<show_get_form>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1050 <cgi_show_header@plt>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf89(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xf3a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf78(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <cgi_show_footer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_get_form>:
push   %rax
lea    0xea8(%rip),%rdi
call   1060 <cgi_show_header@plt>
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf38(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf86(%rip),%rdi
call   1040 <puts@plt>
lea    0xf08(%rip),%rdi
call   1030 <getenv@plt>
lea    0xebc(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf6e(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <cgi_show_footer@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"#ffffff\00"
@.str.1 = [86 x i8] c"<center><table width=100%% height=100%% border=0><tr><td align=center valign=center>\0A\00"
@.str.2 = [67 x i8] c"This page generated after using GET form submit method.</td></tr>\0A\00"
@.str.3 = [37 x i8] c"<tr><td align=left valign=top><pre>\0A\00"
@.str.4 = [18 x i8] c"</pre></td></tr>\0A\00"
@.str.5 = [64 x i8] c"<tr><td align=center valign=center><form method=get action=%s>\0A\00"
@.str.6 = [12 x i8] c"SCRIPT_NAME\00"
@.str.7 = [74 x i8] c"<input type=submit value='Return to main page'></form></td></tr></table>\0A\00"
define void @show_get_form() {
%1 = call i32 @cgi_show_header(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%6 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 (...) @cgi_show_footer()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"#ffffff\00"
@.str.1 = [86 x i8] c"<center><table width=100%% height=100%% border=0><tr><td align=center valign=center>\0A\00"
@.str.5 = [64 x i8] c"<tr><td align=center valign=center><form method=get action=%s>\0A\00"
@.str.6 = [12 x i8] c"SCRIPT_NAME\00"
@str = [66 x i8] c"This page generated after using GET form submit method.</td></tr>\00"
@str.8 = [36 x i8] c"<tr><td align=left valign=top><pre>\00"
@str.9 = [17 x i8] c"</pre></td></tr>\00"
@str.10 = [73 x i8] c"<input type=submit value='Return to main page'></form></td></tr></table>\00"
define void @show_get_form() {
%1 = tail call i32 @cgi_show_header(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.8, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.9, i64 0, i64 0))
%6 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.10, i64 0, i64 0))
%9 = tail call i32 (...) @cgi_show_footer()
ret void
}