char *cdate(dataddr)
long *dataddr;
{
  register char *cp;
  char *ctime();
  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>
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>
lea    0x1(%rax),%rcx
movzwl 0x8(%rax),%edx
movzwl 0x16(%rax),%esi
mov    %dx,0x1(%rax)
movb   $0x2d,0x3(%rax)
movb   $0x2d,0x7(%rax)
mov    %si,0x8(%rax)
movb   $0x40,0xa(%rax)
movb   $0x0,0x13(%rax)
mov    %rcx,%rax
pop    %rcx
ret

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

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