void gs_get_clock(long *pdt) {
  struct {
    unsigned long int _l0, _l1;
  } binary_date;
  long lib$day(), sys$bintim();
  long days, days0, seconds;
  char *jan_1_1980 = "1-JAN-1980";
  char *midnight = "00:00:00.00";
  struct {
    unsigned short dsc$w_length;
    unsigned char dsc$b_dtype;
    unsigned char dsc$b_class;
    char *dsc$a_pointer;
  } str_desc;
  (void)lib$day(&days0);
  str_desc.dsc$w_length = strlen(jan_1_1980);
  str_desc.dsc$a_pointer = jan_1_1980;
  (void)sys$bintim(&str_desc, &binary_date);
  (void)lib$day(&days, &binary_date);
  pdt[0] = 1 + days0 - days;
  str_desc.dsc$w_length = strlen(midnight);
  str_desc.dsc$a_pointer = midnight;
  (void)sys$bintim(&str_desc, &binary_date);
  (void)lib$day(&days, &binary_date, &seconds);
  pdt[1] = 10 * seconds;
}


x86 assembly (clang, -O0):
<gs_get_clock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xebd(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1050 <lib$day@plt>
mov    -0x38(%rbp),%rdi
call   1030 <strlen@plt>
mov    %ax,-0x50(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x50(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <sys$bintim@plt>
lea    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <lib$day@plt>
mov    -0x28(%rbp),%rcx
add    $0x1,%rcx
sub    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %ax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x50(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <sys$bintim@plt>
lea    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1050 <lib$day@plt>
imul   $0xa,-0x30(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gs_get_clock>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%r14
lea    0x18(%rsp),%rdi
xor    %eax,%eax
call   1040 <lib$day@plt>
movw   $0xa,(%rsp)
lea    0xeb9(%rip),%rax
mov    %rax,0x8(%rsp)
mov    %rsp,%r15
lea    0x28(%rsp),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <sys$bintim@plt>
lea    0x20(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <lib$day@plt>
mov    0x18(%rsp),%rax
sub    0x20(%rsp),%rax
add    $0x1,%rax
mov    %rax,(%r14)
movw   $0xb,(%rsp)
lea    0xe7a(%rip),%rax
mov    %rax,0x8(%rsp)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <sys$bintim@plt>
lea    0x10(%rsp),%rdx
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <lib$day@plt>
mov    0x10(%rsp),%rax
add    %rax,%rax
lea    (%rax,%rax,4),%rax
mov    %rax,0x8(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.anon = type { i64, i64 }
%struct.anon.0 = type { i16, i8, i8, i8* }
@.str = [11 x i8] c"1-JAN-1980\00"
@.str.1 = [12 x i8] c"00:00:00.00\00"
define void @gs_get_clock(i64* %0) {
%2 = alloca i64*
%3 = alloca %struct.anon
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca %struct.anon.0
store i64* %0, i64** %2
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %8
%10 = call i64 (i64*, ...) bitcast (i64 (...)* @"lib$day" to i64 (i64*, ...)*)(i64* %5)
%11 = load i8*, i8** %7
%12 = call i64 @strlen(i8* %11)
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %9, i32 0, i32 0
store i16 %13, i16* %14
%15 = load i8*, i8** %7
%16 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %9, i32 0, i32 3
store i8* %15, i8** %16
%17 = call i64 (%struct.anon.0*, %struct.anon*, ...) bitcast (i64 (...)* @"sys$bintim" to i64 (%struct.anon.0*, %struct.anon*, ...)*)(%struct.anon.0* %9, %struct.anon* %3)
%18 = call i64 (i64*, %struct.anon*, ...) bitcast (i64 (...)* @"lib$day" to i64 (i64*, %struct.anon*, ...)*)(i64* %4, %struct.anon* %3)
%19 = load i64, i64* %5
%20 = add nsw i64 1, %19
%21 = load i64, i64* %4
%22 = sub nsw i64 %20, %21
%23 = load i64*, i64** %2
%24 = getelementptr inbounds i64, i64* %23, i64 0
store i64 %22, i64* %24
%25 = load i8*, i8** %8
%26 = call i64 @strlen(i8* %25)
%27 = trunc i64 %26 to i16
%28 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %9, i32 0, i32 0
store i16 %27, i16* %28
%29 = load i8*, i8** %8
%30 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %9, i32 0, i32 3
store i8* %29, i8** %30
%31 = call i64 (%struct.anon.0*, %struct.anon*, ...) bitcast (i64 (...)* @"sys$bintim" to i64 (%struct.anon.0*, %struct.anon*, ...)*)(%struct.anon.0* %9, %struct.anon* %3)
%32 = call i64 (i64*, %struct.anon*, i64*, ...) bitcast (i64 (...)* @"lib$day" to i64 (i64*, %struct.anon*, i64*, ...)*)(i64* %4, %struct.anon* %3, i64* %6)
%33 = load i64, i64* %6
%34 = mul nsw i64 10, %33
%35 = load i64*, i64** %2
%36 = getelementptr inbounds i64, i64* %35, i64 1
store i64 %34, i64* %36
ret void
}

LLVM IR (-O2):
%struct.anon = type { i64, i64 }
%struct.anon.0 = type { i16, i8, i8, i8* }
@.str = [11 x i8] c"1-JAN-1980\00"
@.str.1 = [12 x i8] c"00:00:00.00\00"
define void @gs_get_clock(i64* nocapture writeonly %0) {
%2 = alloca %struct.anon
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca %struct.anon.0
%7 = bitcast %struct.anon* %2 to i8*
%8 = bitcast i64* %3 to i8*
%9 = bitcast i64* %4 to i8*
%10 = bitcast i64* %5 to i8*
%11 = bitcast %struct.anon.0* %6 to i8*
%12 = call i64 (i64*, ...) bitcast (i64 (...)* @"lib$day" to i64 (i64*, ...)*)(i64* %4)
%13 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %6, i64 0, i32 0
store i16 10, i16* %13
%14 = getelementptr inbounds %struct.anon.0, %struct.anon.0* %6, i64 0, i32 3
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %14
%15 = call i64 (%struct.anon.0*, %struct.anon*, ...) bitcast (i64 (...)* @"sys$bintim" to i64 (%struct.anon.0*, %struct.anon*, ...)*)(%struct.anon.0* %6, %struct.anon* %2)
%16 = call i64 (i64*, %struct.anon*, ...) bitcast (i64 (...)* @"lib$day" to i64 (i64*, %struct.anon*, ...)*)(i64* %3, %struct.anon* %2)
%17 = load i64, i64* %4
%18 = add nsw i64 %17, 1
%19 = load i64, i64* %3
%20 = sub i64 %18, %19
store i64 %20, i64* %0
store i16 11, i16* %13
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %14
%21 = call i64 (%struct.anon.0*, %struct.anon*, ...) bitcast (i64 (...)* @"sys$bintim" to i64 (%struct.anon.0*, %struct.anon*, ...)*)(%struct.anon.0* %6, %struct.anon* %2)
%22 = call i64 (i64*, %struct.anon*, i64*, ...) bitcast (i64 (...)* @"lib$day" to i64 (i64*, %struct.anon*, i64*, ...)*)(i64* %3, %struct.anon* %2, i64* %5)
%23 = load i64, i64* %5
%24 = mul nsw i64 %23, 10
%25 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %24, i64* %25
ret void
}