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

/* Variables and functions */
void tmcpy(struct tm *dest, const struct tm *src) {
  dest->tm_sec = src->tm_sec;
  dest->tm_min = src->tm_min;
  dest->tm_hour = src->tm_hour;
  dest->tm_mday = src->tm_mday;
  dest->tm_mon = src->tm_mon;
  dest->tm_year = src->tm_year;
  dest->tm_wday = src->tm_year;
  dest->tm_yday = src->tm_yday;
  dest->tm_isdst = src->tm_isdst;
}


x86 assembly (clang, -O0):
<tmcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0x10(%rbp),%rax
mov    0x1c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tmcpy>:
mov    0x20(%rsi),%eax
mov    %eax,0x20(%rdi)
movups 0x10(%rsi),%xmm0
movups %xmm0,0x10(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0xc(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    (%rsi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @tmcpy(%struct.tm* %0, %struct.tm* %1) {
%3 = alloca %struct.tm*
%4 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load %struct.tm*, %struct.tm** %4
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 8
%7 = load i32, i32* %6
%8 = load %struct.tm*, %struct.tm** %3
%9 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 8
store i32 %7, i32* %9
%10 = load %struct.tm*, %struct.tm** %4
%11 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 7
%12 = load i32, i32* %11
%13 = load %struct.tm*, %struct.tm** %3
%14 = getelementptr inbounds %struct.tm, %struct.tm* %13, i32 0, i32 7
store i32 %12, i32* %14
%15 = load %struct.tm*, %struct.tm** %4
%16 = getelementptr inbounds %struct.tm, %struct.tm* %15, i32 0, i32 6
%17 = load i32, i32* %16
%18 = load %struct.tm*, %struct.tm** %3
%19 = getelementptr inbounds %struct.tm, %struct.tm* %18, i32 0, i32 6
store i32 %17, i32* %19
%20 = load %struct.tm*, %struct.tm** %4
%21 = getelementptr inbounds %struct.tm, %struct.tm* %20, i32 0, i32 5
%22 = load i32, i32* %21
%23 = load %struct.tm*, %struct.tm** %3
%24 = getelementptr inbounds %struct.tm, %struct.tm* %23, i32 0, i32 5
store i32 %22, i32* %24
%25 = load %struct.tm*, %struct.tm** %4
%26 = getelementptr inbounds %struct.tm, %struct.tm* %25, i32 0, i32 4
%27 = load i32, i32* %26
%28 = load %struct.tm*, %struct.tm** %3
%29 = getelementptr inbounds %struct.tm, %struct.tm* %28, i32 0, i32 4
store i32 %27, i32* %29
%30 = load %struct.tm*, %struct.tm** %4
%31 = getelementptr inbounds %struct.tm, %struct.tm* %30, i32 0, i32 2
%32 = load i32, i32* %31
%33 = load %struct.tm*, %struct.tm** %3
%34 = getelementptr inbounds %struct.tm, %struct.tm* %33, i32 0, i32 2
store i32 %32, i32* %34
%35 = load %struct.tm*, %struct.tm** %4
%36 = getelementptr inbounds %struct.tm, %struct.tm* %35, i32 0, i32 2
%37 = load i32, i32* %36
%38 = load %struct.tm*, %struct.tm** %3
%39 = getelementptr inbounds %struct.tm, %struct.tm* %38, i32 0, i32 3
store i32 %37, i32* %39
%40 = load %struct.tm*, %struct.tm** %4
%41 = getelementptr inbounds %struct.tm, %struct.tm* %40, i32 0, i32 1
%42 = load i32, i32* %41
%43 = load %struct.tm*, %struct.tm** %3
%44 = getelementptr inbounds %struct.tm, %struct.tm* %43, i32 0, i32 1
store i32 %42, i32* %44
%45 = load %struct.tm*, %struct.tm** %4
%46 = getelementptr inbounds %struct.tm, %struct.tm* %45, i32 0, i32 0
%47 = load i32, i32* %46
%48 = load %struct.tm*, %struct.tm** %3
%49 = getelementptr inbounds %struct.tm, %struct.tm* %48, i32 0, i32 0
store i32 %47, i32* %49
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @tmcpy(%struct.tm* nocapture writeonly %0, %struct.tm* nocapture %1) {
%3 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 8
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 8
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 4
%7 = bitcast i32* %6 to <4 x i32>*
%8 = load <4 x i32>, <4 x i32>* %7
%9 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 4
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> %8, <4 x i32>* %10
%11 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 2
%12 = load i32, i32* %11
%13 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
store i32 %12, i32* %13
%14 = load i32, i32* %11
%15 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 3
store i32 %14, i32* %15
%16 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 1
%17 = load i32, i32* %16
%18 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
store i32 %17, i32* %18
%19 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%20 = load i32, i32* %19
%21 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
store i32 %20, i32* %21
ret void
}