#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__ EOF;
int highhand(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ scanf(char *, char *);
int main(int ARGC, char **ARGV) {
  char cards[2 * 5 + 1];
  char hand_id[5];
  int success;
  while (scanf("%s", cards) != EOF) {
    success = highhand(cards, hand_id);
    printf("%s %s\n", cards, success ? hand_id : "--");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1b(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2e8b(%rip),%rcx
cmp    (%rcx),%rax
je     11be <main+0x8e>
lea    -0x1b(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <highhand@plt>
mov    %eax,-0x24(%rbp)
lea    -0x1b(%rbp),%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1195 <main+0x65>
lea    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    11a5 <main+0x75>
lea    0xe6e(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    11a5 <main+0x75>
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
lea    0xe4f(%rip),%rdi
call   1040 <printf@plt>
jmp    1146 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebb(%rip),%rdi
lea    0xd(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e92(%rip),%r13
cmp    0x0(%r13),%rax
je     11b0 <main+0x80>
lea    0xd(%rsp),%rbx
lea    0x8(%rsp),%r14
lea    0xe9d(%rip),%rbp
lea    0xe8f(%rip),%r15
lea    0xe85(%rip),%r12
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <highhand@plt>
test   %eax,%eax
mov    %r14,%rdx
cmove  %rbp,%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%s %s\0A\00"
@.str.2 = [3 x i8] c"--\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [11 x i8]
%7 = alloca [5 x i8]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %9
9: ; preds = %24, %2
%10 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%11 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i64, i64* @EOF
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %9
%15 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%17 = call i32 @highhand(i8* %15, i8* %16)
store i32 %17, i32* %8
%18 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%19 = load i32, i32* %8
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %14
%22 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
br label %24
23: ; preds = %14
br label %24
24: ; preds = %23, %21
%25 = phi i8* [ %22, %21 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), %23 ]
%26 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %18, i8* %25)
br label %9
27: ; preds = %9
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%s %s\0A\00"
@.str.2 = [3 x i8] c"--\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [11 x i8]
%4 = alloca [5 x i8]
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %18, label %10
10: ; preds = %2, %10
%11 = call i32 @highhand(i8* %5, i8* %6)
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %13)
%15 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%16 = load i64, i64* @EOF
%17 = icmp eq i64 %15, %16
br i1 %17, label %18, label %10
18: ; preds = %10, %2
ret i32 0
}