#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 tm_hour;
  scalar_t__ tm_sec;
  scalar_t__ tm_min;
};

/* Variables and functions */
int /*<<< orphan*/ date_yesterday(struct tm *, struct tm *,
                                  int /*<<< orphan*/ *);
void date_time(struct tm *tm, struct tm *now, int hour) {
  if (tm->tm_hour < hour)
    date_yesterday(tm, now, NULL);
  tm->tm_hour = hour;
  tm->tm_min = 0;
  tm->tm_sec = 0;
}


x86 assembly (clang, -O0):
<date_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jge    1143 <date_time+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <date_yesterday@plt>
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x10(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_time>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
cmp    %edx,(%rdi)
jge    1126 <date_time+0x16>
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <date_yesterday@plt>
mov    %ebp,(%rbx)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i64, i64 }
define void @date_time(%struct.tm* %0, %struct.tm* %1, i32 %2) {
%4 = alloca %struct.tm*
%5 = alloca %struct.tm*
%6 = alloca i32
store %struct.tm* %0, %struct.tm** %4
store %struct.tm* %1, %struct.tm** %5
store i32 %2, i32* %6
%7 = load %struct.tm*, %struct.tm** %4
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load %struct.tm*, %struct.tm** %4
%14 = load %struct.tm*, %struct.tm** %5
%15 = call i32 @date_yesterday(%struct.tm* %13, %struct.tm* %14, i32* null)
br label %16
16: ; preds = %12, %3
%17 = load i32, i32* %6
%18 = load %struct.tm*, %struct.tm** %4
%19 = getelementptr inbounds %struct.tm, %struct.tm* %18, i32 0, i32 0
store i32 %17, i32* %19
%20 = load %struct.tm*, %struct.tm** %4
%21 = getelementptr inbounds %struct.tm, %struct.tm* %20, i32 0, i32 2
store i64 0, i64* %21
%22 = load %struct.tm*, %struct.tm** %4
%23 = getelementptr inbounds %struct.tm, %struct.tm* %22, i32 0, i32 1
store i64 0, i64* %23
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i64, i64 }
define void @date_time(%struct.tm* %0, %struct.tm* %1, i32 %2) {
%4 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, %2
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @date_yesterday(%struct.tm* %0, %struct.tm* %1, i32* null)
br label %9
9: ; preds = %7, %3
store i32 %2, i32* %4
%10 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%11 = bitcast i64* %10 to i8*
ret void
}