#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 Kartik(long int day, long int month, long int year) {
  long int date, bangla;
  if (day <= 31 && month < 13 && year > 1000) {
    if (day < 16) {
      bangla = year - 593;
      date = day + 15;
      printf("%ld-Ashshin-%ld\n", date, bangla);
    } else {
      bangla = year - 593;
      date = day - 15;
      printf("%ld-Kartik-%ld\n", date, bangla);
    }
  } else
    printf("Invalid Input.\nPlease Check Your Input..........\n");
  return 0;
}


x86 assembly (clang, -O0):
<Kartik>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x1f,-0x8(%rbp)
jg     11bd <Kartik+0xad>
cmpq   $0xd,-0x10(%rbp)
jge    11bd <Kartik+0xad>
cmpq   $0x3e8,-0x18(%rbp)
jle    11bd <Kartik+0xad>
cmpq   $0x10,-0x8(%rbp)
jge    1188 <Kartik+0x78>
mov    -0x18(%rbp),%rax
sub    $0x251,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0xf,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b8 <Kartik+0xa8>
mov    -0x18(%rbp),%rax
sub    $0x251,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
sub    $0xf,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cb <Kartik+0xbb>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kartik>:
push   %rax
cmp    $0x1f,%rdi
jg     1153 <Kartik+0x33>
cmp    $0xc,%rsi
jg     1153 <Kartik+0x33>
cmp    $0x3e9,%rdx
jl     1153 <Kartik+0x33>
mov    %rdi,%rax
add    $0xfffffffffffffdaf,%rdx
cmp    $0xf,%rdi
jg     1161 <Kartik+0x41>
add    $0xf,%rax
lea    0xeaf(%rip),%rdi
jmp    116c <Kartik+0x4c>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
jmp    1176 <Kartik+0x56>
add    $0xfffffffffffffff1,%rax
lea    0xea5(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%ld-Ashshin-%ld\0A\00"
@.str.1 = [16 x i8] c"%ld-Kartik-%ld\0A\00"
@.str.2 = [50 x i8] c"Invalid Input.\0APlease Check Your Input..........\0A\00"
define i32 @Kartik(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %4
%10 = icmp sle i64 %9, 31
br i1 %10, label %11, label %37
11: ; preds = %3
%12 = load i64, i64* %5
%13 = icmp slt i64 %12, 13
br i1 %13, label %14, label %37
14: ; preds = %11
%15 = load i64, i64* %6
%16 = icmp sgt i64 %15, 1000
br i1 %16, label %17, label %37
17: ; preds = %14
%18 = load i64, i64* %4
%19 = icmp slt i64 %18, 16
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i64, i64* %6
%22 = sub nsw i64 %21, 593
store i64 %22, i64* %8
%23 = load i64, i64* %4
%24 = add nsw i64 %23, 15
store i64 %24, i64* %7
%25 = load i64, i64* %7
%26 = load i64, i64* %8
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %25, i64 %26)
br label %36
28: ; preds = %17
%29 = load i64, i64* %6
%30 = sub nsw i64 %29, 593
store i64 %30, i64* %8
%31 = load i64, i64* %4
%32 = sub nsw i64 %31, 15
store i64 %32, i64* %7
%33 = load i64, i64* %7
%34 = load i64, i64* %8
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 %33, i64 %34)
br label %36
36: ; preds = %28, %20
br label %39
37: ; preds = %14, %11, %3
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
br label %39
39: ; preds = %37, %36
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"%ld-Ashshin-%ld\0A\00"
@.str.1 = [16 x i8] c"%ld-Kartik-%ld\0A\00"
@str = [49 x i8] c"Invalid Input.\0APlease Check Your Input..........\00"
define i32 @Kartik(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, 32
%5 = icmp slt i64 %1, 13
%6 = and i1 %4, %5
%7 = icmp sgt i64 %2, 1000
%8 = and i1 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %3
%10 = icmp slt i64 %0, 16
%11 = add nsw i64 %2, -593
br i1 %10, label %12, label %15
12: ; preds = %9
%13 = add nsw i64 %0, 15
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %13, i64 %11)
br label %20
15: ; preds = %9
%16 = add nsw i64 %0, -15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 %16, i64 %11)
br label %20
18: ; preds = %3
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
br label %20
20: ; preds = %12, %15, %18
ret i32 0
}