#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 *);
int /*<<< orphan*/ strcpy(char *, char *);
char *google_chart_get_date_time_key(char *date_string, char *time_string) {
  static char key[128];
  if (time_string && *time_string) {
    sprintf(key, "%s:%s", date_string, time_string);
  } else {
    strcpy(key, date_string);
  }
  return key;
}


x86 assembly (clang, -O0):
<google_chart_get_date_time_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116b <google_chart_get_date_time_key+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116b <google_chart_get_date_time_key+0x4b>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0x2ee6(%rip),%rdi
lea    0xe9f(%rip),%rsi
call   1040 <sprintf@plt>
jmp    117b <google_chart_get_date_time_key+0x5b>
mov    -0x8(%rbp),%rsi
lea    0x2eca(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2ebe(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<google_chart_get_date_time_key>:
push   %rax
mov    %rdi,%rdx
test   %rsi,%rsi
je     1146 <google_chart_get_date_time_key+0x26>
mov    %rsi,%rcx
cmpb   $0x0,(%rsi)
je     1146 <google_chart_get_date_time_key+0x26>
lea    0x2f08(%rip),%rdi
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
jmp    1155 <google_chart_get_date_time_key+0x35>
lea    0x2ef3(%rip),%rdi
mov    %rdx,%rsi
call   1030 <strcpy@plt>
lea    0x2ee4(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@google_chart_get_date_time_key.key = internal global [128 x i8] zeroinitializer
@.str = [6 x i8] c"%s:%s\00"
define i8* @google_chart_get_date_time_key(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @google_chart_get_date_time_key.key, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
br label %19
16: ; preds = %7, %2
%17 = load i8*, i8** %3
%18 = call i32 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @google_chart_get_date_time_key.key, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %16, %12
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @google_chart_get_date_time_key.key, i64 0, i64 0)
}

LLVM IR (-O2):
@google_chart_get_date_time_key.key = internal global [128 x i8] zeroinitializer
@.str = [6 x i8] c"%s:%s\00"
define i8* @google_chart_get_date_time_key(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @google_chart_get_date_time_key.key, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %11
9: ; preds = %4, %2
%10 = tail call i32 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @google_chart_get_date_time_key.key, i64 0, i64 0), i8* %0)
br label %11
11: ; preds = %9, %7
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @google_chart_get_date_time_key.key, i64 0, i64 0)
}