#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_mday;
  scalar_t__ tm_isdst;
  scalar_t__ tm_yday;
  scalar_t__ tm_wday;
  scalar_t__ tm_year;
  scalar_t__ tm_mon;
  scalar_t__ tm_hour;
  scalar_t__ tm_min;
  scalar_t__ tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ mktime(struct tm *);
void test(void) {
  struct tm timestruct;
  time_t time_encoded;
  timestruct.tm_sec = 0;
  timestruct.tm_min = 0;
  timestruct.tm_hour = 0;
  timestruct.tm_mday = 1;
  timestruct.tm_mon = 0;
  timestruct.tm_year = 0;
  timestruct.tm_wday = 0;
  timestruct.tm_yday = 0;
  timestruct.tm_isdst = 0;
  time_encoded = mktime(&timestruct);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x1,-0x48(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
lea    -0x48(%rbp),%rdi
call   1030 <mktime@plt>
mov    %eax,-0x4c(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x30(%rsp)
movq   $0x0,0x40(%rsp)
movl   $0x1,(%rsp)
movups %xmm0,0x8(%rsp)
movups %xmm0,0x18(%rsp)
movq   $0x0,0x28(%rsp)
mov    %rsp,%rdi
call   1030 <mktime@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i64, i64, i64, i64, i64, i64, i64, i64 }
define void @test() {
%1 = alloca %struct.tm
%2 = alloca i32
%3 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 8
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 7
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 6
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 0
store i32 1, i32* %6
%7 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 5
store i64 0, i64* %7
%8 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 4
store i64 0, i64* %8
%9 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 3
store i64 0, i64* %9
%10 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 2
store i64 0, i64* %10
%11 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 1
store i64 0, i64* %11
%12 = call i32 @mktime(%struct.tm* %1)
store i32 %12, i32* %2
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i64, i64, i64, i64, i64, i64, i64, i64 }
define void @test() {
%1 = alloca %struct.tm
%2 = bitcast %struct.tm* %1 to i8*
%3 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 6
%4 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%5 = bitcast i64* %3 to i8*
store i32 1, i32* %4
%6 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 1
%7 = bitcast i64* %6 to i8*
%8 = call i32 @mktime(%struct.tm* %1)
ret void
}