#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 main(void) {
  int valor1 = 0, valor2 = 0, valor3 = 0;
  printf("Informe os tres valores inteiros diferentes : ");
  scanf("%d %d %d", &valor1, &valor2, &valor3);
  if ((valor1 != valor2) && (valor2 != valor3) && (valor3 != valor1)) {
    printf("A soma é %d  : \n", valor3 + valor2 + valor1);
    printf("A media é %d  : \n", (valor3 + valor2 + valor1) / 3);
    printf("O produto é %d  : \n", valor3 * valor2 * valor1);
    if ((valor1 > valor2) && (valor1 > valor3)) {
      if (valor2 > valor3) {
        printf("O Menor é %d  : \n", valor3);
        printf("O Maior é %d  : \n", valor1);
      } else {
        printf("O Menor é %d  : \n", valor2);
        printf("O Maior é %d  : \n", valor1);
      }
    } else {
      if ((valor2 > valor3) && (valor2 > valor1)) {
        if (valor3 > valor1) {
          printf("O Menor é %d  : \n", valor1);
          printf("O Maior é %d  : \n", valor2);
        } else {
          printf("O Menor é %d  : \n", valor3);
          printf("O Maior é %d  : \n", valor2);
        }
      } else {
        if (valor2 > valor1) {
          printf("O Menor é %d  : \n", valor1);
          printf("O Maior é %d  : \n", valor3);
        } else {
          printf("O Menor é %d  : \n", valor2);
          printf("O Maior é %d  : \n", valor3);
        }
      }
    }
  } else {
    printf("um desses numeros sao iguais : \n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeb5(%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
je     1327 <main+0x207>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1327 <main+0x207>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1327 <main+0x207>
mov    -0x10(%rbp),%esi
add    -0xc(%rbp),%esi
add    -0x8(%rbp),%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
imul   -0xc(%rbp),%esi
imul   -0x8(%rbp),%esi
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1251 <main+0x131>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1251 <main+0x131>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    122a <main+0x10a>
mov    -0x10(%rbp),%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124c <main+0x12c>
mov    -0xc(%rbp),%esi
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1322 <main+0x202>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    12c3 <main+0x1a3>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    12c3 <main+0x1a3>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    129c <main+0x17c>
mov    -0x8(%rbp),%esi
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12be <main+0x19e>
mov    -0x10(%rbp),%esi
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    131d <main+0x1fd>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    12f6 <main+0x1d6>
mov    -0x8(%rbp),%esi
lea    0xd99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xd9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1318 <main+0x1f8>
mov    -0xc(%rbp),%esi
lea    0xd72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xd74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    131d <main+0x1fd>
jmp    1322 <main+0x202>
jmp    1335 <main+0x215>
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%esi
cmp    %esi,%eax
je     121a <main+0xea>
mov    0xc(%rsp),%ecx
cmp    %ecx,%esi
je     121a <main+0xea>
cmp    %eax,%ecx
je     121a <main+0xea>
add    %eax,%esi
add    %ecx,%esi
lea    0xe94(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%eax
add    0xc(%rsp),%eax
add    0x14(%rsp),%eax
cltq
imul   $0x55555556,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
shr    $0x20,%rsi
add    %eax,%esi
lea    0xe76(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
imul   0xc(%rsp),%esi
imul   0x14(%rsp),%esi
lea    0xe6d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%ecx
cmp    %eax,%esi
jle    1228 <main+0xf8>
cmp    %ecx,%esi
jle    1228 <main+0xf8>
lea    0xe60(%rip),%rdi
cmp    %ecx,%eax
jle    1264 <main+0x134>
mov    %ecx,%esi
jmp    1266 <main+0x136>
lea    0xe77(%rip),%rdi
call   1030 <puts@plt>
jmp    127f <main+0x14f>
cmp    %ecx,%eax
jle    124a <main+0x11a>
cmp    %esi,%eax
jle    124a <main+0x11a>
lea    0xe3b(%rip),%rdi
cmp    %esi,%ecx
jg     123d <main+0x10d>
mov    %ecx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
jmp    1271 <main+0x141>
lea    0xe21(%rip),%rdi
cmp    %esi,%eax
jg     1257 <main+0x127>
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
jmp    1271 <main+0x141>
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xe0d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Informe os tres valores inteiros diferentes : \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [18 x i8] c"A soma \C3\A9 %d : \0A\00"
@.str.3 = [19 x i8] c"A media \C3\A9 %d : \0A\00"
@.str.4 = [21 x i8] c"O produto \C3\A9 %d : \0A\00"
@.str.5 = [19 x i8] c"O Menor \C3\A9 %d : \0A\00"
@.str.6 = [19 x i8] c"O Maior \C3\A9 %d : \0A\00"
@.str.7 = [33 x i8] c"um desses numeros sao iguais : \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 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 ne i32 %7, %8
br i1 %9, label %10, label %100
10: ; preds = %0
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp ne i32 %11, %12
br i1 %13, label %14, label %100
14: ; preds = %10
%15 = load i32, i32* %4
%16 = load i32, i32* %2
%17 = icmp ne i32 %15, %16
br i1 %17, label %18, label %100
18: ; preds = %14
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %2
%23 = add nsw i32 %21, %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %4
%26 = load i32, i32* %3
%27 = add nsw i32 %25, %26
%28 = load i32, i32* %2
%29 = add nsw i32 %27, %28
%30 = sdiv i32 %29, 3
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %4
%33 = load i32, i32* %3
%34 = mul nsw i32 %32, %33
%35 = load i32, i32* %2
%36 = mul nsw i32 %34, %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %2
%39 = load i32, i32* %3
%40 = icmp sgt i32 %38, %39
br i1 %40, label %41, label %60
41: ; preds = %18
%42 = load i32, i32* %2
%43 = load i32, i32* %4
%44 = icmp sgt i32 %42, %43
br i1 %44, label %45, label %60
45: ; preds = %41
%46 = load i32, i32* %3
%47 = load i32, i32* %4
%48 = icmp sgt i32 %46, %47
br i1 %48, label %49, label %54
49: ; preds = %45
%50 = load i32, i32* %4
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %2
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %52)
br label %59
54: ; preds = %45
%55 = load i32, i32* %3
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %55)
%57 = load i32, i32* %2
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %54, %49
br label %99
60: ; preds = %41, %18
%61 = load i32, i32* %3
%62 = load i32, i32* %4
%63 = icmp sgt i32 %61, %62
br i1 %63, label %64, label %83
64: ; preds = %60
%65 = load i32, i32* %3
%66 = load i32, i32* %2
%67 = icmp sgt i32 %65, %66
br i1 %67, label %68, label %83
68: ; preds = %64
%69 = load i32, i32* %4
%70 = load i32, i32* %2
%71 = icmp sgt i32 %69, %70
br i1 %71, label %72, label %77
72: ; preds = %68
%73 = load i32, i32* %2
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %73)
%75 = load i32, i32* %3
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %75)
br label %82
77: ; preds = %68
%78 = load i32, i32* %4
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %78)
%80 = load i32, i32* %3
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %80)
br label %82
82: ; preds = %77, %72
br label %98
83: ; preds = %64, %60
%84 = load i32, i32* %3
%85 = load i32, i32* %2
%86 = icmp sgt i32 %84, %85
br i1 %86, label %87, label %92
87: ; preds = %83
%88 = load i32, i32* %2
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %88)
%90 = load i32, i32* %4
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %90)
br label %97
92: ; preds = %83
%93 = load i32, i32* %3
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %93)
%95 = load i32, i32* %4
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %95)
br label %97
97: ; preds = %92, %87
br label %98
98: ; preds = %97, %82
br label %99
99: ; preds = %98, %59
br label %102
100: ; preds = %14, %10, %0
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
br label %102
102: ; preds = %100, %99
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"Informe os tres valores inteiros diferentes : \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [18 x i8] c"A soma \C3\A9 %d : \0A\00"
@.str.3 = [19 x i8] c"A media \C3\A9 %d : \0A\00"
@.str.4 = [21 x i8] c"O produto \C3\A9 %d : \0A\00"
@.str.5 = [19 x i8] c"O Menor \C3\A9 %d : \0A\00"
@.str.6 = [19 x i8] c"O Maior \C3\A9 %d : \0A\00"
@str = [32 x i8] c"um desses numeros sao iguais : \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 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 eq i32 %9, %10
br i1 %11, label %72, label %12
12: ; preds = %0
%13 = load i32, i32* %3
%14 = icmp eq i32 %10, %13
%15 = icmp eq i32 %13, %9
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %72, label %17
17: ; preds = %12
%18 = add i32 %10, %9
%19 = add i32 %18, %13
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = add nsw i32 %22, %21
%24 = load i32, i32* %1
%25 = add nsw i32 %23, %24
%26 = sdiv i32 %25, 3
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %3
%29 = load i32, i32* %2
%30 = mul nsw i32 %29, %28
%31 = load i32, i32* %1
%32 = mul nsw i32 %30, %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %1
%35 = load i32, i32* %2
%36 = icmp sgt i32 %34, %35
%37 = load i32, i32* %3
%38 = icmp sgt i32 %34, %37
%39 = select i1 %36, i1 %38, i1 false
%40 = icmp sgt i32 %35, %37
br i1 %39, label %41, label %50
41: ; preds = %17
br i1 %40, label %42, label %46
42: ; preds = %41
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %37)
%44 = load i32, i32* %1
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %44)
br label %74
46: ; preds = %41
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %35)
%48 = load i32, i32* %1
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %48)
br label %74
50: ; preds = %17
%51 = icmp sgt i32 %35, %34
%52 = select i1 %40, i1 %51, i1 false
br i1 %52, label %53, label %63
53: ; preds = %50
%54 = icmp sgt i32 %37, %34
br i1 %54, label %55, label %59
55: ; preds = %53
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %34)
%57 = load i32, i32* %2
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %57)
br label %74
59: ; preds = %53
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %37)
%61 = load i32, i32* %2
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %61)
br label %74
63: ; preds = %50
br i1 %51, label %64, label %68
64: ; preds = %63
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %34)
%66 = load i32, i32* %3
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %66)
br label %74
68: ; preds = %63
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %35)
%70 = load i32, i32* %3
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %70)
br label %74
72: ; preds = %12, %0
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
br label %74
74: ; preds = %46, %42, %64, %68, %55, %59, %72
ret i32 0
}