#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 FindChongSi();
int FindFive();
int FindHasNeighbor();
int FindJumpThree();
int FindMianSan();
int FindOpenRowofFour();
int FindOpenRowofThree();
int FindOpenRowofTwo();
int Evaluate(void) {
  int curSituation = 0;
  int Five = FindFive();
  int OpenRowofThree = FindOpenRowofThree() + FindJumpThree();
  int OpenRowofFour = FindOpenRowofFour();
  int ChongSi = FindChongSi();
  if (OpenRowofThree > 1 || ChongSi > 1 || ChongSi + OpenRowofThree > 1) {
    curSituation = Five * 100000 + 900;
  } else
    curSituation = Five * 100000 + OpenRowofFour * 1000 + OpenRowofThree * 100 +
                   ChongSi * 100 + FindMianSan() * 10 +
                   FindOpenRowofTwo() * 10 + FindHasNeighbor();
  return curSituation;
}


x86 assembly (clang, -O0):
<Evaluate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <FindFive@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1070 <FindOpenRowofThree@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <FindJumpThree@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <FindOpenRowofFour@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <FindChongSi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     11eb <Evaluate+0x6b>
cmpl   $0x1,-0x14(%rbp)
jg     11eb <Evaluate+0x6b>
mov    -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x1,%eax
jle    11ff <Evaluate+0x7f>
imul   $0x186a0,-0x8(%rbp),%eax
add    $0x384,%eax
mov    %eax,-0x4(%rbp)
jmp    1257 <Evaluate+0xd7>
imul   $0x186a0,-0x8(%rbp),%eax
imul   $0x3e8,-0x10(%rbp),%ecx
add    %ecx,%eax
imul   $0x64,-0xc(%rbp),%ecx
add    %ecx,%eax
imul   $0x64,-0x14(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1050 <FindMianSan@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1080 <FindOpenRowofTwo@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
imul   $0xa,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   10a0 <FindHasNeighbor@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Evaluate>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %eax,%eax
call   1090 <FindFive@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1070 <FindOpenRowofThree@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <FindJumpThree@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1040 <FindOpenRowofFour@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1060 <FindChongSi@plt>
imul   $0x186a0,%r14d,%r14d
cmp    $0x1,%ebx
jg     120a <Evaluate+0x8a>
mov    %eax,%ebp
cmp    $0x1,%eax
jg     120a <Evaluate+0x8a>
add    %ebx,%ebp
cmp    $0x2,%ebp
jge    120a <Evaluate+0x8a>
imul   $0x3e8,%r15d,%ebx
xor    %eax,%eax
call   1050 <FindMianSan@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1080 <FindOpenRowofTwo@plt>
mov    %eax,%r12d
xor    %eax,%eax
call   10a0 <FindHasNeighbor@plt>
add    %r15d,%r12d
lea    (%r12,%r12,4),%ecx
imul   $0x64,%ebp,%edx
add    %r14d,%ebx
add    %edx,%ebx
add    %eax,%ebx
lea    (%rbx,%rcx,2),%r14d
jmp    1211 <Evaluate+0x91>
add    $0x384,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Evaluate() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @FindFive()
store i32 %6, i32* %2
%7 = call i32 (...) @FindOpenRowofThree()
%8 = call i32 (...) @FindJumpThree()
%9 = add nsw i32 %7, %8
store i32 %9, i32* %3
%10 = call i32 (...) @FindOpenRowofFour()
store i32 %10, i32* %4
%11 = call i32 (...) @FindChongSi()
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 1
br i1 %13, label %22, label %14
14: ; preds = %0
%15 = load i32, i32* %5
%16 = icmp sgt i32 %15, 1
br i1 %16, label %22, label %17
17: ; preds = %14
%18 = load i32, i32* %5
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
%21 = icmp sgt i32 %20, 1
br i1 %21, label %22, label %26
22: ; preds = %17, %14, %0
%23 = load i32, i32* %2
%24 = mul nsw i32 %23, 100000
%25 = add nsw i32 %24, 900
store i32 %25, i32* %1
br label %46
26: ; preds = %17
%27 = load i32, i32* %2
%28 = mul nsw i32 %27, 100000
%29 = load i32, i32* %4
%30 = mul nsw i32 %29, 1000
%31 = add nsw i32 %28, %30
%32 = load i32, i32* %3
%33 = mul nsw i32 %32, 100
%34 = add nsw i32 %31, %33
%35 = load i32, i32* %5
%36 = mul nsw i32 %35, 100
%37 = add nsw i32 %34, %36
%38 = call i32 (...) @FindMianSan()
%39 = mul nsw i32 %38, 10
%40 = add nsw i32 %37, %39
%41 = call i32 (...) @FindOpenRowofTwo()
%42 = mul nsw i32 %41, 10
%43 = add nsw i32 %40, %42
%44 = call i32 (...) @FindHasNeighbor()
%45 = add nsw i32 %43, %44
store i32 %45, i32* %1
br label %46
46: ; preds = %26, %22
%47 = load i32, i32* %1
ret i32 %47
}

LLVM IR (-O2):
define i32 @Evaluate() {
%1 = tail call i32 (...) @FindFive()
%2 = tail call i32 (...) @FindOpenRowofThree()
%3 = tail call i32 (...) @FindJumpThree()
%4 = add nsw i32 %3, %2
%5 = tail call i32 (...) @FindOpenRowofFour()
%6 = tail call i32 (...) @FindChongSi()
%7 = icmp sgt i32 %4, 1
%8 = icmp sgt i32 %6, 1
%9 = select i1 %7, i1 true, i1 %8
%10 = add i32 %6, %4
%11 = icmp sgt i32 %10, 1
%12 = select i1 %9, i1 true, i1 %11
%13 = mul nsw i32 %1, 100000
br i1 %12, label %14, label %16
14: ; preds = %0
%15 = add nsw i32 %13, 900
br label %28
16: ; preds = %0
%17 = mul nsw i32 %5, 1000
%18 = tail call i32 (...) @FindMianSan()
%19 = tail call i32 (...) @FindOpenRowofTwo()
%20 = tail call i32 (...) @FindHasNeighbor()
%21 = add i32 %19, %18
%22 = mul i32 %21, 10
%23 = mul i32 %10, 100
%24 = add i32 %17, %13
%25 = add i32 %24, %23
%26 = add i32 %25, %20
%27 = add i32 %26, %22
br label %28
28: ; preds = %16, %14
%29 = phi i32 [ %15, %14 ], [ %27, %16 ]
ret i32 %29
}