#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_wday;
  int /*<<< orphan*/ tm_year;
  int /*<<< orphan*/ tm_mon;
  int /*<<< orphan*/ tm_mday;
  int /*<<< orphan*/ tm_hour;
  int /*<<< orphan*/ tm_min;
  int /*<<< orphan*/ tm_sec;
};

/* Variables and functions */
void copy_tm(struct tm *f, struct tm *s) {
  s->tm_sec = f->tm_sec;
  s->tm_min = f->tm_min;
  s->tm_hour = f->tm_hour;
  s->tm_mday = f->tm_mday;
  s->tm_mon = f->tm_mon;
  s->tm_year = f->tm_year;
  s->tm_wday = f->tm_wday;
  s->tm_yday = f->tm_yday;
  s->tm_isdst = f->tm_isdst;
}


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

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

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