#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 */
typedef int uint32_t;

/* Variables and functions */
void dmc_unrar_decode_dos_time(uint32_t dos_time, int *year, int *month,
                               int *day, int *hour, int *minute, int *second) {
  *year = (dos_time >> 25) + 1980;
  *month = (dos_time >> 21) & 15;
  *day = (dos_time >> 16) & 31;
  *hour = (dos_time >> 11) & 31;
  *minute = (dos_time >> 5) & 63;
  *second = (dos_time & 31) * 2;
}


x86 assembly (clang, -O0):
<dmc_unrar_decode_dos_time>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x19,%ecx
add    $0x7bc,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x15,%ecx
and    $0xf,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0x1f,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0xb,%ecx
and    $0x1f,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
and    $0x3f,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
shl    $0x1,%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmc_unrar_decode_dos_time>:
mov    0x8(%rsp),%r10
mov    %edi,%eax
sar    $0x19,%eax
add    $0x7bc,%eax
mov    %eax,(%rsi)
mov    %edi,%eax
shr    $0x15,%eax
and    $0xf,%eax
mov    %eax,(%rdx)
mov    %edi,%eax
shr    $0x10,%eax
and    $0x1f,%eax
mov    %eax,(%rcx)
mov    %edi,%eax
shr    $0xb,%eax
and    $0x1f,%eax
mov    %eax,(%r8)
mov    %edi,%eax
shr    $0x5,%eax
and    $0x3f,%eax
mov    %eax,(%r9)
add    %edi,%edi
and    $0x3e,%edi
mov    %edi,(%r10)
ret

LLVM IR (-O0):
define void @dmc_unrar_decode_dos_time(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6) {
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
store i32 %0, i32* %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%15 = load i32, i32* %8
%16 = ashr i32 %15, 25
%17 = add nsw i32 %16, 1980
%18 = load i32*, i32** %9
store i32 %17, i32* %18
%19 = load i32, i32* %8
%20 = ashr i32 %19, 21
%21 = and i32 %20, 15
%22 = load i32*, i32** %10
store i32 %21, i32* %22
%23 = load i32, i32* %8
%24 = ashr i32 %23, 16
%25 = and i32 %24, 31
%26 = load i32*, i32** %11
store i32 %25, i32* %26
%27 = load i32, i32* %8
%28 = ashr i32 %27, 11
%29 = and i32 %28, 31
%30 = load i32*, i32** %12
store i32 %29, i32* %30
%31 = load i32, i32* %8
%32 = ashr i32 %31, 5
%33 = and i32 %32, 63
%34 = load i32*, i32** %13
store i32 %33, i32* %34
%35 = load i32, i32* %8
%36 = and i32 %35, 31
%37 = mul nsw i32 %36, 2
%38 = load i32*, i32** %14
store i32 %37, i32* %38
ret void
}

LLVM IR (-O2):
define void @dmc_unrar_decode_dos_time(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4, i32* nocapture writeonly %5, i32* nocapture writeonly %6) {
%8 = ashr i32 %0, 25
%9 = add nsw i32 %8, 1980
store i32 %9, i32* %1
%10 = lshr i32 %0, 21
%11 = and i32 %10, 15
store i32 %11, i32* %2
%12 = lshr i32 %0, 16
%13 = and i32 %12, 31
store i32 %13, i32* %3
%14 = lshr i32 %0, 11
%15 = and i32 %14, 31
store i32 %15, i32* %4
%16 = lshr i32 %0, 5
%17 = and i32 %16, 63
store i32 %17, i32* %5
%18 = shl i32 %0, 1
%19 = and i32 %18, 62
store i32 %19, i32* %6
ret void
}