#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 */
char *google_earth_station_get_image_tag(char *, char *, char *, char *);
char *google_earth_station_get_jpg_tag(char *, char *, char *, char *);
char *google_earth_station_get_pdf_tag(char *, char *, char *, char *);
char *pipe2string(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *, char *,
                           char *, char *, char *);
char *google_earth_station_get_tagged_placemark_description(
    char *application_name, char *station, char *latitude, char *longitude,
    char *document_root_directory) {
  static char placemark_description[4096];
  char *uname;
  char *image_tag;
  char *pdf_tag;
  char *jpg_tag;
  uname = pipe2string("uname -n");
  image_tag = google_earth_station_get_image_tag(
      application_name, station, uname, document_root_directory);
  pdf_tag = google_earth_station_get_pdf_tag(application_name, station, uname,
                                             document_root_directory);
  jpg_tag = google_earth_station_get_jpg_tag(application_name, station, uname,
                                             document_root_directory);
  sprintf(
      placemark_description,
      "<table align=center border=0 cellpadding=0 cellspacing=0>\n"
      "<tr><td align=center><big><big><big><bold>%s</bold></big></big></big>\n"
      "%s\n"
      "<tr><td align=center>"
      "<a %s>\n"
      "<img border=2 src=%s width=400></a>\n"
      "<tr><table align=center border=0 cellpadding=0 cellspacing=0>\n"
      "<tr><td>Station Located at:\n"
      "<tr><td>Latitude<td>%s\n"
      "<tr><td>Longitude<td>%s\n"
      "</table>\n"
      "<tr><td><a href=\"mailto:EVER_data_request@nps.gov?subject=GoogleEarth "
      "Everglades data request for %s\">DataForEVER data request</a>\n"
      "</table>\n",
      station, image_tag, pdf_tag, jpg_tag, latitude, longitude, station);
  return placemark_description;
}


