#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 *, double, double);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main() {
  double year, month, day, sum;
  scanf("%lf %lf %lf", &year, &month, &day);
  sum = year + ((month * 30) + day) / 360;
  month += (day >= 15) ? 1 : 0;
  year += (month >= 6) ? 1 : 0;
  printf("%.0f %.2f", year, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  0xeba(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xea2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe80(%rip),%xmm1
xor    %eax,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe4f(%rip),%xmm1
xor    %eax,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xefd(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm2
movsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm3
movsd  0xeaa(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm3,%xmm1
divsd  0xea2(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  0xe9e(%rip),%xmm4
cmplesd %xmm3,%xmm4
movsd  0xe99(%rip),%xmm3
andpd  %xmm3,%xmm4
addsd  %xmm0,%xmm4
movsd  %xmm4,(%rsp)
movsd  0xe8c(%rip),%xmm0
cmplesd %xmm4,%xmm0
andpd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [10 x i8] c"%.0f %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call double @llvm.fmuladd.f64(double %8, double 3.000000e+01, double %9)
%11 = fdiv double %10, 3.600000e+02
%12 = fadd double %7, %11
store double %12, double* %5
%13 = load double, double* %4
%14 = fcmp oge double %13, 1.500000e+01
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 1, i32 0
%17 = sitofp i32 %16 to double
%18 = load double, double* %3
%19 = fadd double %18, %17
store double %19, double* %3
%20 = load double, double* %3
%21 = fcmp oge double %20, 6.000000e+00
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 1, i32 0
%24 = sitofp i32 %23 to double
%25 = load double, double* %2
%26 = fadd double %25, %24
store double %26, double* %2
%27 = load double, double* %2
%28 = load double, double* %5
%29 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %27, double %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [10 x i8] c"%.0f %.2f\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %1
%9 = load double, double* %2
%10 = load double, double* %3
%11 = call double @llvm.fmuladd.f64(double %9, double 3.000000e+01, double %10)
%12 = fdiv double %11, 3.600000e+02
%13 = fadd double %8, %12
%14 = fcmp oge double %10, 1.500000e+01
%15 = uitofp i1 %14 to double
%16 = fadd double %9, %15
store double %16, double* %2
%17 = fcmp oge double %16, 6.000000e+00
%18 = uitofp i1 %17 to double
%19 = fadd double %8, %18
store double %19, double* %1
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %19, double %13)
ret i32 0
}