#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*/ sprintf(char *, char *, char *, char *, char *, char *);
char *google_earth_station_get_image_filename(char *application_name,
                                              char *station,
                                              char *document_root_directory) {
  static char filename[256];
  sprintf(filename, "%s/%s/%s/%s.png", document_root_directory,
          application_name, "images/station_images_medium", station);
  return filename;
}


x86 assembly (clang, -O0):
<google_earth_station_get_image_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r9
lea    0x2f09(%rip),%rdi
lea    0xec2(%rip),%rsi
lea    0xecb(%rip),%r8
call   1030 <sprintf@plt>
lea    0x2eef(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<google_earth_station_get_image_filename>:
push   %rbx
mov    %rsi,%r9
mov    %rdi,%rcx
lea    0x2f22(%rip),%rbx
lea    0xedb(%rip),%rsi
lea    0xee4(%rip),%r8
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@google_earth_station_get_image_filename.filename = internal global [256 x i8] zeroinitializer
@.str = [16 x i8] c"%s/%s/%s/%s.png\00"
@.str.1 = [29 x i8] c"images/station_images_medium\00"
define i8* @google_earth_station_get_image_filename(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @sprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @google_earth_station_get_image_filename.filename, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @google_earth_station_get_image_filename.filename, i64 0, i64 0)
}

LLVM IR (-O2):
@google_earth_station_get_image_filename.filename = internal global [256 x i8] zeroinitializer
@.str = [16 x i8] c"%s/%s/%s/%s.png\00"
@.str.1 = [29 x i8] c"images/station_images_medium\00"
define i8* @google_earth_station_get_image_filename(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @google_earth_station_get_image_filename.filename, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @google_earth_station_get_image_filename.filename, i64 0, i64 0)
}