#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 {
  int dummy;
};
struct log_tm {
  int dummy;
};

/* Variables and functions */
scalar_t__ trigger_day(struct tm const *, struct log_tm const *, unsigned long,
                       unsigned long);
scalar_t__ trigger_size(struct tm const *, struct log_tm const *, unsigned long,
                        unsigned long);
int trigger_size_day(const struct tm *current, const struct log_tm *old,
                     unsigned long max_file_size, unsigned long filesize) {
  return (trigger_size(current, old, max_file_size, filesize) ||
          trigger_day(current, old, max_file_size, filesize));
}


x86 assembly (clang, -O0):
<trigger_size_day>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <trigger_size@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
jne    117e <trigger_size_day+0x5e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <trigger_day@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trigger_size_day>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
call   1030 <trigger_size@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1162 <trigger_size_day+0x42>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <trigger_day@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
%struct.log_tm = type { i32 }
define i32 @trigger_size_day(%struct.tm* %0, %struct.log_tm* %1, i64 %2, i64 %3) {
%5 = alloca %struct.tm*
%6 = alloca %struct.log_tm*
%7 = alloca i64
%8 = alloca i64
store %struct.tm* %0, %struct.tm** %5
store %struct.log_tm* %1, %struct.log_tm** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load %struct.tm*, %struct.tm** %5
%10 = load %struct.log_tm*, %struct.log_tm** %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i64 @trigger_size(%struct.tm* %9, %struct.log_tm* %10, i64 %11, i64 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %22, label %15
15: ; preds = %4
%16 = load %struct.tm*, %struct.tm** %5
%17 = load %struct.log_tm*, %struct.log_tm** %6
%18 = load i64, i64* %7
%19 = load i64, i64* %8
%20 = call i64 @trigger_day(%struct.tm* %16, %struct.log_tm* %17, i64 %18, i64 %19)
%21 = icmp ne i64 %20, 0
br label %22
22: ; preds = %15, %4
%23 = phi i1 [ true, %4 ], [ %21, %15 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
%struct.tm = type { i32 }
%struct.log_tm = type { i32 }
define i32 @trigger_size_day(%struct.tm* %0, %struct.log_tm* %1, i64 %2, i64 %3) {
%5 = tail call i64 @trigger_size(%struct.tm* %0, %struct.log_tm* %1, i64 %2, i64 %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @trigger_day(%struct.tm* %0, %struct.log_tm* %1, i64 %2, i64 %3)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}