#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 /*<<< orphan*/ system(char *);
int main() {
  int a, b, c;
  printf("\n Inserisci il numero a: ");
  scanf("%d", &a);
  printf("\n Inserisci il numero b: ");
  scanf("%d", &b);
  printf("\n Inserisci il numero c: ");
  scanf("%d", &c);
  if (a < b) {
    if (b < c) {
      printf("\n L'ordine voluto e': %d, %d, %d\n", a, b, c);
    } else {
      if (a < c) {
        printf("\n L'ordine voluto e': %d, %d, %d\n", a, c, b);
      } else {
        printf("\n L'ordine voluto e': %d, %d, %d\n", c, a, b);
      }
    }
  } else {
    if (c < b) {
      printf("\n L'ordine voluto e': %d, %d, %d\n", c, b, a);
    } else {
      if (a < c) {
        printf("\n L'ordine voluto e': %d, %d, %d\n", b, a, c);
      } else {
        printf("\n L'ordine voluto e': %d, %d, %d \n", b, c, a);
      }
    }
  }
  int temp;
  if (a > b) {
    temp = a;
    a = b;
    b = temp;
  }
  if (a > c) {
    temp = a;
    a = c;
    c = temp;
  }
  if (b > c) {
    temp = b;
    b = c;
    c = temp;
  }
  printf("\n L'ordine voluto è: %d, %d, %d \n", a, b, c);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1216 <main+0xe6>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11cd <main+0x9d>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1211 <main+0xe1>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11f5 <main+0xc5>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    120c <main+0xdc>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1211 <main+0xe1>
jmp    1287 <main+0x157>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    123e <main+0x10e>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1282 <main+0x152>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1266 <main+0x136>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    127d <main+0x14d>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1282 <main+0x152>
jmp    1287 <main+0x157>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    12a5 <main+0x175>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    12c3 <main+0x193>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    12e1 <main+0x1b1>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdba(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed0(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%eax
mov    0x4(%rsp),%r8d
cmp    %eax,%ecx
jge    11b3 <main+0x83>
lea    0xeac(%rip),%rdi
cmp    %r8d,%eax
jge    11c6 <main+0x96>
mov    %ecx,%esi
mov    %eax,%edx
mov    %r8d,%ecx
jmp    11fe <main+0xce>
cmp    %eax,%r8d
jge    11d4 <main+0xa4>
lea    0xe92(%rip),%rdi
mov    %r8d,%esi
mov    %eax,%edx
jmp    11fe <main+0xce>
cmp    %r8d,%ecx
jge    11e9 <main+0xb9>
mov    %ecx,%esi
mov    %r8d,%edx
mov    %eax,%ecx
jmp    11fe <main+0xce>
cmp    %r8d,%ecx
jge    11f2 <main+0xc2>
lea    0xe71(%rip),%rdi
mov    %eax,%esi
mov    %ecx,%edx
mov    %r8d,%ecx
jmp    11fe <main+0xce>
mov    %r8d,%esi
mov    %ecx,%edx
mov    %eax,%ecx
jmp    11fe <main+0xce>
lea    0xe7a(%rip),%rdi
mov    %eax,%esi
mov    %r8d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%edx
cmp    %edx,%ecx
jle    121d <main+0xed>
mov    %edx,0xc(%rsp)
mov    %ecx,0x8(%rsp)
mov    %ecx,%eax
jmp    1221 <main+0xf1>
mov    %edx,%eax
mov    %ecx,%edx
mov    0x4(%rsp),%ecx
cmp    %ecx,%edx
jle    123d <main+0x10d>
mov    %ecx,0xc(%rsp)
mov    %edx,0x4(%rsp)
mov    %ecx,%esi
cmp    %edx,%eax
jg     1245 <main+0x115>
mov    %edx,%ecx
mov    %eax,%edx
jmp    124f <main+0x11f>
mov    %edx,%esi
mov    %ecx,%edx
cmp    %edx,%eax
jle    1237 <main+0x107>
mov    %edx,0x8(%rsp)
mov    %eax,0x4(%rsp)
mov    %eax,%ecx
lea    0xe40(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe55(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\0A Inserisci il numero a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"\0A Inserisci il numero b: \00"
@.str.3 = [26 x i8] c"\0A Inserisci il numero c: \00"
@.str.4 = [34 x i8] c"\0A L'ordine voluto e': %d, %d, %d\0A\00"
@.str.5 = [35 x i8] c"\0A L'ordine voluto e': %d, %d, %d \0A\00"
@.str.6 = [35 x i8] c"\0A L'ordine voluto \C3\A8: %d, %d, %d \0A\00"
@.str.7 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %40
15: ; preds = %0
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %20, i32 %21, i32 %22)
br label %39
24: ; preds = %15
%25 = load i32, i32* %2
%26 = load i32, i32* %4
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %33
28: ; preds = %24
%29 = load i32, i32* %2
%30 = load i32, i32* %4
%31 = load i32, i32* %3
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %29, i32 %30, i32 %31)
br label %38
33: ; preds = %24
%34 = load i32, i32* %4
%35 = load i32, i32* %2
%36 = load i32, i32* %3
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %34, i32 %35, i32 %36)
br label %38
38: ; preds = %33, %28
br label %39
39: ; preds = %38, %19
br label %65
40: ; preds = %0
%41 = load i32, i32* %4
%42 = load i32, i32* %3
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %49
44: ; preds = %40
%45 = load i32, i32* %4
%46 = load i32, i32* %3
%47 = load i32, i32* %2
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %45, i32 %46, i32 %47)
br label %64
49: ; preds = %40
%50 = load i32, i32* %2
%51 = load i32, i32* %4
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %58
53: ; preds = %49
%54 = load i32, i32* %3
%55 = load i32, i32* %2
%56 = load i32, i32* %4
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %54, i32 %55, i32 %56)
br label %63
58: ; preds = %49
%59 = load i32, i32* %3
%60 = load i32, i32* %4
%61 = load i32, i32* %2
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %59, i32 %60, i32 %61)
br label %63
63: ; preds = %58, %53
br label %64
64: ; preds = %63, %44
br label %65
65: ; preds = %64, %39
%66 = load i32, i32* %2
%67 = load i32, i32* %3
%68 = icmp sgt i32 %66, %67
br i1 %68, label %69, label %73
69: ; preds = %65
%70 = load i32, i32* %2
store i32 %70, i32* %5
%71 = load i32, i32* %3
store i32 %71, i32* %2
%72 = load i32, i32* %5
store i32 %72, i32* %3
br label %73
73: ; preds = %69, %65
%74 = load i32, i32* %2
%75 = load i32, i32* %4
%76 = icmp sgt i32 %74, %75
br i1 %76, label %77, label %81
77: ; preds = %73
%78 = load i32, i32* %2
store i32 %78, i32* %5
%79 = load i32, i32* %4
store i32 %79, i32* %2
%80 = load i32, i32* %5
store i32 %80, i32* %4
br label %81
81: ; preds = %77, %73
%82 = load i32, i32* %3
%83 = load i32, i32* %4
%84 = icmp sgt i32 %82, %83
br i1 %84, label %85, label %89
85: ; preds = %81
%86 = load i32, i32* %3
store i32 %86, i32* %5
%87 = load i32, i32* %4
store i32 %87, i32* %3
%88 = load i32, i32* %5
store i32 %88, i32* %4
br label %89
89: ; preds = %85, %81
%90 = load i32, i32* %2
%91 = load i32, i32* %3
%92 = load i32, i32* %4
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %90, i32 %91, i32 %92)
%94 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0A Inserisci il numero a: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"\0A Inserisci il numero b: \00"
@.str.3 = [26 x i8] c"\0A Inserisci il numero c: \00"
@.str.4 = [34 x i8] c"\0A L'ordine voluto e': %d, %d, %d\0A\00"
@.str.5 = [35 x i8] c"\0A L'ordine voluto e': %d, %d, %d \0A\00"
@.str.6 = [35 x i8] c"\0A L'ordine voluto \C3\A8: %d, %d, %d \0A\00"
@.str.7 = [6 x i8] c"pause\00"
define i32 @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 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
%16 = load i32, i32* %3
br i1 %15, label %17, label %27
17: ; preds = %0
%18 = icmp slt i32 %14, %16
br i1 %18, label %19, label %21
19: ; preds = %17
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %13, i32 %14, i32 %16)
br label %37
21: ; preds = %17
%22 = icmp slt i32 %13, %16
br i1 %22, label %23, label %25
23: ; preds = %21
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %13, i32 %16, i32 %14)
br label %37
25: ; preds = %21
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %16, i32 %13, i32 %14)
br label %37
27: ; preds = %0
%28 = icmp slt i32 %16, %14
br i1 %28, label %29, label %31
29: ; preds = %27
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %16, i32 %14, i32 %13)
br label %37
31: ; preds = %27
%32 = icmp slt i32 %13, %16
br i1 %32, label %33, label %35
33: ; preds = %31
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 %14, i32 %13, i32 %16)
br label %37
35: ; preds = %31
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i32 %14, i32 %16, i32 %13)
br label %37
37: ; preds = %29, %35, %33, %19, %25, %23
%38 = load i32, i32* %1
%39 = load i32, i32* %2
%40 = icmp sgt i32 %38, %39
br i1 %40, label %41, label %42
41: ; preds = %37
store i32 %39, i32* %1
store i32 %38, i32* %2
br label %42
42: ; preds = %41, %37
%43 = phi i32 [ %38, %41 ], [ %39, %37 ]
%44 = phi i32 [ %39, %41 ], [ %38, %37 ]
%45 = load i32, i32* %3
%46 = icmp sgt i32 %44, %45
br i1 %46, label %47, label %48
47: ; preds = %42
store i32 %45, i32* %1
store i32 %44, i32* %3
br label %48
48: ; preds = %47, %42
%49 = phi i32 [ %45, %47 ], [ %44, %42 ]
%50 = phi i32 [ %44, %47 ], [ %45, %42 ]
%51 = icmp sgt i32 %43, %50
br i1 %51, label %52, label %53
52: ; preds = %48
store i32 %50, i32* %2
store i32 %43, i32* %3
br label %53
53: ; preds = %52, %48
%54 = phi i32 [ %43, %52 ], [ %50, %48 ]
%55 = phi i32 [ %50, %52 ], [ %43, %48 ]
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 %49, i32 %55, i32 %54)
%57 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}