#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 */
scalar_t__ cmp(char *, char *);
int /*<<< orphan*/ fun(char *, char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char a[100], b[100], c[100];
  printf("ÕÝÈëÈý½M×Ö·û´®:\n");
  gets(a);
  gets(b);
  gets(c);
  if (cmp(b, c) > 0)
    fun(b, c);
  if (cmp(a, b) > 0)
    fun(a, b);
  if (cmp(a, c) > 0)
    fun(a, c);
  printf("===========\n");
  puts(b);
  puts(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe97(%rip),%rdi
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1070 <gets@plt>
lea    -0xe0(%rbp),%rdi
call   1070 <gets@plt>
lea    -0x150(%rbp),%rdi
call   1070 <gets@plt>
lea    -0xe0(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   1060 <cmp@plt>
cmp    $0x0,%rax
jle    11bf <main+0x6f>
lea    -0xe0(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   1040 <fun@plt>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1060 <cmp@plt>
cmp    $0x0,%rax
jle    11e9 <main+0x99>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1040 <fun@plt>
lea    -0x70(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   1060 <cmp@plt>
cmp    $0x0,%rax
jle    1213 <main+0xc3>
lea    -0x70(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   1040 <fun@plt>
lea    0xe08(%rip),%rdi
call   1050 <printf@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x150(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x148,%rsp
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
lea    0xe0(%rsp),%rdi
call   1060 <gets@plt>
lea    0x70(%rsp),%r14
mov    %r14,%rdi
call   1060 <gets@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <gets@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <cmp@plt>
test   %rax,%rax
jle    1198 <main+0x58>
lea    0x70(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <fun@plt>
lea    0xe0(%rsp),%rdi
lea    0x70(%rsp),%rsi
call   1050 <cmp@plt>
test   %rax,%rax
jle    11c1 <main+0x81>
lea    0xe0(%rsp),%rdi
lea    0x70(%rsp),%rsi
call   1040 <fun@plt>
lea    0xe0(%rsp),%rdi
mov    %rsp,%rsi
call   1050 <cmp@plt>
test   %rax,%rax
jle    11e6 <main+0xa6>
lea    0xe0(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <fun@plt>
lea    0xe34(%rip),%rdi
call   1030 <puts@plt>
lea    0x70(%rsp),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\C3\95\C2\88\C3\9D\C2\94\C3\88\C3\AB\C3\88\C3\BD\C2\BDM\C3\97\C3\96\C2\B7\C3\BB\C2\B4\C2\AE:\0A\00"
@.str.1 = [13 x i8] c"===========\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 @gets(i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = call i32 @gets(i8* %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%11 = call i32 @gets(i8* %10)
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%14 = call i64 @cmp(i8* %12, i8* %13)
%15 = icmp sgt i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %0
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%19 = call i32 @fun(i8* %17, i8* %18)
br label %20
20: ; preds = %16, %0
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%23 = call i64 @cmp(i8* %21, i8* %22)
%24 = icmp sgt i64 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %20
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%28 = call i32 @fun(i8* %26, i8* %27)
br label %29
29: ; preds = %25, %20
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%32 = call i64 @cmp(i8* %30, i8* %31)
%33 = icmp sgt i64 %32, 0
br i1 %33, label %34, label %38
34: ; preds = %29
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%37 = call i32 @fun(i8* %35, i8* %36)
br label %38
38: ; preds = %34, %29
%39 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%41 = call i32 @puts(i8* %40)
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%43 = call i32 @puts(i8* %42)
ret i32 0
}

LLVM IR (-O2):
@str = [33 x i8] c"\C3\95\C2\88\C3\9D\C2\94\C3\88\C3\AB\C3\88\C3\BD\C2\BDM\C3\97\C3\96\C2\B7\C3\BB\C2\B4\C2\AE:\00"
@str.2 = [12 x i8] c"===========\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%8 = call i32 @gets(i8* %4)
%9 = call i32 @gets(i8* %5)
%10 = call i32 @gets(i8* %6)
%11 = call i64 @cmp(i8* %5, i8* %6)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @fun(i8* %5, i8* %6)
br label %15
15: ; preds = %13, %0
%16 = call i64 @cmp(i8* %4, i8* %5)
%17 = icmp sgt i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @fun(i8* %4, i8* %5)
br label %20
20: ; preds = %18, %15
%21 = call i64 @cmp(i8* %4, i8* %6)
%22 = icmp sgt i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @fun(i8* %4, i8* %6)
br label %25
25: ; preds = %23, %20
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
%27 = call i32 @puts(i8* %5)
%28 = call i32 @puts(i8* %6)
ret i32 0
}