#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 scalar_t__ time_t;
struct tm {
  unsigned int tm_hour;
  unsigned int tm_min;
  unsigned int tm_mon;
  unsigned int tm_mday;
  unsigned int tm_year;
};

/* Variables and functions */
int /*<<< orphan*/ localtime_r(scalar_t__ *, struct tm *);
int /*<<< orphan*/ time(scalar_t__ *);
void MinsToDate(unsigned MinInc, unsigned *OutHr, unsigned *OutMin,
                unsigned *OutMonth, unsigned *OutDay, unsigned *OutYear) {
  time_t CurrentTime, LaterTime;
  struct tm OutTime;
  time(&CurrentTime);
  LaterTime = CurrentTime + 60 * MinInc;
  localtime_r(&LaterTime, &OutTime);
  *OutHr = OutTime.tm_hour;
  *OutMin = OutTime.tm_min;
  *OutMonth = OutTime.tm_mon + 1;
  *OutDay = OutTime.tm_mday;
  *OutYear = OutTime.tm_year + 1900;
}


x86 assembly (clang, -O0):
<MinsToDate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    -0x38(%rbp),%rdi
call   1040 <time@plt>
mov    -0x38(%rbp),%rax
imul   $0x3c,-0x4(%rbp),%ecx
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1030 <localtime_r@plt>
mov    -0x58(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x54(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4c(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x48(%rbp),%ecx
add    $0x76c,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MinsToDate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x20(%rsp),%rdi
call   1040 <time@plt>
imul   $0x3c,%ebp,%eax
add    0x20(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x18(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <localtime_r@plt>
mov    (%rsp),%eax
mov    %eax,(%rbx)
mov    0x4(%rsp),%eax
mov    %eax,0x0(%r13)
mov    0x8(%rsp),%eax
add    $0x1,%eax
mov    %eax,(%r12)
mov    0xc(%rsp),%eax
mov    %eax,(%r15)
mov    $0x76c,%eax
add    0x10(%rsp),%eax
mov    %eax,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32 }
define void @MinsToDate(i32 %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i64
%14 = alloca i64
%15 = alloca %struct.tm
store i32 %0, i32* %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%16 = call i32 @time(i64* %13)
%17 = load i64, i64* %13
%18 = load i32, i32* %7
%19 = mul i32 60, %18
%20 = zext i32 %19 to i64
%21 = add nsw i64 %17, %20
store i64 %21, i64* %14
%22 = call i32 @localtime_r(i64* %14, %struct.tm* %15)
%23 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 0
%24 = load i32, i32* %23
%25 = load i32*, i32** %8
store i32 %24, i32* %25
%26 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 1
%27 = load i32, i32* %26
%28 = load i32*, i32** %9
store i32 %27, i32* %28
%29 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 2
%30 = load i32, i32* %29
%31 = add i32 %30, 1
%32 = load i32*, i32** %10
store i32 %31, i32* %32
%33 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 3
%34 = load i32, i32* %33
%35 = load i32*, i32** %11
store i32 %34, i32* %35
%36 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 4
%37 = load i32, i32* %36
%38 = add i32 %37, 1900
%39 = load i32*, i32** %12
store i32 %38, i32* %39
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32 }
define void @MinsToDate(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3, i32* nocapture writeonly %4, i32* nocapture writeonly %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca %struct.tm
%10 = bitcast i64* %7 to i8*
%11 = bitcast i64* %8 to i8*
%12 = bitcast %struct.tm* %9 to i8*
%13 = call i32 @time(i64* %7)
%14 = load i64, i64* %7
%15 = mul i32 %0, 60
%16 = zext i32 %15 to i64
%17 = add nsw i64 %14, %16
store i64 %17, i64* %8
%18 = call i32 @localtime_r(i64* %8, %struct.tm* %9)
%19 = getelementptr inbounds %struct.tm, %struct.tm* %9, i64 0, i32 0
%20 = load i32, i32* %19
store i32 %20, i32* %1
%21 = getelementptr inbounds %struct.tm, %struct.tm* %9, i64 0, i32 1
%22 = load i32, i32* %21
store i32 %22, i32* %2
%23 = getelementptr inbounds %struct.tm, %struct.tm* %9, i64 0, i32 2
%24 = load i32, i32* %23
%25 = add i32 %24, 1
store i32 %25, i32* %3
%26 = getelementptr inbounds %struct.tm, %struct.tm* %9, i64 0, i32 3
%27 = load i32, i32* %26
store i32 %27, i32* %4
%28 = getelementptr inbounds %struct.tm, %struct.tm* %9, i64 0, i32 4
%29 = load i32, i32* %28
%30 = add i32 %29, 1900
store i32 %30, i32* %5
ret void
}