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


x86 assembly (clang, -O0):
<Magh>:
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 <Magh+0xad>
cmpq   $0xd,-0x10(%rbp)
jge    11bd <Magh+0xad>
cmpq   $0x3e8,-0x18(%rbp)
jle    11bd <Magh+0xad>
cmpq   $0xe,-0x8(%rbp)
jge    1188 <Magh+0x78>
mov    -0x18(%rbp),%rax
sub    $0x252,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0x11,%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 <Magh+0xa8>
mov    -0x18(%rbp),%rax
sub    $0x252,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
sub    $0xd,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cb <Magh+0xbb>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"%ld-Poush-%ld\0A\00"
@.str.1 = [14 x i8] c"%ld-Magh-%ld\0A\00"
@.str.2 = [50 x i8] c"Invalid Input.\0APlease Check Your Input..........\0A\00"
define i32 @Magh(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, 14
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i64, i64* %6
%22 = sub nsw i64 %21, 594
store i64 %22, i64* %8
%23 = load i64, i64* %4
%24 = add nsw i64 %23, 17
store i64 %24, i64* %7
%25 = load i64, i64* %7
%26 = load i64, i64* %8
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 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, 594
store i64 %30, i64* %8
%31 = load i64, i64* %4
%32 = sub nsw i64 %31, 13
store i64 %32, i64* %7
%33 = load i64, i64* %7
%34 = load i64, i64* %8
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 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 = [15 x i8] c"%ld-Poush-%ld\0A\00"
@.str.1 = [14 x i8] c"%ld-Magh-%ld\0A\00"
@str = [49 x i8] c"Invalid Input.\0APlease Check Your Input..........\00"
define i32 @Magh(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, 14
%11 = add nsw i64 %2, -594
br i1 %10, label %12, label %15
12: ; preds = %9
%13 = add nsw i64 %0, 17
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %13, i64 %11)
br label %20
15: ; preds = %9
%16 = add nsw i64 %0, -13
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 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
}