#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*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int x = 0, y = 0, z = 0;
  puts("请输入三个整数");
  printf("整数A: ");
  scanf("%d", &x);
  printf("整数B: ");
  scanf("%d", &y);
  printf("整数C: ");
  scanf("%d", &z);
  if (x == y && y == z) {
    puts("三个值都相等");
  } else if (x == y || y == z || x == z) {
    puts("有两个值相等");
  } else {
    puts("三个值各不相同");
  }
  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    0xea5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
lea    0xead(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
lea    0xe91(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe75(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11dd <main+0xad>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11dd <main+0xad>
lea    0xe64(%rip),%rdi
call   1030 <puts@plt>
jmp    1223 <main+0xf3>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1201 <main+0xd1>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1201 <main+0xd1>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1212 <main+0xe2>
lea    0xe42(%rip),%rdi
call   1030 <puts@plt>
jmp    121e <main+0xee>
lea    0xe44(%rip),%rdi
call   1030 <puts@plt>
jmp    1223 <main+0xf3>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%edx
lea    0xe8c(%rip),%rsi
cmp    %edx,%eax
lea    0xe96(%rip),%rbx
cmove  %rsi,%rbx
cmp    %edx,%ecx
lea    0xe63(%rip),%rdi
cmovne %rsi,%rdi
cmove  %rsi,%rbx
cmp    %ecx,%eax
cmovne %rsi,%rdi
cmovne %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\89\E4\B8\AA\E6\95\B4\E6\95\B0\00"
@.str.1 = [10 x i8] c"\E6\95\B4\E6\95\B0A: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [10 x i8] c"\E6\95\B4\E6\95\B0B: \00"
@.str.4 = [10 x i8] c"\E6\95\B4\E6\95\B0C: \00"
@.str.5 = [19 x i8] c"\E4\B8\89\E4\B8\AA\E5\80\BC\E9\83\BD\E7\9B\B8\E7\AD\89\00"
@.str.6 = [19 x i8] c"\E6\9C\89\E4\B8\A4\E4\B8\AA\E5\80\BC\E7\9B\B8\E7\AD\89\00"
@.str.7 = [22 x i8] c"\E4\B8\89\E4\B8\AA\E5\80\BC\E5\90\84\E4\B8\8D\E7\9B\B8\E5\90\8C\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 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %0
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %38
21: ; preds = %15, %0
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = icmp eq i32 %22, %23
br i1 %24, label %33, label %25
25: ; preds = %21
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = icmp eq i32 %26, %27
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = load i32, i32* %2
%31 = load i32, i32* %4
%32 = icmp eq i32 %30, %31
br i1 %32, label %33, label %35
33: ; preds = %29, %25, %21
%34 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %37
35: ; preds = %29
%36 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
br label %37
37: ; preds = %35, %33
br label %38
38: ; preds = %37, %19
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\89\E4\B8\AA\E6\95\B4\E6\95\B0\00"
@.str.1 = [10 x i8] c"\E6\95\B4\E6\95\B0A: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [10 x i8] c"\E6\95\B4\E6\95\B0B: \00"
@.str.4 = [10 x i8] c"\E6\95\B4\E6\95\B0C: \00"
@.str.5 = [19 x i8] c"\E4\B8\89\E4\B8\AA\E5\80\BC\E9\83\BD\E7\9B\B8\E7\AD\89\00"
@.str.6 = [19 x i8] c"\E6\9C\89\E4\B8\A4\E4\B8\AA\E5\80\BC\E7\9B\B8\E7\AD\89\00"
@.str.7 = [22 x i8] c"\E4\B8\89\E4\B8\AA\E5\80\BC\E5\90\84\E4\B8\8D\E7\9B\B8\E5\90\8C\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 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%10 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = icmp eq i32 %14, %15
%17 = load i32, i32* %3
%18 = icmp eq i32 %15, %17
%19 = select i1 %16, i1 %18, i1 false
%20 = select i1 %19, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0)
%21 = icmp eq i32 %14, %17
%22 = select i1 %18, i1 true, i1 %21
%23 = select i1 %22, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0)
%24 = select i1 %16, i8* %20, i8* %23
%25 = call i32 @puts(i8* dereferenceable(1) %24)
ret i32 0
}