#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 */
scalar_t__ dateDiff(int, int, int);
int /*<<< orphan*/ genVersionFile(char *, int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *, int, int, int);
int /*<<< orphan*/ strlen(char *);
int verifyLicenseDate(int nYear, int nMonth, int nDay) {
  char snBuf[256];
  snprintf(snBuf, 256, "Licensed date:%d-%d-%d\n", nYear, nMonth, nDay);
  genVersionFile(snBuf, strlen(snBuf));
  if (dateDiff(nYear, nMonth, nDay) > 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<verifyLicenseDate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    $0x100,%esi
lea    0xe8e(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x110(%rbp),%rax
mov    %rax,-0x118(%rbp)
lea    -0x110(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x118(%rbp),%rdi
mov    %eax,%esi
call   1060 <genVersionFile@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <dateDiff@plt>
cmp    $0x0,%rax
jle    11c3 <verifyLicenseDate+0x83>
movl   $0x1,-0x4(%rbp)
jmp    11ca <verifyLicenseDate+0x8a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verifyLicenseDate>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xea5(%rip),%rdx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x100,%esi
mov    %ebx,%ecx
mov    %ebp,%r8d
mov    %r14d,%r9d
call   1040 <snprintf@plt>
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1060 <genVersionFile@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1050 <dateDiff@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Licensed date:%d-%d-%d\0A\00"
define i32 @verifyLicenseDate(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [256 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = call i32 @snprintf(i8* %9, i32 256, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = call i32 @genVersionFile(i8* %14, i32 %16)
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = call i64 @dateDiff(i32 %18, i32 %19, i32 %20)
%22 = icmp sgt i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %3
store i32 1, i32* %4
br label %25
24: ; preds = %3
store i32 0, i32* %4
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
@.str = [24 x i8] c"Licensed date:%d-%d-%d\0A\00"
define i32 @verifyLicenseDate(i32 %0, i32 %1, i32 %2) {
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
%7 = call i32 @strlen(i8* %5)
%8 = call i32 @genVersionFile(i8* %5, i32 %7)
%9 = call i64 @dateDiff(i32 %0, i32 %1, i32 %2)
%10 = icmp sgt i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}