#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 *);
int main(void) {
  int x = 0, y = 0, z = 0, u = 0;
  int max = 0;
  printf("输入4个整数: ");
  scanf("%d%d%d%d", &x, &y, &z, &u);
  max = x;
  if (y > max) {
    max = y;
  }
  if (z > max) {
    max = z;
  }
  if (u > max) {
    max = u;
  }
  printf("输入整数(%d %d %d %d)中最大的数为%d\n", x, y, z, u, max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1194 <main+0x74>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    11a6 <main+0x86>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    11b8 <main+0x98>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
cmp    %esi,%edx
mov    %esi,%r9d
cmovg  %edx,%r9d
mov    0xc(%rsp),%ecx
cmp    %r9d,%ecx
cmovg  %ecx,%r9d
mov    0x8(%rsp),%r8d
cmp    %r9d,%r8d
cmovg  %r8d,%r9d
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\E8\BE\93\E5\85\A54\E4\B8\AA\E6\95\B4\E6\95\B0: \00"
@.str.1 = [9 x i8] c"%d%d%d%d\00"
@.str.2 = [47 x i8] c"\E8\BE\93\E5\85\A5\E6\95\B4\E6\95\B0(%d %d %d %d)\E4\B8\AD\E6\9C\80\E5\A4\A7\E7\9A\84\E6\95\B0\E4\B8\BA%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 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* %2, i32* %3, i32* %4, i32* %5)
%9 = load i32, i32* %2
store i32 %9, i32* %6
%10 = load i32, i32* %3
%11 = load i32, i32* %6
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = load i32, i32* %3
store i32 %14, i32* %6
br label %15
15: ; preds = %13, %0
%16 = load i32, i32* %4
%17 = load i32, i32* %6
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i32, i32* %4
store i32 %20, i32* %6
br label %21
21: ; preds = %19, %15
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = icmp sgt i32 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load i32, i32* %5
store i32 %26, i32* %6
br label %27
27: ; preds = %25, %21
%28 = load i32, i32* %2
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = load i32, i32* %5
%32 = load i32, i32* %6
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %28, i32 %29, i32 %30, i32 %31, i32 %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\E8\BE\93\E5\85\A54\E4\B8\AA\E6\95\B4\E6\95\B0: \00"
@.str.1 = [9 x i8] c"%d%d%d%d\00"
@.str.2 = [47 x i8] c"\E8\BE\93\E5\85\A5\E6\95\B4\E6\95\B0(%d %d %d %d)\E4\B8\AD\E6\9C\80\E5\A4\A7\E7\9A\84\E6\95\B0\E4\B8\BA%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%6 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%7 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%8 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, %11
%14 = select i1 %13, i32 %12, i32 %11
%15 = load i32, i32* %3
%16 = icmp sgt i32 %15, %14
%17 = select i1 %16, i32 %15, i32 %14
%18 = load i32, i32* %4
%19 = icmp sgt i32 %18, %17
%20 = select i1 %19, i32 %18, i32 %17
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %12, i32 %15, i32 %18, i32 %20)
ret i32 0
}