x86 assembly (clang, -O0):
<google_earth_station_get_tagged_placemark_description>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    0xe8d(%rip),%rdi
call   1050 <pipe2string@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <google_earth_station_get_image_tag@plt>
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1060 <google_earth_station_get_pdf_tag@plt>
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <google_earth_station_get_jpg_tag@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x48(%rbp),%r9
mov    -0x18(%rbp),%r11
mov    -0x20(%rbp),%r10
mov    -0x10(%rbp),%rax
lea    0x2e76(%rip),%rdi
lea    0xe18(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1070 <sprintf@plt>
lea    0x2e55(%rip),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<google_earth_station_get_tagged_placemark_description>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,%r12
mov    %rcx,0x8(%rsp)
mov    %rdx,0x10(%rsp)
mov    %rsi,%rbx
mov    %rdi,%r13
lea    0xe88(%rip),%rdi
call   1050 <pipe2string@plt>
mov    %rax,%rbp
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
mov    %r12,%rcx
call   1040 <google_earth_station_get_image_tag@plt>
mov    %rax,%r14
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
call   1060 <google_earth_station_get_pdf_tag@plt>
mov    %rax,%r15
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
call   1030 <google_earth_station_get_jpg_tag@plt>
sub    $0x8,%rsp
lea    0x2e9c(%rip),%rbp
lea    0xe3e(%rip),%rsi
mov    %rbp,%rdi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %r15,%r8
mov    %rax,%r9
push   %rbx
push   0x18(%rsp)
push   0x28(%rsp)
call   1070 <sprintf@plt>
add    $0x20,%rsp
mov    %rbp,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@google_earth_station_get_tagged_placemark_description.placemark_description = internal global [4096 x i8] zeroinitializer
@.str = [9 x i8] c"uname -n\00"
@.str.1 = [482 x i8] c"<table align=center border=0 cellpadding=0 cellspacing=0>\0A<tr><td align=center><big><big><big><bold>%s</bold></big></big></big>\0A%s\0A<tr><td align=center><a %s>\0A<img border=2 src=%s width=400></a>\0A<tr><table align=center border=0 cellpadding=0 cellspacing=0>\0A<tr><td>Station Located at:\0A<tr><td>Latitude<td>%s\0A<tr><td>Longitude<td>%s\0A</table>\0A<tr><td><a href=\22mailto:EVER_data_request@nps.gov?subject=GoogleEarth Everglades data request for %s\22>DataForEVER data request</a>\0A</table>\0A\00"
define i8* @google_earth_station_get_tagged_placemark_description(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%15 = call i8* @pipe2string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %15, i8** %11
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
%18 = load i8*, i8** %11
%19 = load i8*, i8** %10
%20 = call i8* @google_earth_station_get_image_tag(i8* %16, i8* %17, i8* %18, i8* %19)
store i8* %20, i8** %12
%21 = load i8*, i8** %6
%22 = load i8*, i8** %7
%23 = load i8*, i8** %11
%24 = load i8*, i8** %10
%25 = call i8* @google_earth_station_get_pdf_tag(i8* %21, i8* %22, i8* %23, i8* %24)
store i8* %25, i8** %13
%26 = load i8*, i8** %6
%27 = load i8*, i8** %7
%28 = load i8*, i8** %11
%29 = load i8*, i8** %10
%30 = call i8* @google_earth_station_get_jpg_tag(i8* %26, i8* %27, i8* %28, i8* %29)
store i8* %30, i8** %14
%31 = load i8*, i8** %7
%32 = load i8*, i8** %12
%33 = load i8*, i8** %13
%34 = load i8*, i8** %14
%35 = load i8*, i8** %8
%36 = load i8*, i8** %9
%37 = load i8*, i8** %7
%38 = call i32 @sprintf(i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @google_earth_station_get_tagged_placemark_description.placemark_description, i64 0, i64 0), i8* getelementptr inbounds ([482 x i8], [482 x i8]* @.str.1, i64 0, i64 0), i8* %31, i8* %32, i8* %33, i8* %34, i8* %35, i8* %36, i8* %37)
ret i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @google_earth_station_get_tagged_placemark_description.placemark_description, i64 0, i64 0)
}

LLVM IR (-O2):
@google_earth_station_get_tagged_placemark_description.placemark_description = internal global [4096 x i8] zeroinitializer
@.str = [9 x i8] c"uname -n\00"
@.str.1 = [482 x i8] c"<table align=center border=0 cellpadding=0 cellspacing=0>\0A<tr><td align=center><big><big><big><bold>%s</bold></big></big></big>\0A%s\0A<tr><td align=center><a %s>\0A<img border=2 src=%s width=400></a>\0A<tr><table align=center border=0 cellpadding=0 cellspacing=0>\0A<tr><td>Station Located at:\0A<tr><td>Latitude<td>%s\0A<tr><td>Longitude<td>%s\0A</table>\0A<tr><td><a href=\22mailto:EVER_data_request@nps.gov?subject=GoogleEarth Everglades data request for %s\22>DataForEVER data request</a>\0A</table>\0A\00"
define i8* @google_earth_station_get_tagged_placemark_description(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i8* @pipe2string(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = tail call i8* @google_earth_station_get_image_tag(i8* %0, i8* %1, i8* %6, i8* %4)
%8 = tail call i8* @google_earth_station_get_pdf_tag(i8* %0, i8* %1, i8* %6, i8* %4)
%9 = tail call i8* @google_earth_station_get_jpg_tag(i8* %0, i8* %1, i8* %6, i8* %4)
%10 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([4096 x i8], [4096 x i8]* @google_earth_station_get_tagged_placemark_description.placemark_description, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([482 x i8], [482 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %7, i8* %8, i8* %9, i8* %2, i8* %3, i8* %1)
ret i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @google_earth_station_get_tagged_placemark_description.placemark_description, i64 0, i64 0)
}