#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 */

/* Variables and functions */
long long SYSTEM_MOD(long long, long long);
void Platform_YMDHMStoClock(long long ye, long long mo, long long da,
                            long long ho, long long mi, long long se,
                            long long *t, long long *d) {
  *d =
      (((long long)(((ye) >= 0 ? (ye) % (100)
                               : SYSTEM_MOD((long long)(ye), (long long)(100))))
        << (9)) +
       ((long long)(mo + 1) << (5))) +
      da;
  *t = (((long long)(ho) << (12)) + ((long long)(mi) << (6))) + se;
}


x86 assembly (clang, -O0):
<Platform_YMDHMStoClock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpq   $0x0,-0x8(%rbp)
jl     115d <Platform_YMDHMStoClock+0x4d>
mov    -0x8(%rbp),%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
mov    %rax,-0x38(%rbp)
jmp    116f <Platform_YMDHMStoClock+0x5f>
mov    -0x8(%rbp),%rdi
mov    $0x64,%esi
call   1030 <SYSTEM_MOD@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rcx
shl    $0x9,%rcx
mov    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x5,%rax
add    %rax,%rcx
add    -0x18(%rbp),%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
shl    $0xc,%rcx
mov    -0x28(%rbp),%rax
shl    $0x6,%rax
add    %rax,%rcx
add    -0x30(%rbp),%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Platform_YMDHMStoClock>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%rbx
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r13
mov    0x48(%rsp),%rbp
mov    0x40(%rsp),%rsi
test   %rdi,%rdi
js     115a <Platform_YMDHMStoClock+0x4a>
mov    %rdi,%rax
shr    $0x2,%rax
movabs $0x28f5c28f5c28f5c3,%rcx
c2 f5 28
mul    %rcx
shr    $0x2,%rdx
imul   $0x64,%rdx,%rax
sub    %rax,%rdi
jmp    116c <Platform_YMDHMStoClock+0x5c>
mov    $0x64,%esi
call   1030 <SYSTEM_MOD@plt>
mov    0x40(%rsp),%rsi
mov    %rax,%rdi
shl    $0x9,%rdi
shl    $0x5,%r13
add    %r12,%r13
lea    (%rdi,%r13,1),%rax
add    $0x20,%rax
mov    %rax,0x0(%rbp)
shl    $0xc,%r15
shl    $0x6,%rbx
add    %r15,%rbx
add    %r14,%rbx
mov    %rbx,(%rsi)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @Platform_YMDHMStoClock(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64* %6, i64* %7) {
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64*
%16 = alloca i64*
store i64 %0, i64* %9
store i64 %1, i64* %10
store i64 %2, i64* %11
store i64 %3, i64* %12
store i64 %4, i64* %13
store i64 %5, i64* %14
store i64* %6, i64** %15
store i64* %7, i64** %16
%17 = load i64, i64* %9
%18 = icmp sge i64 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %8
%20 = load i64, i64* %9
%21 = srem i64 %20, 100
br label %25
22: ; preds = %8
%23 = load i64, i64* %9
%24 = call i64 @SYSTEM_MOD(i64 %23, i64 100)
br label %25
25: ; preds = %22, %19
%26 = phi i64 [ %21, %19 ], [ %24, %22 ]
%27 = shl i64 %26, 9
%28 = load i64, i64* %10
%29 = add nsw i64 %28, 1
%30 = shl i64 %29, 5
%31 = add nsw i64 %27, %30
%32 = load i64, i64* %11
%33 = add nsw i64 %31, %32
%34 = load i64*, i64** %16
store i64 %33, i64* %34
%35 = load i64, i64* %12
%36 = shl i64 %35, 12
%37 = load i64, i64* %13
%38 = shl i64 %37, 6
%39 = add nsw i64 %36, %38
%40 = load i64, i64* %14
%41 = add nsw i64 %39, %40
%42 = load i64*, i64** %15
store i64 %41, i64* %42
ret void
}

LLVM IR (-O2):
define void @Platform_YMDHMStoClock(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64* nocapture writeonly %6, i64* nocapture writeonly %7) {
%9 = icmp sgt i64 %0, -1
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = urem i64 %0, 100
br label %14
12: ; preds = %8
%13 = tail call i64 @SYSTEM_MOD(i64 %0, i64 100)
br label %14
14: ; preds = %12, %10
%15 = phi i64 [ %11, %10 ], [ %13, %12 ]
%16 = shl i64 %15, 9
%17 = shl i64 %1, 5
%18 = add i64 %17, 32
%19 = add i64 %18, %2
%20 = add i64 %19, %16
store i64 %20, i64* %7
%21 = shl i64 %3, 12
%22 = shl i64 %4, 6
%23 = add nsw i64 %22, %21
%24 = add nsw i64 %23, %5
store i64 %24, i64* %6
ret void
}