printdate(tvec) int tvec[2];
{
  int *lt;
  int *localtime();
  lt = localtime(tvec);
  printf("%3d %c%c%c %d", lt[7], pair(lt[2]), pair(lt[1]), pair(lt[0]), lt[6]);
}


x86 assembly (clang, -O0):
<printdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1c(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%edi
mov    $0x0,%al
call   1050 <pair@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
mov    $0x0,%al
call   1050 <pair@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1050 <pair@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    %eax,%r8d
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%r9d
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printdate>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <localtime@plt>
mov    %rax,%rbx
mov    0x8(%rax),%edi
mov    0x1c(%rax),%r14d
xor    %eax,%eax
call   1050 <pair@plt>
mov    %eax,%r15d
mov    0x4(%rbx),%edi
xor    %eax,%eax
call   1050 <pair@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
xor    %eax,%eax
call   1050 <pair@plt>
mov    0x18(%rbx),%r9d
lea    0xe8e(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%3d %c%c%c %d\00"
define i32 @printdate(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = call i32* (i32*, ...) bitcast (i32* (...)* @localtime to i32* (i32*, ...)*)(i32* %5)
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 7
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 2
%12 = load i32, i32* %11
%13 = call i32 (i32, ...) bitcast (i32 (...)* @pair to i32 (i32, ...)*)(i32 %12)
%14 = load i32*, i32** %4
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
%17 = call i32 (i32, ...) bitcast (i32 (...)* @pair to i32 (i32, ...)*)(i32 %16)
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 0
%20 = load i32, i32* %19
%21 = call i32 (i32, ...) bitcast (i32 (...)* @pair to i32 (i32, ...)*)(i32 %20)
%22 = load i32*, i32** %4
%23 = getelementptr inbounds i32, i32* %22, i64 6
%24 = load i32, i32* %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %13, i32 %17, i32 %21, i32 %24)
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@.str = [14 x i8] c"%3d %c%c%c %d\00"
define i32 @printdate(i32* %0) {
%2 = tail call i32* (i32*, ...) bitcast (i32* (...)* @localtime to i32* (i32*, ...)*)(i32* %0)
%3 = getelementptr inbounds i32, i32* %2, i64 7
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %2, i64 2
%6 = load i32, i32* %5
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @pair to i32 (i32, ...)*)(i32 %6)
%8 = getelementptr inbounds i32, i32* %2, i64 1
%9 = load i32, i32* %8
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @pair to i32 (i32, ...)*)(i32 %9)
%11 = load i32, i32* %2
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @pair to i32 (i32, ...)*)(i32 %11)
%13 = getelementptr inbounds i32, i32* %2, i64 6
%14 = load i32, i32* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %7, i32 %10, i32 %12, i32 %14)
ret i32 undef
}