#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 *, int *);
void main() {
  int i, j, k;
  printf("Enter Three Numbers: \n");
  scanf("%d %d %d", &i, &j, &k);
  if (i > j && i > k) {
    printf("I= %d is greater ", i);
  } else if (j > i && j > k) {
    printf("J= %d is greater ", j);
  } else if (k > i && k > j) {
    printf("K= %d is greater ", k);
  } else {
    printf("\n\n all are equal \n\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    117c <main+0x5c>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    117c <main+0x5c>
mov    -0x4(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f0 <main+0xd0>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    11aa <main+0x8a>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11aa <main+0x8a>
mov    -0x8(%rbp),%esi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11eb <main+0xcb>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    11d8 <main+0xb8>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11d8 <main+0xb8>
mov    -0xc(%rbp),%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e6 <main+0xc6>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11eb <main+0xcb>
jmp    11f0 <main+0xd0>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%ecx
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%esi
cmp    %eax,%ecx
jle    117a <main+0x4a>
cmp    %esi,%ecx
jle    117a <main+0x4a>
lea    0xe93(%rip),%rdi
mov    %ecx,%esi
jmp    119c <main+0x6c>
cmp    %ecx,%eax
jle    118d <main+0x5d>
cmp    %esi,%eax
jle    118d <main+0x5d>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
jmp    119c <main+0x6c>
cmp    %ecx,%esi
jle    11a8 <main+0x78>
cmp    %eax,%esi
jle    11a8 <main+0x78>
lea    0xe91(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x18,%rsp
ret
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Enter Three Numbers: \0A\00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [18 x i8] c"I= %d is greater \00"
@.str.3 = [18 x i8] c"J= %d is greater \00"
@.str.4 = [18 x i8] c"K= %d is greater \00"
@.str.5 = [20 x i8] c"\0A\0A all are equal \0A\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %0
%10 = load i32, i32* %1
%11 = load i32, i32* %3
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %14)
br label %42
16: ; preds = %9, %0
%17 = load i32, i32* %2
%18 = load i32, i32* %1
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %27
20: ; preds = %16
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp sgt i32 %21, %22
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %25)
br label %41
27: ; preds = %20, %16
%28 = load i32, i32* %3
%29 = load i32, i32* %1
%30 = icmp sgt i32 %28, %29
br i1 %30, label %31, label %38
31: ; preds = %27
%32 = load i32, i32* %3
%33 = load i32, i32* %2
%34 = icmp sgt i32 %32, %33
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = load i32, i32* %3
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %36)
br label %40
38: ; preds = %31, %27
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %40
40: ; preds = %38, %35
br label %41
41: ; preds = %40, %24
br label %42
42: ; preds = %41, %13
ret void
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [18 x i8] c"I= %d is greater \00"
@.str.3 = [18 x i8] c"J= %d is greater \00"
@.str.4 = [18 x i8] c"K= %d is greater \00"
@str = [22 x i8] c"Enter Three Numbers: \00"
@str.6 = [19 x i8] c"\0A\0A all are equal \0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = icmp sgt i32 %9, %10
%12 = load i32, i32* %3
%13 = icmp sgt i32 %9, %12
%14 = select i1 %11, i1 %13, i1 false
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %31
17: ; preds = %0
%18 = icmp sgt i32 %10, %9
%19 = icmp sgt i32 %10, %12
%20 = select i1 %18, i1 %19, i1 false
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %10)
br label %31
23: ; preds = %17
%24 = icmp sgt i32 %12, %9
%25 = icmp sgt i32 %12, %10
%26 = select i1 %24, i1 %25, i1 false
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %12)
br label %31
29: ; preds = %23
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.6, i64 0, i64 0))
br label %31
31: ; preds = %21, %29, %27, %15
ret void
}