#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 tm_year;
  int tm_mon;
  int tm_mday;
  int tm_wday;
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int);
void printTmStruct(struct tm tm) {
  printf("%d %d %d (%d) %d:%d:%d\n", tm.tm_year, tm.tm_mon, tm.tm_mday,
         tm.tm_wday, tm.tm_hour, tm.tm_min, tm.tm_sec);
}


x86 assembly (clang, -O0):
<printTmStruct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x10(%rbp),%rax
mov    (%rax),%esi
mov    0x4(%rax),%edx
mov    0x8(%rax),%ecx
mov    0xc(%rax),%r8d
mov    0x10(%rax),%r9d
mov    0x14(%rax),%r10d
mov    0x18(%rax),%eax
lea    0xec6(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printTmStruct>:
push   %rax
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
mov    0x18(%rsp),%ecx
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%r9d
mov    0x24(%rsp),%r10d
mov    0x28(%rsp),%eax
lea    0xec9(%rip),%rdi
push   %rax
push   %r10
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32 }
@.str = [24 x i8] c"%d %d %d (%d) %d:%d:%d\0A\00"
define void @printTmStruct(%struct.tm* byval(%struct.tm) align 8 %0) {
%2 = getelementptr inbounds %struct.tm, %struct.tm* %0, i32 0, i32 0
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.tm, %struct.tm* %0, i32 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.tm, %struct.tm* %0, i32 0, i32 2
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.tm, %struct.tm* %0, i32 0, i32 3
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.tm, %struct.tm* %0, i32 0, i32 4
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.tm, %struct.tm* %0, i32 0, i32 5
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.tm, %struct.tm* %0, i32 0, i32 6
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %9, i32 %11, i32 %13, i32 %15)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32 }
@.str = [24 x i8] c"%d %d %d (%d) %d:%d:%d\0A\00"
define void @printTmStruct(%struct.tm* nocapture byval(%struct.tm) align 8 %0) {
%2 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 3
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 4
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 5
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 6
%15 = load i32, i32* %14
%16 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %9, i32 %11, i32 %13, i32 %15)
ret void
}