#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*/ dispDataByCrg(float);
int /*<<< orphan*/ dispDataByGrd(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putData();
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ sortData();
int /*<<< orphan*/ toupper(char);
int main() {
  char grade;
  float charge;
  putData();
  sortData();
  printf("Enter The Grade of the Hotel: ");
  scanf("%c", &grade);
  dispDataByGrd(toupper(grade));
  printf("Enter The Max Charge of the Hotel: ");
  scanf("%f", &charge);
  dispDataByCrg(charge);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <putData@plt>
mov    $0x0,%al
call   1080 <sortData@plt>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
lea    0xe7f(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
movsbl -0x5(%rbp),%edi
call   1030 <toupper@plt>
mov    %eax,%edi
call   1050 <dispDataByGrd@plt>
lea    0xe60(%rip),%rdi
call   1040 <printf@plt>
lea    0xe78(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
movss  -0xc(%rbp),%xmm0
call   1090 <dispDataByCrg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <putData@plt>
xor    %eax,%eax
call   1080 <sortData@plt>
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8d(%rip),%rdi
lea    0x3(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movsbl 0x3(%rsp),%edi
call   1030 <toupper@plt>
mov    %eax,%edi
call   1050 <dispDataByGrd@plt>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
lea    0xe84(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movss  0x4(%rsp),%xmm0
call   1090 <dispDataByCrg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Enter The Grade of the Hotel: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [36 x i8] c"Enter The Max Charge of the Hotel: \00"
@.str.3 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (...) @putData()
%5 = call i32 (...) @sortData()
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%8 = load i8, i8* %2
%9 = call i32 @toupper(i8 signext %8)
%10 = call i32 @dispDataByGrd(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %3)
%13 = load float, float* %3
%14 = call i32 @dispDataByCrg(float %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Enter The Grade of the Hotel: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [36 x i8] c"Enter The Max Charge of the Hotel: \00"
@.str.3 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = tail call i32 (...) @putData()
%5 = tail call i32 (...) @sortData()
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%8 = load i8, i8* %1
%9 = call i32 @toupper(i8 signext %8)
%10 = call i32 @dispDataByGrd(i32 %9)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %2)
%13 = load float, float* %2
%14 = call i32 @dispDataByCrg(float %13)
ret i32 0
}