#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef long time_t;
struct TYPE_2__ {
  int tm_hour;
};

/* Variables and functions */
TYPE_1__ *localtime(long *);
time_t DSTcorrect(time_t Start, time_t Future) {
  time_t StartDay;
  time_t FutureDay;
  StartDay = (localtime(&Start)->tm_hour + 1) % 24;
  FutureDay = (localtime(&Future)->tm_hour + 1) % 24;
  return (Future - Start) + (StartDay - FutureDay) * 60L * 60L;
}


x86 assembly (clang, -O0):
<DSTcorrect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
add    $0x1,%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
add    $0x1,%eax
mov    $0x18,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    -0x20(%rbp),%rcx
imul   $0x3c,%rcx,%rcx
imul   $0x3c,%rcx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DSTcorrect>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
mov    %rsi,(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
mov    %eax,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x2aaaaaab,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%ebx
add    $0x1,%ebx
mov    %rsp,%rdi
call   1030 <localtime@plt>
mov    (%rax),%eax
add    $0x1,%eax
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
shl    $0x3,%ecx
lea    (%rcx,%rcx,2),%ecx
mov    (%rsp),%rdx
sub    0x8(%rsp),%rdx
sub    %eax,%ecx
add    %ebx,%ecx
imul   $0xe10,%ecx,%eax
cltq
add    %rdx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define i64 @DSTcorrect(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = call %struct.TYPE_2__* @localtime(i64* %3)
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
%11 = srem i32 %10, 24
%12 = sext i32 %11 to i64
store i64 %12, i64* %5
%13 = call %struct.TYPE_2__* @localtime(i64* %4)
%14 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %13, i32 0, i32 0
%15 = load i32, i32* %14
%16 = add nsw i32 %15, 1
%17 = srem i32 %16, 24
%18 = sext i32 %17 to i64
store i64 %18, i64* %6
%19 = load i64, i64* %4
%20 = load i64, i64* %3
%21 = sub nsw i64 %19, %20
%22 = load i64, i64* %5
%23 = load i64, i64* %6
%24 = sub nsw i64 %22, %23
%25 = mul nsw i64 %24, 60
%26 = mul nsw i64 %25, 60
%27 = add nsw i64 %21, %26
ret i64 %27
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i32 }
define i64 @DSTcorrect(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call %struct.TYPE_2__* @localtime(i64* %3)
%6 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %5, i64 0, i32 0
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
%9 = srem i32 %8, 24
%10 = call %struct.TYPE_2__* @localtime(i64* %4)
%11 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %10, i64 0, i32 0
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1
%14 = srem i32 %13, 24
%15 = load i64, i64* %4
%16 = load i64, i64* %3
%17 = sub i64 %15, %16
%18 = sub nsw i32 %9, %14
%19 = mul nsw i32 %18, 3600
%20 = sext i32 %19 to i64
%21 = add nsw i64 %17, %20
ret i64 %21
}