#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  printf("No. of days after which you are submitting the book:");
  scanf("%d", &a);
  if ((0 < a) && (a <= 5)) {
    printf("Pay fine: 50 Paise\n");
  } else if ((5 < a) && (a <= 10)) {
    printf("Pay fine: 1 Rupee\n");
  } else if ((10 < a) && (a <= 30)) {
    printf("Please pay fine: 5 Rupee\n");
  } else if (a > 30) {
    printf("Your membership is cancelled\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
jge    1171 <main+0x51>
cmpl   $0x5,-0x8(%rbp)
jg     1171 <main+0x51>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
jmp    11e8 <main+0xc8>
mov    $0x5,%eax
cmp    -0x8(%rbp),%eax
jge    119a <main+0x7a>
cmpl   $0xa,-0x8(%rbp)
jg     119a <main+0x7a>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
jmp    11e3 <main+0xc3>
mov    $0xa,%eax
cmp    -0x8(%rbp),%eax
jge    11c3 <main+0xa3>
cmpl   $0x1e,-0x8(%rbp)
jg     11c3 <main+0xa3>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xbe>
cmpl   $0x1e,-0x8(%rbp)
jle    11d9 <main+0xb9>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xbe>
jmp    11e3 <main+0xc3>
jmp    11e8 <main+0xc8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
cmp    $0x5,%ecx
jae    1163 <main+0x33>
lea    0xf1f(%rip),%rdi
jmp    1191 <main+0x61>
lea    -0x6(%rax),%ecx
cmp    $0x5,%ecx
jae    1174 <main+0x44>
lea    0xefc(%rip),%rdi
jmp    1191 <main+0x61>
lea    -0xb(%rax),%ecx
cmp    $0x14,%ecx
jae    1185 <main+0x55>
lea    0xed2(%rip),%rdi
jmp    1191 <main+0x61>
cmp    $0x1f,%eax
jl     1196 <main+0x66>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"No. of days after which you are submitting the book:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Pay fine: 50 Paise\0A\00"
@.str.3 = [19 x i8] c"Pay fine: 1 Rupee\0A\00"
@.str.4 = [26 x i8] c"Please pay fine: 5 Rupee\0A\00"
@.str.5 = [30 x i8] c"Your membership is cancelled\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp slt i32 0, %5
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 5
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %36
12: ; preds = %7, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 5, %13
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 10
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %35
20: ; preds = %15, %12
%21 = load i32, i32* %2
%22 = icmp slt i32 10, %21
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 30
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %34
28: ; preds = %23, %20
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, 30
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
br label %33
33: ; preds = %31, %28
br label %34
34: ; preds = %33, %26
br label %35
35: ; preds = %34, %18
br label %36
36: ; preds = %35, %10
%37 = load i32, i32* %1
ret i32 %37
}

LLVM IR (-O2):
@.str = [53 x i8] c"No. of days after which you are submitting the book:\00"
@.str.1 = [3 x i8] c"%d\00"
@str = [29 x i8] c"Your membership is cancelled\00"
@str.6 = [25 x i8] c"Please pay fine: 5 Rupee\00"
@str.7 = [18 x i8] c"Pay fine: 1 Rupee\00"
@str.8 = [19 x i8] c"Pay fine: 50 Paise\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add i32 %5, -1
%7 = icmp ult i32 %6, 5
br i1 %7, label %16, label %8
8: ; preds = %0
%9 = add i32 %5, -6
%10 = icmp ult i32 %9, 5
br i1 %10, label %16, label %11
11: ; preds = %8
%12 = add i32 %5, -11
%13 = icmp ult i32 %12, 20
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = icmp sgt i32 %5, 30
br i1 %15, label %16, label %19
16: ; preds = %14, %11, %8, %0
%17 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.8, i64 0, i64 0), %0 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.6, i64 0, i64 0), %11 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0), %14 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
br label %19
19: ; preds = %16, %14
ret i32 0
}