void highest_lowest(int1, int2, int3) {
  if (int1 > int2) {
    if (int1 > int3) {
      printf("\n\n%d is the biggest.\n\n", int1);
    } else {
      printf("\n\n%d is the biggest.\n\n", int3);
    }
  } else {
    if (int2 > int3) {
      printf("\n\n%d is the biggest.\n\n", int2);
    } else {
      printf("\n\n%d is the biggest.\n\n", int3);
    }
  }
  if (int1 < int2) {
    if (int1 < int3) {
      printf("%d is the smallest.", int1);
    } else {
      printf("%d is the smallest.", int3);
    }
  } else {
    if (int2 < int3) {
      printf("%d is the smallest.", int2);
    } else {
      printf("%d is the smallest.", int3);
    }
  }
}


x86 assembly (clang, -O0):
<highest_lowest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1165 <highest_lowest+0x55>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114f <highest_lowest+0x3f>
mov    -0x4(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1160 <highest_lowest+0x50>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119d <highest_lowest+0x8d>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1187 <highest_lowest+0x77>
mov    -0x8(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1198 <highest_lowest+0x88>
mov    -0xc(%rbp),%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119d <highest_lowest+0x8d>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e1 <highest_lowest+0xd1>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11cb <highest_lowest+0xbb>
mov    -0x4(%rbp),%esi
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11dc <highest_lowest+0xcc>
mov    -0xc(%rbp),%esi
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1219 <highest_lowest+0x109>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1203 <highest_lowest+0xf3>
mov    -0x8(%rbp),%esi
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1214 <highest_lowest+0x104>
mov    -0xc(%rbp),%esi
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1219 <highest_lowest+0x109>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<highest_lowest>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
cmp    %esi,%edi
cmovg  %edi,%esi
cmovl  %edi,%ebp
cmp    %edx,%esi
lea    0xed8(%rip),%rdi
cmovle %edx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    %ebx,%ebp
cmovge %ebx,%ebp
lea    0xed9(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"\0A\0A%d is the biggest.\0A\0A\00"
@.str.1 = [20 x i8] c"%d is the smallest.\00"
define void @highest_lowest(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %4
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %20
17: ; preds = %10
%18 = load i32, i32* %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %17, %14
br label %32
21: ; preds = %3
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %28
25: ; preds = %21
%26 = load i32, i32* %5
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %26)
br label %31
28: ; preds = %21
%29 = load i32, i32* %6
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %28, %25
br label %32
32: ; preds = %31, %20
%33 = load i32, i32* %4
%34 = load i32, i32* %5
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %47
36: ; preds = %32
%37 = load i32, i32* %4
%38 = load i32, i32* %6
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = load i32, i32* %4
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %46
43: ; preds = %36
%44 = load i32, i32* %6
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %40
br label %58
47: ; preds = %32
%48 = load i32, i32* %5
%49 = load i32, i32* %6
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %54
51: ; preds = %47
%52 = load i32, i32* %5
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %52)
br label %57
54: ; preds = %47
%55 = load i32, i32* %6
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %55)
br label %57
57: ; preds = %54, %51
br label %58
58: ; preds = %57, %46
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"\0A\0A%d is the biggest.\0A\0A\00"
@.str.1 = [20 x i8] c"%d is the smallest.\00"
define void @highest_lowest(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
%6 = icmp sgt i32 %5, %2
%7 = select i1 %6, i32 %5, i32 %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp slt i32 %0, %1
%10 = select i1 %9, i32 %0, i32 %1
%11 = icmp slt i32 %10, %2
%12 = select i1 %11, i32 %10, i32 %2
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret void
}