#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 a, b, c;
  printf("Digite os pesos 'A', 'B' e 'C': ");
  scanf("%d %d %d", &a, &b, &c);
  if (a == b) {
    printf("A esfera 'C' é diferente\a\n");
  } else if (a == c) {
    printf("A esfera 'B' é diferente\a\n");
  } else {
    printf("A esfera 'A' é diferente\a\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%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
jne    1170 <main+0x50>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    119e <main+0x7e>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    118d <main+0x6d>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
jmp    1199 <main+0x79>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
jmp    119e <main+0x7e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    0xc(%rsp),%eax
lea    0xedb(%rip),%rcx
lea    0xeb9(%rip),%rdx
cmove  %rcx,%rdx
cmp    0x10(%rsp),%eax
lea    0xee0(%rip),%rdi
cmovne %rdx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Digite os pesos 'A', 'B' e 'C': \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@.str.2 = [28 x i8] c"A esfera 'C' \C3\A9 diferente\07\0A\00"
@.str.3 = [28 x i8] c"A esfera 'B' \C3\A9 diferente\07\0A\00"
@.str.4 = [28 x i8] c"A esfera 'A' \C3\A9 diferente\07\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 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 eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %21
12: ; preds = %0
%13 = load i32, i32* %2
%14 = load i32, i32* %4
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %20
18: ; preds = %12
%19 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
br label %21
21: ; preds = %20, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Digite os pesos 'A', 'B' e 'C': \00"
@.str.1 = [9 x i8] c"%d %d %d\00"
@str = [27 x i8] c"A esfera 'A' \C3\A9 diferente\07\00"
@str.5 = [27 x i8] c"A esfera 'B' \C3\A9 diferente\07\00"
@str.6 = [27 x i8] c"A esfera 'C' \C3\A9 diferente\07\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 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 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
%12 = load i32, i32* %3
%13 = icmp eq i32 %9, %12
%14 = select i1 %13, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0)
%15 = select i1 %11, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.6, i64 0, i64 0), i8* %14
%16 = call i32 @puts(i8* dereferenceable(1) %15)
ret i32 0
}