#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 main(void) {
  int jenny_age;
  scanf("%d", &jenny_age);
  printf("total of ex-boyfriend = %d\n", ((30 - jenny_age) * 12) / 15);
  printf("date with current boyfriend for %d months\n",
         ((30 - jenny_age) * 12) % 15);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1e,%eax
sub    -0x4(%rbp),%eax
imul   $0xc,%eax,%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%eax
sub    -0x4(%rbp),%eax
imul   $0xc,%eax,%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0x1e,%ebx
mov    $0x1e,%eax
sub    0xc(%rsp),%eax
shl    $0x2,%eax
lea    (%rax,%rax,2),%eax
movslq %eax,%rsi
imul   $0xffffffff88888889,%rsi,%rax
shr    $0x20,%rax
add    %eax,%esi
mov    %esi,%eax
shr    $0x1f,%eax
sar    $0x3,%esi
add    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
sub    0xc(%rsp),%ebx
shl    $0x2,%ebx
lea    (%rbx,%rbx,2),%eax
movslq %eax,%rsi
imul   $0xffffffff88888889,%rsi,%rax
shr    $0x20,%rax
add    %esi,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x3,%eax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [28 x i8] c"total of ex-boyfriend = %d\0A\00"
@.str.2 = [43 x i8] c"date with current boyfriend for %d months\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = sub nsw i32 30, %3
%5 = mul nsw i32 %4, 12
%6 = sdiv i32 %5, 15
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %1
%9 = sub nsw i32 30, %8
%10 = mul nsw i32 %9, 12
%11 = srem i32 %10, 15
%12 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [28 x i8] c"total of ex-boyfriend = %d\0A\00"
@.str.2 = [43 x i8] c"date with current boyfriend for %d months\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sub nsw i32 30, %4
%6 = mul nsw i32 %5, 12
%7 = sdiv i32 %6, 15
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %1
%10 = sub nsw i32 30, %9
%11 = mul nsw i32 %10, 12
%12 = srem i32 %11, 15
%13 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}