#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, ...);
void parameters(int number1, int number2, int number3) {
  int x;
  int y;
  int z;
  if (number1 < number2) {
    x = number1;
  } else {
    x = number2;
  }
  if (number2 < number3) {
    y = number2;
  } else {
    number3 = y;
  }
  if (x < y) {
    z = x;
  } else {
    z = y;
  }
  printf("The highest value is %d", z);
  printf("%d, %d, %d", number1, number2, number3);
}


x86 assembly (clang, -O0):
<parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1138 <parameters+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113e <parameters+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1155 <parameters+0x45>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    115b <parameters+0x4b>
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1172 <parameters+0x62>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1178 <parameters+0x68>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parameters>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
cmp    %esi,%edi
cmovl  %edi,%esi
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"The highest value is %d\00"
@.str.1 = [11 x i8] c"%d, %d, %d\00"
define void @parameters(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i32, i32* %4
store i32 %14, i32* %7
br label %17
15: ; preds = %3
%16 = load i32, i32* %5
store i32 %16, i32* %7
br label %17
17: ; preds = %15, %13
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = load i32, i32* %5
store i32 %22, i32* %8
br label %25
23: ; preds = %17
%24 = load i32, i32* %8
store i32 %24, i32* %6
br label %25
25: ; preds = %23, %21
%26 = load i32, i32* %7
%27 = load i32, i32* %8
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = load i32, i32* %7
store i32 %30, i32* %9
br label %33
31: ; preds = %25
%32 = load i32, i32* %8
store i32 %32, i32* %9
br label %33
33: ; preds = %31, %29
%34 = load i32, i32* %9
%35 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %4
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %36, i32 %37, i32 %38)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"The highest value is %d\00"
@.str.1 = [11 x i8] c"%d, %d, %d\00"
define void @parameters(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}