#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*/ eval_7cards_fast(int, int, int, int, int, int, int);
short minv(short, int /*<<< orphan*/);
short eval_8cards_fast(int c1, int c2, int c3, int c4, int c5, int c6, int c7,
                       int c8) {
  short best = 10000;
  best = minv(best, eval_7cards_fast(c1, c2, c3, c4, c5, c6, c7));
  best = minv(best, eval_7cards_fast(c8, c2, c3, c4, c5, c6, c7));
  best = minv(best, eval_7cards_fast(c1, c8, c3, c4, c5, c6, c7));
  best = minv(best, eval_7cards_fast(c1, c2, c8, c4, c5, c6, c7));
  best = minv(best, eval_7cards_fast(c1, c2, c3, c8, c5, c6, c7));
  best = minv(best, eval_7cards_fast(c1, c2, c3, c4, c8, c6, c7));
  best = minv(best, eval_7cards_fast(c1, c2, c3, c4, c5, c8, c7));
  best = minv(best, eval_7cards_fast(c1, c2, c3, c4, c5, c6, c8));
  return best;
}


x86 assembly (clang, -O0):
<eval_8cards_fast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movw   $0x2710,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x2a(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x2a(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x28(%rbp)
mov    0x18(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x28(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x26(%rbp)
mov    -0x4(%rbp),%edi
mov    0x18(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x26(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x18(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x24(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x22(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x22(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    0x18(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x20(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x1e(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x1e(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
mov    -0x1a(%rbp),%ax
mov    %ax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x18(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    %eax,%esi
mov    -0x1c(%rbp),%ax
movswl %ax,%edi
call   1030 <minv@plt>
mov    %ax,-0x1a(%rbp)
movswl -0x1a(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_8cards_fast>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8d,0x2c(%rsp)
mov    %edi,0x28(%rsp)
mov    0x78(%rsp),%r14d
mov    %r14d,0x24(%rsp)
mov    0x70(%rsp),%eax
mov    %eax,(%rsp)
mov    %eax,%r13d
mov    %eax,0x18(%rsp)
mov    %esi,%r12d
mov    %esi,0x1c(%rsp)
mov    %edx,%r15d
mov    %edx,0x20(%rsp)
mov    %ecx,%ebp
mov    %r9d,%ebx
mov    %r9d,0x30(%rsp)
call   1040 <eval_7cards_fast@plt>
mov    $0x2710,%edi
mov    %eax,%esi
call   1030 <minv@plt>
mov    %ax,0x16(%rsp)
mov    %r13d,(%rsp)
mov    %r14d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    0x2c(%rsp),%r13d
mov    %r13d,%r8d
mov    %ebx,%r9d
call   1040 <eval_7cards_fast@plt>
movswl 0x16(%rsp),%edi
mov    %eax,%esi
call   1030 <minv@plt>
mov    %ax,0x16(%rsp)
mov    0x18(%rsp),%r12d
mov    %r12d,(%rsp)
mov    0x28(%rsp),%r14d
mov    %r14d,%edi
mov    0x24(%rsp),%r15d
mov    %r15d,%esi
mov    0x20(%rsp),%edx
mov    %ebp,%ebx
mov    %ebp,0x34(%rsp)
mov    %ebp,%ecx
mov    %r13d,%r8d
mov    %r13d,%ebp
mov    0x30(%rsp),%r13d
mov    %r13d,%r9d
call   1040 <eval_7cards_fast@plt>
movswl 0x16(%rsp),%edi
mov    %eax,%esi
call   1030 <minv@plt>
mov    %ax,0x16(%rsp)
mov    %r12d,(%rsp)
mov    %r14d,%edi
mov    0x1c(%rsp),%r12d
mov    %r12d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
mov    %ebp,%ebx
mov    %ebp,%r8d
mov    %r13d,%r9d
call   1040 <eval_7cards_fast@plt>
movswl 0x16(%rsp),%edi
mov    %eax,%esi
call   1030 <minv@plt>
mov    %ax,0x16(%rsp)
mov    0x18(%rsp),%ebp
mov    %ebp,(%rsp)
mov    %r14d,%edi
mov    %r12d,%esi
mov    0x20(%rsp),%r12d
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %ebx,%r8d
mov    %r13d,%r9d
call   1040 <eval_7cards_fast@plt>
movswl 0x16(%rsp),%edi
mov    %eax,%esi
call   1030 <minv@plt>
mov    %ax,0x16(%rsp)
mov    %ebp,(%rsp)
mov    %r14d,%ebx
mov    %r14d,%edi
mov    0x1c(%rsp),%ebp
mov    %ebp,%esi
mov    %r12d,%edx
mov    %r12d,%r15d
mov    0x34(%rsp),%r12d
mov    %r12d,%ecx
mov    0x24(%rsp),%r14d
mov    %r14d,%r8d
mov    %r13d,%r9d
call   1040 <eval_7cards_fast@plt>
movswl 0x16(%rsp),%edi
mov    %eax,%esi
call   1030 <minv@plt>
mov    %eax,%r13d
mov    0x18(%rsp),%eax
mov    %eax,(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    0x2c(%rsp),%ebp
mov    %ebp,%r8d
mov    %r14d,%r9d
call   1040 <eval_7cards_fast@plt>
movswl %r13w,%edi
mov    %eax,%esi
call   1030 <minv@plt>
mov    %eax,%ebx
mov    %r14d,(%rsp)
mov    0x28(%rsp),%edi
mov    0x1c(%rsp),%esi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    0x30(%rsp),%r9d
call   1040 <eval_7cards_fast@plt>
movswl %bx,%edi
mov    %eax,%esi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <minv@plt>

LLVM IR (-O0):
define signext i16 @eval_8cards_fast(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i16
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
store i16 10000, i16* %17
%18 = load i16, i16* %17
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = load i32, i32* %11
%22 = load i32, i32* %12
%23 = load i32, i32* %13
%24 = load i32, i32* %14
%25 = load i32, i32* %15
%26 = call i32 @eval_7cards_fast(i32 %19, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25)
%27 = call signext i16 @minv(i16 signext %18, i32 %26)
store i16 %27, i16* %17
%28 = load i16, i16* %17
%29 = load i32, i32* %16
%30 = load i32, i32* %10
%31 = load i32, i32* %11
%32 = load i32, i32* %12
%33 = load i32, i32* %13
%34 = load i32, i32* %14
%35 = load i32, i32* %15
%36 = call i32 @eval_7cards_fast(i32 %29, i32 %30, i32 %31, i32 %32, i32 %33, i32 %34, i32 %35)
%37 = call signext i16 @minv(i16 signext %28, i32 %36)
store i16 %37, i16* %17
%38 = load i16, i16* %17
%39 = load i32, i32* %9
%40 = load i32, i32* %16
%41 = load i32, i32* %11
%42 = load i32, i32* %12
%43 = load i32, i32* %13
%44 = load i32, i32* %14
%45 = load i32, i32* %15
%46 = call i32 @eval_7cards_fast(i32 %39, i32 %40, i32 %41, i32 %42, i32 %43, i32 %44, i32 %45)
%47 = call signext i16 @minv(i16 signext %38, i32 %46)
store i16 %47, i16* %17
%48 = load i16, i16* %17
%49 = load i32, i32* %9
%50 = load i32, i32* %10
%51 = load i32, i32* %16
%52 = load i32, i32* %12
%53 = load i32, i32* %13
%54 = load i32, i32* %14
%55 = load i32, i32* %15
%56 = call i32 @eval_7cards_fast(i32 %49, i32 %50, i32 %51, i32 %52, i32 %53, i32 %54, i32 %55)
%57 = call signext i16 @minv(i16 signext %48, i32 %56)
store i16 %57, i16* %17
%58 = load i16, i16* %17
%59 = load i32, i32* %9
%60 = load i32, i32* %10
%61 = load i32, i32* %11
%62 = load i32, i32* %16
%63 = load i32, i32* %13
%64 = load i32, i32* %14
%65 = load i32, i32* %15
%66 = call i32 @eval_7cards_fast(i32 %59, i32 %60, i32 %61, i32 %62, i32 %63, i32 %64, i32 %65)
%67 = call signext i16 @minv(i16 signext %58, i32 %66)
store i16 %67, i16* %17
%68 = load i16, i16* %17
%69 = load i32, i32* %9
%70 = load i32, i32* %10
%71 = load i32, i32* %11
%72 = load i32, i32* %12
%73 = load i32, i32* %16
%74 = load i32, i32* %14
%75 = load i32, i32* %15
%76 = call i32 @eval_7cards_fast(i32 %69, i32 %70, i32 %71, i32 %72, i32 %73, i32 %74, i32 %75)
%77 = call signext i16 @minv(i16 signext %68, i32 %76)
store i16 %77, i16* %17
%78 = load i16, i16* %17
%79 = load i32, i32* %9
%80 = load i32, i32* %10
%81 = load i32, i32* %11
%82 = load i32, i32* %12
%83 = load i32, i32* %13
%84 = load i32, i32* %16
%85 = load i32, i32* %15
%86 = call i32 @eval_7cards_fast(i32 %79, i32 %80, i32 %81, i32 %82, i32 %83, i32 %84, i32 %85)
%87 = call signext i16 @minv(i16 signext %78, i32 %86)
store i16 %87, i16* %17
%88 = load i16, i16* %17
%89 = load i32, i32* %9
%90 = load i32, i32* %10
%91 = load i32, i32* %11
%92 = load i32, i32* %12
%93 = load i32, i32* %13
%94 = load i32, i32* %14
%95 = load i32, i32* %16
%96 = call i32 @eval_7cards_fast(i32 %89, i32 %90, i32 %91, i32 %92, i32 %93, i32 %94, i32 %95)
%97 = call signext i16 @minv(i16 signext %88, i32 %96)
store i16 %97, i16* %17
%98 = load i16, i16* %17
ret i16 %98
}

LLVM IR (-O2):
define signext i16 @eval_8cards_fast(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @eval_7cards_fast(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%10 = tail call signext i16 @minv(i16 signext 10000, i32 %9)
%11 = tail call i32 @eval_7cards_fast(i32 %7, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%12 = tail call signext i16 @minv(i16 signext %10, i32 %11)
%13 = tail call i32 @eval_7cards_fast(i32 %0, i32 %7, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
%14 = tail call signext i16 @minv(i16 signext %12, i32 %13)
%15 = tail call i32 @eval_7cards_fast(i32 %0, i32 %1, i32 %7, i32 %3, i32 %4, i32 %5, i32 %6)
%16 = tail call signext i16 @minv(i16 signext %14, i32 %15)
%17 = tail call i32 @eval_7cards_fast(i32 %0, i32 %1, i32 %2, i32 %7, i32 %4, i32 %5, i32 %6)
%18 = tail call signext i16 @minv(i16 signext %16, i32 %17)
%19 = tail call i32 @eval_7cards_fast(i32 %0, i32 %1, i32 %2, i32 %3, i32 %7, i32 %5, i32 %6)
%20 = tail call signext i16 @minv(i16 signext %18, i32 %19)
%21 = tail call i32 @eval_7cards_fast(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %7, i32 %6)
%22 = tail call signext i16 @minv(i16 signext %20, i32 %21)
%23 = tail call i32 @eval_7cards_fast(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %7)
%24 = tail call signext i16 @minv(i16 signext %22, i32 %23)
ret i16 %24
}