#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 utsname {
  char *nodename;
  char *release;
  char *version;
  char *machine;
};

/* Variables and functions */
char *convdate(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *);
void reportheader(struct utsname *uname, time_t mtime) {
  char cdate[16];
  printf("\n%s  %s  %s  %s  %s\n\n", uname->nodename, uname->release,
         uname->version, uname->machine, convdate(mtime, cdate));
}


x86 assembly (clang, -O0):
<reportheader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1030 <convdate@plt>
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    %rax,%r9
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reportheader>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,%eax
mov    (%rdi),%rbx
mov    0x8(%rdi),%r14
mov    0x10(%rdi),%r15
mov    0x18(%rdi),%r12
mov    %rsp,%rsi
mov    %eax,%edi
call   1030 <convdate@plt>
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r12,%r8
mov    %rax,%r9
call   1040 <printf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.utsname = type { i8*, i8*, i8*, i8* }
@.str = [22 x i8] c"\0A%s %s %s %s %s\0A\0A\00"
define void @reportheader(%struct.utsname* %0, i32 %1) {
%3 = alloca %struct.utsname*
%4 = alloca i32
%5 = alloca [16 x i8]
store %struct.utsname* %0, %struct.utsname** %3
store i32 %1, i32* %4
%6 = load %struct.utsname*, %struct.utsname** %3
%7 = getelementptr inbounds %struct.utsname, %struct.utsname* %6, i32 0, i32 0
%8 = load i8*, i8** %7
%9 = load %struct.utsname*, %struct.utsname** %3
%10 = getelementptr inbounds %struct.utsname, %struct.utsname* %9, i32 0, i32 1
%11 = load i8*, i8** %10
%12 = load %struct.utsname*, %struct.utsname** %3
%13 = getelementptr inbounds %struct.utsname, %struct.utsname* %12, i32 0, i32 2
%14 = load i8*, i8** %13
%15 = load %struct.utsname*, %struct.utsname** %3
%16 = getelementptr inbounds %struct.utsname, %struct.utsname* %15, i32 0, i32 3
%17 = load i8*, i8** %16
%18 = load i32, i32* %4
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%20 = call i8* @convdate(i32 %18, i8* %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %11, i8* %14, i8* %17, i8* %20)
ret void
}

LLVM IR (-O2):
%struct.utsname = type { i8*, i8*, i8*, i8* }
@.str = [22 x i8] c"\0A%s %s %s %s %s\0A\0A\00"
define void @reportheader(%struct.utsname* nocapture %0, i32 %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds %struct.utsname, %struct.utsname* %0, i64 0, i32 0
%6 = load i8*, i8** %5
%7 = getelementptr inbounds %struct.utsname, %struct.utsname* %0, i64 0, i32 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds %struct.utsname, %struct.utsname* %0, i64 0, i32 2
%10 = load i8*, i8** %9
%11 = getelementptr inbounds %struct.utsname, %struct.utsname* %0, i64 0, i32 3
%12 = load i8*, i8** %11
%13 = call i8* @convdate(i32 %1, i8* %4)
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %8, i8* %10, i8* %12, i8* %13)
ret void
}