#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 /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int total_days(int, int, int);
int main(void) {
  int year;
  int month;
  int day;
  int tmp;
  scanf("%d", &year);
  scanf("%d", &month);
  scanf("%d", &day);
  if (month <= 2) {
    year -= 1;
    month += 12;
  }
  tmp = total_days(2014, 5, 17) - total_days(year, month, day);
  printf("%d\n", tmp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe9a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x2,-0xc(%rbp)
jg     118b <main+0x5b>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xc,%eax
mov    %eax,-0xc(%rbp)
mov    $0x7de,%edi
mov    $0x5,%esi
mov    $0x11,%edx
call   1030 <total_days@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <total_days@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe3f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jg     1178 <main+0x48>
addl   $0xffffffff,0x8(%rsp)
add    $0xc,%eax
mov    %eax,0x4(%rsp)
mov    $0x7de,%edi
mov    $0x5,%esi
mov    $0x11,%edx
call   1030 <total_days@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
mov    0xc(%rsp),%edx
call   1030 <total_days@plt>
sub    %eax,%ebx
lea    0xe5b(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 2
br i1 %10, label %11, label %16
11: ; preds = %0
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 12
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %0
%17 = call i32 @total_days(i32 2014, i32 5, i32 17)
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = call i32 @total_days(i32 %18, i32 %19, i32 %20)
%22 = sub nsw i32 %17, %21
store i32 %22, i32* %5
%23 = load i32, i32* %5
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %16
12: ; preds = %0
%13 = load i32, i32* %1
%14 = add nsw i32 %13, -1
store i32 %14, i32* %1
%15 = add nsw i32 %10, 12
store i32 %15, i32* %2
br label %16
16: ; preds = %12, %0
%17 = call i32 @total_days(i32 2014, i32 5, i32 17)
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = call i32 @total_days(i32 %18, i32 %19, i32 %20)
%22 = sub nsw i32 %17, %21
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret i32 0
}