#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 */
char *Grading_Object_Module(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main(void) {
  int Mark;
  printf("This program return the grade of a Student's Inputed Mark.\n");
  printf("Enter Your mark: ");
  scanf("%d", &Mark);
  printf("\n");
  printf("Processing Your Mark...\n");
  system("sleep 3");
  printf("The corresponding is grade is: %s.\n", Grading_Object_Module(Mark));
  printf("\n\nThis is just a Demo Version of this program.\n");
  printf("\n\tTry to get a Full version at www.Unknown.com.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%edi
call   1060 <Grading_Object_Module@plt>
mov    %rax,%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe8c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe90(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1070 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
lea    0xe6c(%rip),%rdi
call   1050 <system@plt>
mov    0x4(%rsp),%edi
call   1080 <Grading_Object_Module@plt>
lea    0xe5f(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
lea    0xee8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [60 x i8] c"This program return the grade of a Student's Inputed Mark.\0A\00"
@.str.1 = [18 x i8] c"Enter Your mark: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [25 x i8] c"Processing Your Mark...\0A\00"
@.str.5 = [8 x i8] c"sleep 3\00"
@.str.6 = [36 x i8] c"The corresponding is grade is: %s.\0A\00"
@.str.7 = [48 x i8] c"\0A\0AThis is just a Demo Version of this program.\0A\00"
@.str.8 = [49 x i8] c"\0A\09Try to get a Full version at www.Unknown.com.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i8* @Grading_Object_Module(i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [18 x i8] c"Enter Your mark: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.5 = [8 x i8] c"sleep 3\00"
@.str.6 = [36 x i8] c"The corresponding is grade is: %s.\0A\00"
@str = [59 x i8] c"This program return the grade of a Student's Inputed Mark.\00"
@str.9 = [24 x i8] c"Processing Your Mark...\00"
@str.10 = [47 x i8] c"\0A\0AThis is just a Demo Version of this program.\00"
@str.11 = [48 x i8] c"\0A\09Try to get a Full version at www.Unknown.com.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%6 = call i32 @putchar(i32 10)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.9, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%9 = load i32, i32* %1
%10 = call i8* @Grading_Object_Module(i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %10)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.10, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.11, i64 0, i64 0))
ret i32 0
}