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

/* Variables and functions */
int /*<<< orphan*/ Date_Time(double, struct tm *);
double Julian_Date(struct tm *);
int Check_Date(struct tm *cdate) {
  double jt;
  struct tm chkdate;
  jt = Julian_Date(cdate);
  Date_Time(jt, &chkdate);
  if ((cdate->tm_year == chkdate.tm_year) &&
      (cdate->tm_mon == chkdate.tm_mon) &&
      (cdate->tm_mday == chkdate.tm_mday) &&
      (cdate->tm_hour == chkdate.tm_hour) &&
      (cdate->tm_min == chkdate.tm_min) && (cdate->tm_sec == chkdate.tm_sec))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<Check_Date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Julian_Date@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    -0x48(%rbp),%rdi
call   1040 <Date_Time@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x48(%rbp),%rax
jne    11bf <Check_Date+0x9f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
cmp    -0x40(%rbp),%rax
jne    11bf <Check_Date+0x9f>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
cmp    -0x38(%rbp),%rax
jne    11bf <Check_Date+0x9f>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
cmp    -0x30(%rbp),%rax
jne    11bf <Check_Date+0x9f>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
cmp    -0x28(%rbp),%rax
jne    11bf <Check_Date+0x9f>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
cmp    -0x20(%rbp),%rax
jne    11bf <Check_Date+0x9f>
movl   $0x1,-0x4(%rbp)
jmp    11c6 <Check_Date+0xa6>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_Date>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rbx
call   1030 <Julian_Date@plt>
mov    %rsp,%rdi
call   1040 <Date_Time@plt>
mov    (%rbx),%rax
cmp    (%rsp),%rax
jne    117a <Check_Date+0x5a>
mov    0x8(%rbx),%rax
cmp    0x8(%rsp),%rax
jne    117a <Check_Date+0x5a>
mov    0x10(%rbx),%rax
cmp    0x10(%rsp),%rax
jne    117a <Check_Date+0x5a>
mov    0x18(%rbx),%rax
cmp    0x18(%rsp),%rax
jne    117a <Check_Date+0x5a>
mov    0x20(%rbx),%rax
cmp    0x20(%rsp),%rax
jne    117a <Check_Date+0x5a>
mov    0x28(%rbx),%rcx
mov    $0x1,%eax
cmp    0x28(%rsp),%rcx
je     117c <Check_Date+0x5c>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i64, i64, i64, i64, i64, i64 }
define i32 @Check_Date(%struct.tm* %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
%4 = alloca double
%5 = alloca %struct.tm
store %struct.tm* %0, %struct.tm** %3
%6 = load %struct.tm*, %struct.tm** %3
%7 = call double @Julian_Date(%struct.tm* %6)
store double %7, double* %4
%8 = load double, double* %4
%9 = call i32 @Date_Time(double %8, %struct.tm* %5)
%10 = load %struct.tm*, %struct.tm** %3
%11 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 0
%12 = load i64, i64* %11
%13 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%14 = load i64, i64* %13
%15 = icmp eq i64 %12, %14
br i1 %15, label %16, label %52
16: ; preds = %1
%17 = load %struct.tm*, %struct.tm** %3
%18 = getelementptr inbounds %struct.tm, %struct.tm* %17, i32 0, i32 1
%19 = load i64, i64* %18
%20 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 1
%21 = load i64, i64* %20
%22 = icmp eq i64 %19, %21
br i1 %22, label %23, label %52
23: ; preds = %16
%24 = load %struct.tm*, %struct.tm** %3
%25 = getelementptr inbounds %struct.tm, %struct.tm* %24, i32 0, i32 2
%26 = load i64, i64* %25
%27 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 2
%28 = load i64, i64* %27
%29 = icmp eq i64 %26, %28
br i1 %29, label %30, label %52
30: ; preds = %23
%31 = load %struct.tm*, %struct.tm** %3
%32 = getelementptr inbounds %struct.tm, %struct.tm* %31, i32 0, i32 3
%33 = load i64, i64* %32
%34 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 3
%35 = load i64, i64* %34
%36 = icmp eq i64 %33, %35
br i1 %36, label %37, label %52
37: ; preds = %30
%38 = load %struct.tm*, %struct.tm** %3
%39 = getelementptr inbounds %struct.tm, %struct.tm* %38, i32 0, i32 4
%40 = load i64, i64* %39
%41 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 4
%42 = load i64, i64* %41
%43 = icmp eq i64 %40, %42
br i1 %43, label %44, label %52
44: ; preds = %37
%45 = load %struct.tm*, %struct.tm** %3
%46 = getelementptr inbounds %struct.tm, %struct.tm* %45, i32 0, i32 5
%47 = load i64, i64* %46
%48 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 5
%49 = load i64, i64* %48
%50 = icmp eq i64 %47, %49
br i1 %50, label %51, label %52
51: ; preds = %44
store i32 1, i32* %2
br label %53
52: ; preds = %44, %37, %30, %23, %16, %1
store i32 0, i32* %2
br label %53
53: ; preds = %52, %51
%54 = load i32, i32* %2
ret i32 %54
}

LLVM IR (-O2):
%struct.tm = type { i64, i64, i64, i64, i64, i64 }
define i32 @Check_Date(%struct.tm* %0) {
%2 = alloca %struct.tm
%3 = bitcast %struct.tm* %2 to i8*
%4 = tail call double @Julian_Date(%struct.tm* %0)
%5 = call i32 @Date_Time(double %4, %struct.tm* %2)
%6 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%7 = load i64, i64* %6
%8 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
%9 = load i64, i64* %8
%10 = icmp eq i64 %7, %9
br i1 %10, label %11, label %41
11: ; preds = %1
%12 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%13 = load i64, i64* %12
%14 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
%15 = load i64, i64* %14
%16 = icmp eq i64 %13, %15
br i1 %16, label %17, label %41
17: ; preds = %11
%18 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%19 = load i64, i64* %18
%20 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
%21 = load i64, i64* %20
%22 = icmp eq i64 %19, %21
br i1 %22, label %23, label %41
23: ; preds = %17
%24 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 3
%25 = load i64, i64* %24
%26 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
%27 = load i64, i64* %26
%28 = icmp eq i64 %25, %27
br i1 %28, label %29, label %41
29: ; preds = %23
%30 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 4
%31 = load i64, i64* %30
%32 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
%33 = load i64, i64* %32
%34 = icmp eq i64 %31, %33
br i1 %34, label %35, label %41
35: ; preds = %29
%36 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 5
%37 = load i64, i64* %36
%38 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
%39 = load i64, i64* %38
%40 = icmp eq i64 %37, %39
br i1 %40, label %42, label %41
41: ; preds = %35, %29, %23, %17, %11, %1
br label %42
42: ; preds = %35, %41
%43 = phi i32 [ 0, %41 ], [ 1, %35 ]
ret i32 %43
}