#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 *);
int maxandmin() {
  int i, n, z;
  printf("Enter two number: ");
  scanf("%d %d %d", &i, &n, &z);
  if (i > n && i > z) {
    printf("%d is greater than %d & %d", i, n, z);
  }
  if (n > i && n > z) {
    printf("%d is greater than %d & %d", n, i, z);
  }
  if (z > i && z > n) {
    printf("%d is greater than %d & %d", z, i, n);
  }
}


x86 assembly (clang, -O0):
<maxandmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    117d <maxandmin+0x5d>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    117d <maxandmin+0x5d>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11ac <maxandmin+0x8c>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11ac <maxandmin+0x8c>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    11db <maxandmin+0xbb>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    11db <maxandmin+0xbb>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxandmin>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%edx
mov    0x10(%rsp),%eax
cmp    %eax,%edx
jle    117b <maxandmin+0x5b>
mov    0xc(%rsp),%ecx
cmp    %ecx,%edx
jle    117b <maxandmin+0x5b>
lea    0xeb4(%rip),%rdi
mov    %edx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x10(%rsp),%eax
mov    0x14(%rsp),%edx
cmp    %edx,%eax
jle    119b <maxandmin+0x7b>
mov    0xc(%rsp),%ecx
cmp    %ecx,%eax
jle    119b <maxandmin+0x7b>
lea    0xe8e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x14(%rsp),%edx
mov    0xc(%rsp),%esi
cmp    %edx,%esi
jle    11b9 <maxandmin+0x99>
mov    0x10(%rsp),%ecx
cmp    %ecx,%esi
jle    11b9 <maxandmin+0x99>
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"Enter two number: \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [27 x i8] c"%d is greater than %d & %d\00"
define i32 @maxandmin() {
%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 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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
br i1 %11, label %12, label %19
12: ; preds = %0
%13 = load i32, i32* %3
%14 = icmp sgt i32 %9, %13
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10, i32 %13)
%17 = load i32, i32* %2
%18 = load i32, i32* %1
br label %19
19: ; preds = %15, %12, %0
%20 = phi i32 [ %18, %15 ], [ %9, %12 ], [ %9, %0 ]
%21 = phi i32 [ %17, %15 ], [ %10, %12 ], [ %10, %0 ]
%22 = icmp sgt i32 %21, %20
br i1 %22, label %23, label %29
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp sgt i32 %21, %24
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %21, i32 %20, i32 %24)
%28 = load i32, i32* %1
br label %29
29: ; preds = %26, %23, %19
%30 = phi i32 [ %28, %26 ], [ %20, %23 ], [ %20, %19 ]
%31 = load i32, i32* %3
%32 = icmp sgt i32 %31, %30
br i1 %32, label %33, label %38
33: ; preds = %29
%34 = load i32, i32* %2
%35 = icmp sgt i32 %31, %34
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %31, i32 %30, i32 %34)
br label %38
38: ; preds = %36, %33, %29
ret i32 undef
}