#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*/ cleanUp(int, char **, char **);
int /*<<< orphan*/ display_on_framebuffer();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getrand(int);
int /*<<< orphan*/ htmlBody();
int /*<<< orphan*/ htmlFooter();
int /*<<< orphan*/ htmlHeaderNocache(char *);
char *itostr(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void display(int form_method, char **getvars, char **postvars) {
  htmlHeaderNocache("AWG Demo	Web	Page");
  htmlBody();
  printf("\n<img border=\"0\"	src=\"/img.png?id=%s\" align=\"left\">\n",
         itostr(getrand(6), 6, 1, 1));
  printf("<p><font face=\"Tahoma\" size=\"7\">DONE\n</font></p>");
  htmlFooter();
  fflush(stdout);
  cleanUp(form_method, getvars, postvars);
  display_on_framebuffer();
  return;
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xe56(%rip),%rdi
call   1070 <htmlHeaderNocache@plt>
mov    $0x0,%al
call   1050 <htmlBody@plt>
mov    $0x6,%edi
call   10b0 <getrand@plt>
mov    %eax,%edi
mov    $0x6,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1090 <itostr@plt>
mov    %rax,%rsi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   10a0 <htmlFooter@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1080 <cleanUp@plt>
mov    $0x0,%al
call   1040 <display_on_framebuffer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe5d(%rip),%rdi
call   1070 <htmlHeaderNocache@plt>
xor    %eax,%eax
call   1050 <htmlBody@plt>
mov    $0x6,%edi
call   10b0 <getrand@plt>
mov    %eax,%edi
mov    $0x6,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1090 <itostr@plt>
lea    0xe3c(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe60(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   10a0 <htmlFooter@plt>
mov    0x2de4(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1080 <cleanUp@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <display_on_framebuffer@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"AWG Demo\09Web\09Page\00"
@.str.1 = [53 x i8] c"\0A<img border=\220\22\09src=\22/img.png?id=%s\22 align=\22left\22>\0A\00"
@.str.2 = [49 x i8] c"<p><font face=\22Tahoma\22 size=\227\22>DONE\0A</font></p>\00"
@stdout = global i32 0
define void @display(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = call i32 @htmlHeaderNocache(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @htmlBody()
%9 = call i32 @getrand(i32 6)
%10 = call i8* @itostr(i32 %9, i32 6, i32 1, i32 1)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (...) @htmlFooter()
%14 = load i32, i32* @stdout
%15 = call i32 @fflush(i32 %14)
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = load i8**, i8*** %6
%19 = call i32 @cleanUp(i32 %16, i8** %17, i8** %18)
%20 = call i32 (...) @display_on_framebuffer()
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"AWG Demo\09Web\09Page\00"
@.str.1 = [53 x i8] c"\0A<img border=\220\22\09src=\22/img.png?id=%s\22 align=\22left\22>\0A\00"
@.str.2 = [49 x i8] c"<p><font face=\22Tahoma\22 size=\227\22>DONE\0A</font></p>\00"
@stdout = global i32 0
define void @display(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 @htmlHeaderNocache(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @htmlBody()
%6 = tail call i32 @getrand(i32 6)
%7 = tail call i8* @itostr(i32 %6, i32 6, i32 1, i32 1)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 (...) @htmlFooter()
%11 = load i32, i32* @stdout
%12 = tail call i32 @fflush(i32 %11)
%13 = tail call i32 @cleanUp(i32 %0, i8** %1, i8** %2)
%14 = tail call i32 (...) @display_on_framebuffer()
ret void
}