#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*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *timeString(time_t t) {
  static char buffer[64];
  static char timestr[64];
  struct tm *local;
  local = localtime(&t);
  strftime(buffer, 64, "%b %e %H:%M", local);
  strncpy(timestr, buffer, 64);
  return timestr;
}


x86 assembly (clang, -O0):
<timeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0x2efd(%rip),%rdi
mov    $0x40,%esi
lea    0xea1(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2f25(%rip),%rdi
lea    0x2ede(%rip),%rsi
mov    $0x40,%edx
call   1040 <strncpy@plt>
lea    0x2f0d(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeString>:
push   %r14
push   %rbx
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
lea    0x2f07(%rip),%r14
lea    0xeb0(%rip),%rdx
mov    %r14,%rdi
mov    $0x40,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
lea    0x2f29(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x40,%edx
call   1040 <strncpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@timeString.buffer = internal global [64 x i8] zeroinitializer
@timeString.timestr = internal global [64 x i8] zeroinitializer
@.str = [12 x i8] c"%b %e %H:%M\00"
define i8* @timeString(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 %0, i32* %2
%4 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %4, %struct.tm** %3
%5 = load %struct.tm*, %struct.tm** %3
%6 = call i32 @strftime(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.buffer, i64 0, i64 0), i32 64, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
%7 = call i32 @strncpy(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.timestr, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.buffer, i64 0, i64 0), i32 64)
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.timestr, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@timeString.buffer = internal global [64 x i8] zeroinitializer
@timeString.timestr = internal global [64 x i8] zeroinitializer
@.str = [12 x i8] c"%b %e %H:%M\00"
define i8* @timeString(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call %struct.tm* @localtime(i32* %2)
%4 = call i32 @strftime(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.buffer, i64 0, i64 0), i32 64, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %struct.tm* %3)
%5 = call i32 @strncpy(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.timestr, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.buffer, i64 0, i64 0), i32 64)
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @timeString.timestr, i64 0, i64 0)
}