#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 *);
void main() {
  int budget;
  printf("Enter budget to see available products (Dollar sign isn't needed)\n");
  scanf("%d", &budget);
  if (budget >= 100)
    printf("Golden decorated mug with custom image\n");
  else if (budget >= 80)
    printf("Silver decorated mug with custom image \n");
  else if (budget >= 60)
    printf("Bronze decorated mug with custom image \n");
  else if (budget >= 40)
    printf("Mug with custom image \n");
  else if (budget >= 20)
    printf("White plain mug without decoration and image \n");
  else
    printf("Currently no available product found for your budget \n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0x4(%rbp)
jl     115f <main+0x3f>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
jmp    11eb <main+0xcb>
cmpl   $0x50,-0x4(%rbp)
jl     117a <main+0x5a>
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
jmp    11e6 <main+0xc6>
cmpl   $0x3c,-0x4(%rbp)
jl     1195 <main+0x75>
lea    0xf0c(%rip),%rdi
call   1030 <printf@plt>
jmp    11e1 <main+0xc1>
cmpl   $0x28,-0x4(%rbp)
jl     11b0 <main+0x90>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
jmp    11dc <main+0xbc>
cmpl   $0x14,-0x4(%rbp)
jl     11cb <main+0xab>
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
jmp    11d7 <main+0xb7>
lea    0xf35(%rip),%rdi
call   1030 <printf@plt>
jmp    11dc <main+0xbc>
jmp    11e1 <main+0xc1>
jmp    11e6 <main+0xc6>
jmp    11eb <main+0xcb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x63,%eax
jle    1150 <main+0x30>
lea    0xfc2(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0x4f,%eax
jle    115e <main+0x3e>
lea    0xf8c(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0x3b,%eax
jle    116c <main+0x4c>
lea    0xf56(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0x27,%eax
jle    117a <main+0x5a>
lea    0xf31(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0x14,%eax
lea    0xef7(%rip),%rax
lea    0xeba(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [67 x i8] c"Enter budget to see available products (Dollar sign isn't needed)\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [40 x i8] c"Golden decorated mug with custom image\0A\00"
@.str.3 = [41 x i8] c"Silver decorated mug with custom image \0A\00"
@.str.4 = [41 x i8] c"Bronze decorated mug with custom image \0A\00"
@.str.5 = [24 x i8] c"Mug with custom image \0A\00"
@.str.6 = [47 x i8] c"White plain mug without decoration and image \0A\00"
@.str.7 = [55 x i8] c"Currently no available product found for your budget \0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sge i32 %4, 100
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
br label %34
8: ; preds = %0
%9 = load i32, i32* %1
%10 = icmp sge i32 %9, 80
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
br label %33
13: ; preds = %8
%14 = load i32, i32* %1
%15 = icmp sge i32 %14, 60
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
br label %32
18: ; preds = %13
%19 = load i32, i32* %1
%20 = icmp sge i32 %19, 40
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %31
23: ; preds = %18
%24 = load i32, i32* %1
%25 = icmp sge i32 %24, 20
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
br label %30
28: ; preds = %23
%29 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
br label %31
31: ; preds = %30, %21
br label %32
32: ; preds = %31, %16
br label %33
33: ; preds = %32, %11
br label %34
34: ; preds = %33, %6
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [66 x i8] c"Enter budget to see available products (Dollar sign isn't needed)\00"
@str.8 = [54 x i8] c"Currently no available product found for your budget \00"
@str.9 = [46 x i8] c"White plain mug without decoration and image \00"
@str.10 = [23 x i8] c"Mug with custom image \00"
@str.11 = [40 x i8] c"Bronze decorated mug with custom image \00"
@str.12 = [40 x i8] c"Silver decorated mug with custom image \00"
@str.13 = [39 x i8] c"Golden decorated mug with custom image\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 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 = icmp sgt i32 %5, 99
br i1 %6, label %16, label %7
7: ; preds = %0
%8 = icmp sgt i32 %5, 79
br i1 %8, label %16, label %9
9: ; preds = %7
%10 = icmp sgt i32 %5, 59
br i1 %10, label %16, label %11
11: ; preds = %9
%12 = icmp sgt i32 %5, 39
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = icmp sgt i32 %5, 19
%15 = select i1 %14, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @str.8, i64 0, i64 0)
br label %16
16: ; preds = %13, %11, %9, %7, %0
%17 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.13, i64 0, i64 0), %0 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i64 0, i64 0), %7 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @str.11, i64 0, i64 0), %9 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.10, i64 0, i64 0), %11 ], [ %15, %13 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
ret void
}