#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 */

/* Variables and functions */
int day();
int month();
int year();
int adjustDstEurope() {
  int beginDSTDate = (31 - (5 * year() / 4 + 4) % 7);
  int beginDSTMonth = 3;
  int endDSTDate = (31 - (5 * year() / 4 + 1) % 7);
  int endDSTMonth = 10;
  if (((month() > beginDSTMonth) && (month() < endDSTMonth)) ||
      ((month() == beginDSTMonth) && (day() >= beginDSTDate)) ||
      ((month() == endDSTMonth) && (day() <= endDSTDate)))
    return 7200;
  else
    return 3600;
}


x86 assembly (clang, -O0):
<adjustDstEurope>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <year@plt>
imul   $0x5,%eax,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x4,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    $0x1f,%eax
sub    %edx,%eax
mov    %eax,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    $0x0,%al
call   1040 <year@plt>
imul   $0x5,%eax,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    $0x1f,%eax
sub    %edx,%eax
mov    %eax,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
mov    $0x0,%al
call   1030 <month@plt>
cmp    -0xc(%rbp),%eax
jle    11b4 <adjustDstEurope+0x84>
mov    $0x0,%al
call   1030 <month@plt>
cmp    -0x14(%rbp),%eax
jl     11f4 <adjustDstEurope+0xc4>
mov    $0x0,%al
call   1030 <month@plt>
cmp    -0xc(%rbp),%eax
jne    11d4 <adjustDstEurope+0xa4>
mov    $0x0,%al
call   1050 <day@plt>
cmp    -0x8(%rbp),%eax
jge    11f4 <adjustDstEurope+0xc4>
mov    $0x0,%al
call   1030 <month@plt>
cmp    -0x14(%rbp),%eax
jne    1200 <adjustDstEurope+0xd0>
mov    $0x0,%al
call   1050 <day@plt>
cmp    -0x10(%rbp),%eax
jg     1200 <adjustDstEurope+0xd0>
movl   $0x1c20,-0x4(%rbp)
jmp    1207 <adjustDstEurope+0xd7>
movl   $0xe10,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjustDstEurope>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <year@plt>
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rax,4),%ebx
add    $0x3,%ebx
test   %ecx,%ecx
cmovns %ecx,%ebx
xor    %eax,%eax
call   1040 <year@plt>
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rax,4),%r14d
add    $0x3,%r14d
test   %ecx,%ecx
cmovns %ecx,%r14d
xor    %eax,%eax
call   1030 <month@plt>
cmp    $0x4,%eax
jl     1184 <adjustDstEurope+0x54>
xor    %eax,%eax
call   1030 <month@plt>
mov    %eax,%ecx
mov    $0x1c20,%eax
cmp    $0xa,%ecx
jl     122c <adjustDstEurope+0xfc>
xor    %eax,%eax
call   1030 <month@plt>
cmp    $0x3,%eax
jne    11d4 <adjustDstEurope+0xa4>
sar    $0x2,%ebx
mov    %ebx,%eax
add    $0x4,%eax
cltq
imul   $0xffffffff92492493,%rax,%rcx
shr    $0x20,%rcx
add    %ebx,%ecx
add    $0x4,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x2,%ecx
add    %edx,%ecx
lea    0x0(,%rcx,8),%ebx
sub    %ecx,%ebx
sub    %eax,%ebx
add    $0x1f,%ebx
xor    %eax,%eax
call   1050 <day@plt>
mov    %eax,%ecx
mov    $0x1c20,%eax
cmp    %ebx,%ecx
jge    122c <adjustDstEurope+0xfc>
xor    %eax,%eax
call   1030 <month@plt>
cmp    $0xa,%eax
jne    1227 <adjustDstEurope+0xf7>
sar    $0x2,%r14d
mov    %r14d,%eax
add    $0x1,%eax
cltq
imul   $0xffffffff92492493,%rax,%rcx
shr    $0x20,%rcx
add    %r14d,%ecx
add    $0x1,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x2,%ecx
add    %edx,%ecx
lea    0x0(,%rcx,8),%ebx
sub    %ecx,%ebx
sub    %eax,%ebx
add    $0x1f,%ebx
xor    %eax,%eax
call   1050 <day@plt>
mov    %eax,%ecx
mov    $0x1c20,%eax
cmp    %ebx,%ecx
jle    122c <adjustDstEurope+0xfc>
mov    $0xe10,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @adjustDstEurope() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 (...) @year()
%7 = mul nsw i32 5, %6
%8 = sdiv i32 %7, 4
%9 = add nsw i32 %8, 4
%10 = srem i32 %9, 7
%11 = sub nsw i32 31, %10
store i32 %11, i32* %2
store i32 3, i32* %3
%12 = call i32 (...) @year()
%13 = mul nsw i32 5, %12
%14 = sdiv i32 %13, 4
%15 = add nsw i32 %14, 1
%16 = srem i32 %15, 7
%17 = sub nsw i32 31, %16
store i32 %17, i32* %4
store i32 10, i32* %5
%18 = call i32 (...) @month()
%19 = load i32, i32* %3
%20 = icmp sgt i32 %18, %19
br i1 %20, label %21, label %25
21: ; preds = %0
%22 = call i32 (...) @month()
%23 = load i32, i32* %5
%24 = icmp slt i32 %22, %23
br i1 %24, label %41, label %25
25: ; preds = %21, %0
%26 = call i32 (...) @month()
%27 = load i32, i32* %3
%28 = icmp eq i32 %26, %27
br i1 %28, label %29, label %33
29: ; preds = %25
%30 = call i32 (...) @day()
%31 = load i32, i32* %2
%32 = icmp sge i32 %30, %31
br i1 %32, label %41, label %33
33: ; preds = %29, %25
%34 = call i32 (...) @month()
%35 = load i32, i32* %5
%36 = icmp eq i32 %34, %35
br i1 %36, label %37, label %42
37: ; preds = %33
%38 = call i32 (...) @day()
%39 = load i32, i32* %4
%40 = icmp sle i32 %38, %39
br i1 %40, label %41, label %42
41: ; preds = %37, %29, %21
store i32 7200, i32* %1
br label %43
42: ; preds = %37, %33
store i32 3600, i32* %1
br label %43
43: ; preds = %42, %41
%44 = load i32, i32* %1
ret i32 %44
}

