#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 /*<<< orphan*/ time_t;
struct tm {
  int tm_year;
  int tm_mon;
  int tm_mday;
  int tm_hour;
  int tm_min;
  int tm_sec;
  int tm_isdst;
};

/* Variables and functions */
int /*<<< orphan*/ mktime(struct tm *);
time_t MakeTimeT(int year, int month, int day, int hour, int minute, int second,
                 int isDst) {
  struct tm currentTm;
  currentTm.tm_year = year - 1900;
  currentTm.tm_mon = month - 1;
  currentTm.tm_mday = day;
  currentTm.tm_hour = hour;
  currentTm.tm_min = minute;
  currentTm.tm_sec = second;
  currentTm.tm_isdst = isDst;
  return mktime(&currentTm);
}


x86 assembly (clang, -O0):
<MakeTimeT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x76c,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
lea    -0x38(%rbp),%rdi
call   1030 <mktime@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeTimeT>:
sub    $0x28,%rsp
mov    0x30(%rsp),%eax
add    $0xfffff894,%edi
mov    %edi,0x8(%rsp)
add    $0xffffffff,%esi
mov    %esi,0xc(%rsp)
mov    %edx,0x10(%rsp)
mov    %ecx,0x14(%rsp)
mov    %r8d,0x18(%rsp)
mov    %r9d,0x1c(%rsp)
mov    %eax,0x20(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <mktime@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32 }
define i32 @MakeTimeT(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
%15 = alloca %struct.tm
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
%16 = load i32, i32* %8
%17 = sub nsw i32 %16, 1900
%18 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 0
store i32 %17, i32* %18
%19 = load i32, i32* %9
%20 = sub nsw i32 %19, 1
%21 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 1
store i32 %20, i32* %21
%22 = load i32, i32* %10
%23 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 2
store i32 %22, i32* %23
%24 = load i32, i32* %11
%25 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 3
store i32 %24, i32* %25
%26 = load i32, i32* %12
%27 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 4
store i32 %26, i32* %27
%28 = load i32, i32* %13
%29 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 5
store i32 %28, i32* %29
%30 = load i32, i32* %14
%31 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 6
store i32 %30, i32* %31
%32 = call i32 @mktime(%struct.tm* %15)
ret i32 %32
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32 }
define i32 @MakeTimeT(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca %struct.tm
%9 = bitcast %struct.tm* %8 to i8*
%10 = add nsw i32 %0, -1900
%11 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 0
store i32 %10, i32* %11
%12 = add nsw i32 %1, -1
%13 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 1
store i32 %12, i32* %13
%14 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 2
store i32 %2, i32* %14
%15 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 3
store i32 %3, i32* %15
%16 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 4
store i32 %4, i32* %16
%17 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 5
store i32 %5, i32* %17
%18 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 6
store i32 %6, i32* %18
%19 = call i32 @mktime(%struct.tm* %8)
ret i32 %19
}