#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 */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/ *);
int always_true(void) {
  time_t t = time(NULL);
  if (t == time(NULL))
    return 1;
  if (t != time(NULL))
    return 1;
  if (t == time(NULL))
    return 1;
  if (t != time(NULL))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<always_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    1152 <always_true+0x42>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <always_true+0xd0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
je     117f <always_true+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <always_true+0xd0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
jne    11ac <always_true+0x9c>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <always_true+0xd0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
cmp    %rcx,%rax
je     11d9 <always_true+0xc9>
movl   $0x1,-0x4(%rbp)
jmp    11e0 <always_true+0xd0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<always_true>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
call   1030 <time@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   1030 <time@plt>
mov    $0x1,%ebp
cmp    %rax,%rbx
je     1156 <always_true+0x46>
xor    %edi,%edi
call   1030 <time@plt>
cmp    %rax,%rbx
jne    1156 <always_true+0x46>
xor    %edi,%edi
call   1030 <time@plt>
cmp    %rax,%rbx
je     1156 <always_true+0x46>
xor    %edi,%edi
call   1030 <time@plt>
xor    %ebp,%ebp
cmp    %rax,%rbx
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @always_true() {
%1 = alloca i32
%2 = alloca i64
%3 = call i64 @time(i32* null)
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @time(i32* null)
%6 = icmp eq i64 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %24
8: ; preds = %0
%9 = load i64, i64* %2
%10 = call i64 @time(i32* null)
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %1
br label %24
13: ; preds = %8
%14 = load i64, i64* %2
%15 = call i64 @time(i32* null)
%16 = icmp eq i64 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %1
br label %24
18: ; preds = %13
%19 = load i64, i64* %2
%20 = call i64 @time(i32* null)
%21 = icmp ne i64 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %1
br label %24
23: ; preds = %18
store i32 0, i32* %1
br label %24
24: ; preds = %23, %22, %17, %12, %7
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
define i32 @always_true() {
%1 = tail call i64 @time(i32* null)
%2 = tail call i64 @time(i32* null)
%3 = icmp eq i64 %1, %2
br i1 %3, label %14, label %4
4: ; preds = %0
%5 = tail call i64 @time(i32* null)
%6 = icmp eq i64 %1, %5
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = tail call i64 @time(i32* null)
%9 = icmp eq i64 %1, %8
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = tail call i64 @time(i32* null)
%12 = icmp ne i64 %1, %11
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %10, %7, %4, %0
%15 = phi i32 [ 1, %0 ], [ 1, %4 ], [ 1, %7 ], [ %13, %10 ]
ret i32 %15
}