LLVM IR (-O2):
define i32 @adjustDstEurope() {
%1 = tail call i32 (...) @year()
%2 = mul nsw i32 %1, 5
%3 = sdiv i32 %2, 4
%4 = add nsw i32 %3, 4
%5 = srem i32 %4, 7
%6 = sub nsw i32 31, %5
%7 = tail call i32 (...) @year()
%8 = mul nsw i32 %7, 5
%9 = sdiv i32 %8, 4
%10 = add nsw i32 %9, 1
%11 = srem i32 %10, 7
%12 = sub nsw i32 31, %11
%13 = tail call i32 (...) @month()
%14 = icmp sgt i32 %13, 3
br i1 %14, label %15, label %18
15: ; preds = %0
%16 = tail call i32 (...) @month()
%17 = icmp slt i32 %16, 10
br i1 %17, label %31, label %18
18: ; preds = %15, %0
%19 = tail call i32 (...) @month()
%20 = icmp eq i32 %19, 3
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = tail call i32 (...) @day()
%23 = icmp slt i32 %22, %6
br i1 %23, label %24, label %31
24: ; preds = %21, %18
%25 = tail call i32 (...) @month()
%26 = icmp eq i32 %25, 10
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = tail call i32 (...) @day()
%29 = icmp sgt i32 %28, %12
br i1 %29, label %30, label %31
30: ; preds = %27, %24
br label %31
31: ; preds = %15, %21, %27, %30
%32 = phi i32 [ 3600, %30 ], [ 7200, %27 ], [ 7200, %21 ], [ 7200, %15 ]
ret i32 %32
}