#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*/ getchar();
int /*<<< orphan*/ puts(char *);
scalar_t__ strcmp(char *, char *);
int main() {
  char a[] = "zhangfei", b[] = "guanyu", c[] = "zhaoyun", *p = b;
  if (strcmp(a, b) > 0)
    p = a;
  if (strcmp(p, c) < 0)
    p = c;
  puts(p);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xeb8(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xeb0(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    0xeaa(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xea2(%rip),%al
mov    %al,-0xe(%rbp)
mov    0xe99(%rip),%rax
mov    %rax,-0x1c(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0xd(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jle    11a2 <main+0x72>
lea    -0xd(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jge    11c1 <main+0x91>
lea    -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movabs $0x696566676e61687a,%rax
66 65 69
mov    %rax,0x10(%rsp)
movb   $0x0,0x18(%rsp)
movl   $0x75796e,0xb(%rsp)
movl   $0x6e617567,0x8(%rsp)
6e
movabs $0x6e75796f61687a,%rax
mov    %rax,0x20(%rsp)
lea    0x10(%rsp),%r14
lea    0x8(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
cmovg  %r14,%rbx
lea    0x20(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
cmovs  %r14,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.a = [9 x i8] c"zhangfei\00"
@__const.main.b = [7 x i8] c"guanyu\00"
@__const.main.c = [8 x i8] c"zhaoyun\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = alloca [7 x i8]
%4 = alloca [8 x i8]
%5 = alloca i8*
store i32 0, i32* %1
%6 = bitcast [9 x i8]* %2 to i8*
%7 = bitcast [7 x i8]* %3 to i8*
%8 = bitcast [8 x i8]* %4 to i8*
%9 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
store i8* %9, i8** %5
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%12 = call i64 @strcmp(i8* %10, i8* %11)
%13 = icmp sgt i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
store i8* %15, i8** %5
br label %16
16: ; preds = %14, %0
%17 = load i8*, i8** %5
%18 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%19 = call i64 @strcmp(i8* %17, i8* %18)
%20 = icmp slt i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
store i8* %22, i8** %5
br label %23
23: ; preds = %21, %16
%24 = load i8*, i8** %5
%25 = call i32 @puts(i8* %24)
%26 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [9 x i8] c"zhangfei\00"
@__const.main.b = [7 x i8] c"guanyu\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [7 x i8]
%3 = alloca i64
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%6 = bitcast i64* %3 to i8*
store i64 31091411858319482, i64* %3
%7 = call i64 @strcmp(i8* %4, i8* %5)
%8 = icmp sgt i64 %7, 0
%9 = select i1 %8, i8* %4, i8* %5
%10 = call i64 @strcmp(i8* %9, i8* %6)
%11 = icmp slt i64 %10, 0
%12 = select i1 %11, i8* %6, i8* %9
%13 = call i32 @puts(i8* dereferenceable(1) %12)
%14 = call i32 (...) @getchar()
ret i32 0
}