#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_mday;
  scalar_t__ tm_mon;
  scalar_t__ tm_year;
};

/* Variables and functions */
int logger_is_need_rotate(struct tm *cur_tm, struct tm *m_tm) {
  if (cur_tm->tm_mday != m_tm->tm_mday || cur_tm->tm_mon != m_tm->tm_mon ||
      cur_tm->tm_year != m_tm->tm_year) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<logger_is_need_rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jne    114c <logger_is_need_rotate+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x8(%rcx),%rax
jne    114c <logger_is_need_rotate+0x4c>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x10(%rcx),%rax
je     1158 <logger_is_need_rotate+0x58>
movl   $0x1,-0x4(%rbp)
jmp    115f <logger_is_need_rotate+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_is_need_rotate>:
mov    (%rdi),%rcx
mov    $0x1,%eax
cmp    (%rsi),%rcx
jne    1124 <logger_is_need_rotate+0x24>
mov    0x8(%rdi),%rcx
cmp    0x8(%rsi),%rcx
jne    1124 <logger_is_need_rotate+0x24>
mov    0x10(%rdi),%rcx
xor    %eax,%eax
cmp    0x10(%rsi),%rcx
setne  %al
ret

LLVM IR (-O0):
%struct.tm = type { i64, i64, i64 }
define i32 @logger_is_need_rotate(%struct.tm* %0, %struct.tm* %1) {
%3 = alloca i32
%4 = alloca %struct.tm*
%5 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %4
store %struct.tm* %1, %struct.tm** %5
%6 = load %struct.tm*, %struct.tm** %4
%7 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load %struct.tm*, %struct.tm** %5
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 0
%11 = load i64, i64* %10
%12 = icmp ne i64 %8, %11
br i1 %12, label %29, label %13
13: ; preds = %2
%14 = load %struct.tm*, %struct.tm** %4
%15 = getelementptr inbounds %struct.tm, %struct.tm* %14, i32 0, i32 1
%16 = load i64, i64* %15
%17 = load %struct.tm*, %struct.tm** %5
%18 = getelementptr inbounds %struct.tm, %struct.tm* %17, i32 0, i32 1
%19 = load i64, i64* %18
%20 = icmp ne i64 %16, %19
br i1 %20, label %29, label %21
21: ; preds = %13
%22 = load %struct.tm*, %struct.tm** %4
%23 = getelementptr inbounds %struct.tm, %struct.tm* %22, i32 0, i32 2
%24 = load i64, i64* %23
%25 = load %struct.tm*, %struct.tm** %5
%26 = getelementptr inbounds %struct.tm, %struct.tm* %25, i32 0, i32 2
%27 = load i64, i64* %26
%28 = icmp ne i64 %24, %27
br i1 %28, label %29, label %30
29: ; preds = %21, %13, %2
store i32 1, i32* %3
br label %31
30: ; preds = %21
store i32 0, i32* %3
br label %31
31: ; preds = %30, %29
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
%struct.tm = type { i64, i64, i64 }
define i32 @logger_is_need_rotate(%struct.tm* nocapture %0, %struct.tm* nocapture %1) {
%3 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
br i1 %7, label %8, label %21
8: ; preds = %2
%9 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
br i1 %13, label %14, label %21
14: ; preds = %8
%15 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%16 = load i64, i64* %15
%17 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 2
%18 = load i64, i64* %17
%19 = icmp ne i64 %16, %18
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %14, %2, %8
%22 = phi i32 [ 1, %8 ], [ 1, %2 ], [ %20, %14 ]
ret i32 %22
}