cdate(dataddr) long *dataddr;
{
  register char *cp;
  cp = ctime(dataddr);
  cp[1] = cp[8];
  cp[2] = cp[9];
  cp[3] = '-';
  cp[7] = '-';
  cp[8] = cp[22];
  cp[9] = cp[23];
  cp[10] = '@';
  cp[19] = 0;
  return (cp + 1);
}


x86 assembly (clang, -O0):
<cdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <ctime@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x9(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0x2d,0x3(%rax)
mov    -0x10(%rbp),%rax
movb   $0x2d,0x7(%rax)
mov    -0x10(%rbp),%rax
mov    0x16(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0x17(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x9(%rax)
mov    -0x10(%rbp),%rax
movb   $0x40,0xa(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x13(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdate>:
push   %rax
xor    %eax,%eax
call   1030 <ctime@plt>
movslq %eax,%rcx
lea    0x1(%rcx),%rax
movzwl 0x8(%rcx),%edx
movzwl 0x16(%rcx),%esi
mov    %dx,0x1(%rcx)
movb   $0x2d,0x3(%rcx)
movb   $0x2d,0x7(%rcx)
mov    %si,0x8(%rcx)
movb   $0x40,0xa(%rcx)
movb   $0x0,0x13(%rcx)
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cdate(i64* %0) {
%2 = alloca i64*
%3 = alloca i8*
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = call i32 (i64*, ...) bitcast (i32 (...)* @ctime to i32 (i64*, ...)*)(i64* %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 8
%10 = load i8, i8* %9
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %10, i8* %12
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 9
%15 = load i8, i8* %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8 %15, i8* %17
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 3
store i8 45, i8* %19
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 7
store i8 45, i8* %21
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 22
%24 = load i8, i8* %23
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 8
store i8 %24, i8* %26
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i64 23
%29 = load i8, i8* %28
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i64 9
store i8 %29, i8* %31
%32 = load i8*, i8** %3
%33 = getelementptr inbounds i8, i8* %32, i64 10
store i8 64, i8* %33
%34 = load i8*, i8** %3
%35 = getelementptr inbounds i8, i8* %34, i64 19
store i8 0, i8* %35
%36 = load i8*, i8** %3
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = ptrtoint i8* %37 to i32
ret i32 %38
}

LLVM IR (-O2):
define i32 @cdate(i64* %0) {
%2 = tail call i32 (i64*, ...) bitcast (i32 (...)* @ctime to i32 (i64*, ...)*)(i64* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 8
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %6, i8* %7
%8 = getelementptr inbounds i8, i8* %4, i64 9
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %4, i64 2
store i8 %9, i8* %10
%11 = getelementptr inbounds i8, i8* %4, i64 3
store i8 45, i8* %11
%12 = getelementptr inbounds i8, i8* %4, i64 7
store i8 45, i8* %12
%13 = getelementptr inbounds i8, i8* %4, i64 22
%14 = load i8, i8* %13
store i8 %14, i8* %5
%15 = getelementptr inbounds i8, i8* %4, i64 23
%16 = load i8, i8* %15
store i8 %16, i8* %8
%17 = getelementptr inbounds i8, i8* %4, i64 10
store i8 64, i8* %17
%18 = getelementptr inbounds i8, i8* %4, i64 19
store i8 0, i8* %18
%19 = ptrtoint i8* %7 to i64
%20 = trunc i64 %19 to i32
ret i32 %20
}