#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*/ fprintf(int /*<<< orphan*/ *, char *);
void google_map_output_rectangle_copy_to_form(FILE *output_file) {
  fprintf(output_file, "<script type=\"text/javascript\">\n");
  fprintf(
      output_file,
      "function rectangle_copy_to_form() {\n"
      "	var element;\n"
      "\n"
      "	element = timlib_get_element( \"rectangle_southwest_latitude\" );"
      "	element.value = rectangle_southwest_latitude;\n"
      "\n"
      "	element = timlib_get_element( \"rectangle_southwest_longitude\" );"
      "	element.value = rectangle_southwest_longitude;\n"
      "\n"
      "	element = timlib_get_element( \"rectangle_northeast_latitude\" );"
      "	element.value = rectangle_northeast_latitude;\n"
      "\n"
      "	element = timlib_get_element( \"rectangle_northeast_longitude\" );"
      "	element.value = rectangle_northeast_longitude;\n\n");
  fprintf(output_file, "	return true;\n");
  fprintf(output_file, "}\n");
  fprintf(output_file, "</script>\n");
}


x86 assembly (clang, -O0):
<google_map_output_rectangle_copy_to_form>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeea(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10d2(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10d1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10c4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<google_map_output_rectangle_copy_to_form>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xeed(%rip),%rdi
mov    $0x1f7,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x10cc(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x10c2(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0x10ac(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"<script type=\22text/javascript\22>\0A\00"
@.str.1 = [504 x i8] c"function rectangle_copy_to_form() {\0A\09var element;\0A\0A\09element = timlib_get_element( \22rectangle_southwest_latitude\22 );\09element.value = rectangle_southwest_latitude;\0A\0A\09element = timlib_get_element( \22rectangle_southwest_longitude\22 );\09element.value = rectangle_southwest_longitude;\0A\0A\09element = timlib_get_element( \22rectangle_northeast_latitude\22 );\09element.value = rectangle_northeast_latitude;\0A\0A\09element = timlib_get_element( \22rectangle_northeast_longitude\22 );\09element.value = rectangle_northeast_longitude;\0A\0A\00"
@.str.2 = [15 x i8] c"\09return true;\0A\00"
@.str.3 = [3 x i8] c"}\0A\00"
@.str.4 = [11 x i8] c"</script>\0A\00"
define void @google_map_output_rectangle_copy_to_form(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([504 x i8], [504 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"<script type=\22text/javascript\22>\0A\00"
@.str.1 = [504 x i8] c"function rectangle_copy_to_form() {\0A\09var element;\0A\0A\09element = timlib_get_element( \22rectangle_southwest_latitude\22 );\09element.value = rectangle_southwest_latitude;\0A\0A\09element = timlib_get_element( \22rectangle_southwest_longitude\22 );\09element.value = rectangle_southwest_longitude;\0A\0A\09element = timlib_get_element( \22rectangle_northeast_latitude\22 );\09element.value = rectangle_northeast_latitude;\0A\0A\09element = timlib_get_element( \22rectangle_northeast_longitude\22 );\09element.value = rectangle_northeast_longitude;\0A\0A\00"
@.str.2 = [15 x i8] c"\09return true;\0A\00"
@.str.3 = [3 x i8] c"}\0A\00"
@.str.4 = [11 x i8] c"</script>\0A\00"
define void @google_map_output_rectangle_copy_to_form(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 32, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([504 x i8], [504 x i8]* @.str.1, i64 0, i64 0), i64 503, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i64 14, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i64 10, i64 1, i32* %0)
ret void
}