#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 */

/* Variables and functions */
int makeGuestEntry(char *, char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char mAC[] = "00:45:ed:5f:2c:14";
  char entryTime[] = "18 : 52";
  char exitTime[] = "19 : 20";
  char dateOfEntry[] = "Jan 28, 2009";
  char nameOfGuest[] = "W.H. Gates";
  int retCode = 0;
  retCode = makeGuestEntry(mAC, entryTime, exitTime, dateOfEntry, nameOfGuest);
  if (retCode = 0)
    printf("GUESTTEST:: Entry Made Succesfully");
  else
    printf("GUESTTEST:: Some Error Occurred, Entry Not Made:: RETCODE = %d",
           retCode);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x3d(%rbp)
mov    0xeb3(%rip),%eax
mov    %eax,-0x35(%rbp)
mov    0xeae(%rip),%al
mov    %al,-0x31(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xea2(%rip),%ax
mov    %ax,-0x40(%rbp)
mov    0xe9a(%rip),%al
mov    %al,-0x3e(%rbp)
movl   $0x0,-0x4c(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x3d(%rbp),%rcx
lea    -0x48(%rbp),%r8
call   1040 <makeGuestEntry@plt>
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x4c(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    11db <main+0xbb>
jmp    11ee <main+0xce>
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ff <main+0xdf>
mov    -0x4c(%rbp),%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movw   $0x34,0x40(%rsp)
movabs $0x3235203a203831,%rax
mov    %rax,0x18(%rsp)
movabs $0x3032203a203931,%rax
mov    %rax,0x10(%rsp)
movabs $0x39303032202c38,%rax
mov    %rax,0x25(%rsp)
movabs $0x202c3832206e614a,%rax
38 2c 20
mov    %rax,0x20(%rsp)
movabs $0x746147202e482e57,%rax
47 61 74
mov    %rax,(%rsp)
movl   $0x736574,0x7(%rsp)
lea    0x30(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x20(%rsp),%rcx
mov    %rsp,%r8
call   1040 <makeGuestEntry@plt>
lea    0xe7e(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.mAC = [18 x i8] c"00:45:ed:5f:2c:14\00"
@__const.main.entryTime = [8 x i8] c"18 : 52\00"
@__const.main.exitTime = [8 x i8] c"19 : 20\00"
@__const.main.dateOfEntry = [13 x i8] c"Jan 28, 2009\00"
@__const.main.nameOfGuest = [11 x i8] c"W.H. Gates\00"
@.str = [35 x i8] c"GUESTTEST:: Entry Made Succesfully\00"
@.str.1 = [63 x i8] c"GUESTTEST:: Some Error Occurred, Entry Not Made:: RETCODE = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [18 x i8]
%3 = alloca [8 x i8]
%4 = alloca [8 x i8]
%5 = alloca [13 x i8]
%6 = alloca [11 x i8]
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [18 x i8]* %2 to i8*
%9 = bitcast [8 x i8]* %3 to i8*
%10 = bitcast [8 x i8]* %4 to i8*
%11 = bitcast [13 x i8]* %5 to i8*
%12 = bitcast [11 x i8]* %6 to i8*
store i32 0, i32* %7
%13 = getelementptr inbounds [18 x i8], [18 x i8]* %2, i64 0, i64 0
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%15 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%16 = getelementptr inbounds [13 x i8], [13 x i8]* %5, i64 0, i64 0
%17 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%18 = call i32 @makeGuestEntry(i8* %13, i8* %14, i8* %15, i8* %16, i8* %17)
store i32 %18, i32* %7
store i32 0, i32* %7
br i1 false, label %19, label %21
19: ; preds = %0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %24
21: ; preds = %0
%22 = load i32, i32* %7
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %21, %19
ret i32 0
}

LLVM IR (-O2):
@__const.main.mAC = [18 x i8] c"00:45:ed:5f:2c:14\00"
@__const.main.dateOfEntry = [13 x i8] c"Jan 28, 2009\00"
@__const.main.nameOfGuest = [11 x i8] c"W.H. Gates\00"
@.str.1 = [63 x i8] c"GUESTTEST:: Some Error Occurred, Entry Not Made:: RETCODE = %d\00"
define i32 @main() {
%1 = alloca [18 x i8]
%2 = alloca i64
%3 = alloca i64
%4 = alloca [13 x i8]
%5 = alloca [11 x i8]
%6 = getelementptr inbounds [18 x i8], [18 x i8]* %1, i64 0, i64 0
%7 = bitcast i64* %2 to i8*
store i64 14132161365948465, i64* %2
%8 = bitcast i64* %3 to i8*
store i64 13565912877644081, i64* %3
%9 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [11 x i8], [11 x i8]* %5, i64 0, i64 0
%11 = call i32 @makeGuestEntry(i8* %6, i8* %7, i8* %8, i8* %9, i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}