#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ format_initial_capital(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
char *google_map_get_map_key(char *);
int /*<<< orphan*/ google_map_output_body(int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ google_map_output_heading(int /*<<< orphan*/ *,
                                             int /*<<< orphan*/, char *, char *,
                                             char *, char *, int /*<<< orphan*/,
                                             int /*<<< orphan*/, char *, char *,
                                             int, int, int);
int /*<<< orphan*/ google_map_output_heading_close(int /*<<< orphan*/ *);
int /*<<< orphan*/ google_map_output_rectangle(int /*<<< orphan*/ *, char *,
                                               char *, char *, char *);
int /*<<< orphan*/
google_map_output_rectangle_bounds_changed(int /*<<< orphan*/ *);
int /*<<< orphan*/
google_map_output_rectangle_copy_to_form(int /*<<< orphan*/ *);
void output_map(FILE *output_file, char *application_name,
                char *database_string, char *login_name, char *session,
                char *process_name, char *role_name) {
  char *google_map_key_data;
  char buffer[128];
  google_map_key_data = google_map_get_map_key(application_name);
  google_map_output_heading(
      output_file, format_initial_capital(buffer, process_name),
      google_map_key_data, (char *)0, (char *)0, application_name, 0, 0,
      "25.68821", "-80.84817", 10, 800, 550);
  google_map_output_rectangle(output_file, "25.65", "-80.85", "25.75",
                              "-80.74");
  google_map_output_heading_close(output_file);
  google_map_output_body(output_file, 1, "rectangle_bounds_changed()");
  google_map_output_rectangle_bounds_changed(output_file);
  fprintf(
      output_file,
      "<script language=JavaScript1.2 src=/javascript/timlib.js></script>\n");
  google_map_output_rectangle_copy_to_form(output_file);
  fprintf(
      output_file,
      "<form enctype=\"multipart/form-data\" method=post "
      "name=\"prompt_process\" "
      "action=\"/cgi-bin/post_hydrology_measurements_rectangle?%s+%s+%s+%s\" "
      "target=\"%s\">\n",
      application_name, login_name, session, role_name, "prompt_frame");
  fprintf(output_file,
          "<input type=hidden name=rectangle_southwest_latitude>\n"
          "<input type=hidden name=rectangle_southwest_longitude>\n"
          "<input type=hidden name=rectangle_northeast_latitude>\n"
          "<input type=hidden name=rectangle_northeast_longitude>\n");
  fprintf(output_file, "<td valign=middle>\n");
  fprintf(output_file,
          "<input type=button value=Submit onClick=\"rectangle_copy_to_form(); "
          "document.forms[0].submit(); window.close();\">\n");
  fprintf(output_file, "</form>\n</table>\n");
  fprintf(output_file, "</body>\n</html>\n");
}


x86 assembly (clang, -O0):
<output_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <google_map_get_map_key@plt>
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xc8(%rbp)
lea    -0xc0(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1050 <format_initial_capital@plt>
mov    -0xc8(%rbp),%rdi
mov    %eax,%esi
mov    -0x38(%rbp),%rdx
mov    -0x10(%rbp),%r9
xor    %eax,%eax
mov    %eax,%r8d
xor    %eax,%eax
lea    0xe02(%rip),%r10
lea    0xe04(%rip),%rax
mov    %r8,%rcx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
movl   $0xa,0x20(%rsp)
movl   $0x320,0x28(%rsp)
movl   $0x226,0x30(%rsp)
call   10a0 <google_map_output_heading@plt>
mov    -0x8(%rbp),%rdi
lea    0xdca(%rip),%rsi
lea    0xdc9(%rip),%rdx
lea    0xdc9(%rip),%rcx
lea    0xdc8(%rip),%r8
call   1030 <google_map_output_rectangle@plt>
mov    -0x8(%rbp),%rdi
call   1070 <google_map_output_heading_close@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
lea    0xdb1(%rip),%rdx
call   10b0 <google_map_output_body@plt>
mov    -0x8(%rbp),%rdi
call   1080 <google_map_output_rectangle_bounds_changed@plt>
mov    -0x8(%rbp),%rdi
lea    0xdb3(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <google_map_output_rectangle_copy_to_form@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    0x10(%rbp),%r9
lea    0xdcc(%rip),%rsi
lea    0xe5d(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe54(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1d(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf7f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf7f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_map>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,%rbp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1060 <google_map_get_map_key@plt>
mov    %rax,%r12
mov    %rsp,%rdi
mov    %rbp,%rsi
call   1050 <format_initial_capital@plt>
sub    $0x8,%rsp
lea    0xe28(%rip),%rbp
lea    0xe18(%rip),%r10
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r12,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %r13,%r9
push   $0x226
push   $0x320
push   $0xa
push   %rbp
push   %r10
push   $0x0
push   $0x0
call   10a0 <google_map_output_heading@plt>
add    $0x40,%rsp
lea    0xdf8(%rip),%rsi
lea    0xdf7(%rip),%rdx
lea    0xdf7(%rip),%rcx
lea    0xdf6(%rip),%r8
mov    %rbx,%rdi
call   1030 <google_map_output_rectangle@plt>
mov    %rbx,%rdi
call   1070 <google_map_output_heading_close@plt>
lea    0xde6(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
call   10c0 <google_map_output_body@plt>
mov    %rbx,%rdi
call   1080 <google_map_output_rectangle_bounds_changed@plt>
lea    0xde5(%rip),%rdi
mov    $0x43,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
mov    %rbx,%rdi
call   1040 <google_map_output_rectangle_copy_to_form@plt>
sub    $0x8,%rsp
lea    0xe9c(%rip),%rbp
lea    0xdfd(%rip),%rsi
mov    %rbx,%rdi
mov    %r13,%rdx
mov    %r15,%rcx
mov    %r14,%r8
mov    0xc8(%rsp),%r9
xor    %eax,%eax
push   %rbp
call   1090 <fprintf@plt>
add    $0x10,%rsp
lea    0xe7b(%rip),%rdi
mov    $0xda,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xf3d(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xf38(%rip),%rdi
mov    $0x71,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xf91(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
lea    0xf8a(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10b0 <fwrite@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"25.68821\00"
@.str.1 = [10 x i8] c"-80.84817\00"
@.str.2 = [6 x i8] c"25.65\00"
@.str.3 = [7 x i8] c"-80.85\00"
@.str.4 = [6 x i8] c"25.75\00"
@.str.5 = [7 x i8] c"-80.74\00"
@.str.6 = [27 x i8] c"rectangle_bounds_changed()\00"
@.str.7 = [68 x i8] c"<script language=JavaScript1.2 src=/javascript/timlib.js></script>\0A\00"
@.str.8 = [152 x i8] c"<form enctype=\22multipart/form-data\22 method=post name=\22prompt_process\22 action=\22/cgi-bin/post_hydrology_measurements_rectangle?%s+%s+%s+%s\22 target=\22%s\22>\0A\00"
@.str.9 = [13 x i8] c"prompt_frame\00"
@.str.10 = [219 x i8] c"<input type=hidden name=rectangle_southwest_latitude>\0A<input type=hidden name=rectangle_southwest_longitude>\0A<input type=hidden name=rectangle_northeast_latitude>\0A<input type=hidden name=rectangle_northeast_longitude>\0A\00"
@.str.11 = [20 x i8] c"<td valign=middle>\0A\00"
@.str.12 = [114 x i8] c"<input type=button value=Submit onClick=\22rectangle_copy_to_form(); document.forms[0].submit(); window.close();\22>\0A\00"
@.str.13 = [18 x i8] c"</form>\0A</table>\0A\00"
@.str.14 = [17 x i8] c"</body>\0A</html>\0A\00"
define void @output_map(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca [128 x i8]
store i32* %0, i32** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8* %6, i8** %14
%17 = load i8*, i8** %9
%18 = call i8* @google_map_get_map_key(i8* %17)
store i8* %18, i8** %15
%19 = load i32*, i32** %8
%20 = getelementptr inbounds [128 x i8], [128 x i8]* %16, i64 0, i64 0
%21 = load i8*, i8** %13
%22 = call i32 @format_initial_capital(i8* %20, i8* %21)
%23 = load i8*, i8** %15
%24 = load i8*, i8** %9
%25 = call i32 @google_map_output_heading(i32* %19, i32 %22, i8* %23, i8* null, i8* null, i8* %24, i32 0, i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 800, i32 550)
%26 = load i32*, i32** %8
%27 = call i32 @google_map_output_rectangle(i32* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%28 = load i32*, i32** %8
%29 = call i32 @google_map_output_heading_close(i32* %28)
%30 = load i32*, i32** %8
%31 = call i32 @google_map_output_body(i32* %30, i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%32 = load i32*, i32** %8
%33 = call i32 @google_map_output_rectangle_bounds_changed(i32* %32)
%34 = load i32*, i32** %8
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0))
%36 = load i32*, i32** %8
%37 = call i32 @google_map_output_rectangle_copy_to_form(i32* %36)
%38 = load i32*, i32** %8
%39 = load i8*, i8** %9
%40 = load i8*, i8** %11
%41 = load i8*, i8** %12
%42 = load i8*, i8** %14
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.8, i64 0, i64 0), i8* %39, i8* %40, i8* %41, i8* %42, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%44 = load i32*, i32** %8
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([219 x i8], [219 x i8]* @.str.10, i64 0, i64 0))
%46 = load i32*, i32** %8
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%48 = load i32*, i32** %8
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.12, i64 0, i64 0))
%50 = load i32*, i32** %8
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
%52 = load i32*, i32** %8
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"25.68821\00"
@.str.1 = [10 x i8] c"-80.84817\00"
@.str.2 = [6 x i8] c"25.65\00"
@.str.3 = [7 x i8] c"-80.85\00"
@.str.4 = [6 x i8] c"25.75\00"
@.str.5 = [7 x i8] c"-80.74\00"
@.str.6 = [27 x i8] c"rectangle_bounds_changed()\00"
@.str.7 = [68 x i8] c"<script language=JavaScript1.2 src=/javascript/timlib.js></script>\0A\00"
@.str.8 = [152 x i8] c"<form enctype=\22multipart/form-data\22 method=post name=\22prompt_process\22 action=\22/cgi-bin/post_hydrology_measurements_rectangle?%s+%s+%s+%s\22 target=\22%s\22>\0A\00"
@.str.9 = [13 x i8] c"prompt_frame\00"
@.str.10 = [219 x i8] c"<input type=hidden name=rectangle_southwest_latitude>\0A<input type=hidden name=rectangle_southwest_longitude>\0A<input type=hidden name=rectangle_northeast_latitude>\0A<input type=hidden name=rectangle_northeast_longitude>\0A\00"
@.str.11 = [20 x i8] c"<td valign=middle>\0A\00"
@.str.12 = [114 x i8] c"<input type=button value=Submit onClick=\22rectangle_copy_to_form(); document.forms[0].submit(); window.close();\22>\0A\00"
@.str.13 = [18 x i8] c"</form>\0A</table>\0A\00"
@.str.14 = [17 x i8] c"</body>\0A</html>\0A\00"
define void @output_map(i32* %0, i8* %1, i8* nocapture readnone %2, i8* %3, i8* %4, i8* %5, i8* %6) {
%8 = alloca [128 x i8]
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%10 = tail call i8* @google_map_get_map_key(i8* %1)
%11 = call i32 @format_initial_capital(i8* %9, i8* %5)
%12 = call i32 @google_map_output_heading(i32* %0, i32 %11, i8* %10, i8* null, i8* null, i8* %1, i32 0, i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 800, i32 550)
%13 = call i32 @google_map_output_rectangle(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @google_map_output_heading_close(i32* %0)
%15 = call i32 @google_map_output_body(i32* %0, i32 1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 @google_map_output_rectangle_bounds_changed(i32* %0)
%17 = call i64 @fwrite(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0), i64 67, i64 1, i32* %0)
%18 = call i32 @google_map_output_rectangle_copy_to_form(i32* %0)
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.8, i64 0, i64 0), i8* %1, i8* %3, i8* %4, i8* %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%20 = call i64 @fwrite(i8* getelementptr inbounds ([219 x i8], [219 x i8]* @.str.10, i64 0, i64 0), i64 218, i64 1, i32* %0)
%21 = call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i64 19, i64 1, i32* %0)
%22 = call i64 @fwrite(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.12, i64 0, i64 0), i64 113, i64 1, i32* %0)
%23 = call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i64 17, i64 1, i32* %0)
%24 = call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i64 16, i64 1, i32* %0)
ret void
}